diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/CloudEndpointsOperations.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/CloudEndpointsOperations.cs index 75c034442e73..9cc43a00a67e 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/CloudEndpointsOperations.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/CloudEndpointsOperations.cs @@ -39,7 +39,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) public StorageSyncManagementClient Client { get; private set; } /// - /// Create a new CloudEndpoint. + /// Get a CloudEndpoint List. /// /// /// The name of the resource group. The name is case insensitive. @@ -50,25 +50,231 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) /// /// Name of Sync Group resource. /// - /// - /// Name of Cloud Endpoint object. - /// - /// - /// Body of Cloud Endpoint resource. - /// /// /// Headers that will be added to request. /// /// /// The cancellation token. /// - public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, CloudEndpointCreateParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task,CloudEndpointsListBySyncGroupHeaders>> ListBySyncGroupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // Send Request - Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } + + + + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (storageSyncServiceName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); + } + + if (syncGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName"); + } + + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("storageSyncServiceName", storageSyncServiceName); + tracingParameters.Add("syncGroupName", syncGroupName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySyncGroup", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"'))); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{storageSyncServiceName}", System.Uri.EscapeDataString(storageSyncServiceName)); + _url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName)); + + 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(this.Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + 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 (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new StorageSyncErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + StorageSyncError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse,CloudEndpointsListBySyncGroupHeaders>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } /// /// Get a given CloudEndpoint. /// @@ -111,6 +317,11 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -127,11 +338,6 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -316,6 +522,37 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) } + /// + /// Create a new CloudEndpoint. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of Storage Sync Service resource. + /// + /// + /// Name of Sync Group resource. + /// + /// + /// Name of Cloud Endpoint object. + /// + /// + /// Body of Cloud Endpoint resource. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, CloudEndpointCreateParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + /// /// Delete a given CloudEndpoint. /// @@ -345,7 +582,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) } /// - /// Get a CloudEndpoint List. + /// Get the AFS file share metadata signing certificate public keys. /// /// /// The name of the resource group. The name is case insensitive. @@ -356,6 +593,9 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) /// /// Name of Sync Group resource. /// + /// + /// Name of Cloud Endpoint object. + /// /// /// Headers that will be added to request. /// @@ -377,12 +617,17 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task,CloudEndpointsListBySyncGroupHeaders>> ListBySyncGroupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> AfsShareMetadataCertificatePublicKeysWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -399,11 +644,6 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -414,6 +654,11 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName"); } + if (cloudEndpointName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "cloudEndpointName"); + } + // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -424,19 +669,21 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("storageSyncServiceName", storageSyncServiceName); tracingParameters.Add("syncGroupName", syncGroupName); + tracingParameters.Add("cloudEndpointName", cloudEndpointName); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySyncGroup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "AfsShareMetadataCertificatePublicKeys", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/afsShareMetadataCertificatePublicKeys").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"'))); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{storageSyncServiceName}", System.Uri.EscapeDataString(storageSyncServiceName)); _url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName)); + _url = _url.Replace("{cloudEndpointName}", System.Uri.EscapeDataString(cloudEndpointName)); System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (this.Client.ApiVersion != null) @@ -531,7 +778,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse,CloudEndpointsListBySyncGroupHeaders>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -545,7 +792,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } catch (Newtonsoft.Json.JsonException ex) { @@ -559,7 +806,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } catch (Newtonsoft.Json.JsonException ex) { @@ -582,7 +829,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) } /// - /// Pre Backup a given CloudEndpoint. + /// Post Backup a given CloudEndpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -605,15 +852,46 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) /// /// The cancellation token. /// - public async System.Threading.Tasks.Task> PreBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> PostBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // Send Request - Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginPreBackupWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare, customHeaders, cancellationToken).ConfigureAwait(false); + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginPostBackupWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare, customHeaders, cancellationToken).ConfigureAwait(false); return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Post Backup a given CloudEndpoint. + /// Post Restore a given CloudEndpoint. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of Storage Sync Service resource. + /// + /// + /// Name of Sync Group resource. + /// + /// + /// Name of Cloud Endpoint object. + /// + /// + /// Body of Cloud Endpoint object. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> PostRestoreWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginPostRestoreWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Pre Backup a given CloudEndpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -636,10 +914,10 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) /// /// The cancellation token. /// - public async System.Threading.Tasks.Task> PostBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> PreBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // Send Request - Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginPostBackupWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare, customHeaders, cancellationToken).ConfigureAwait(false); + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginPreBackupWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare, customHeaders, cancellationToken).ConfigureAwait(false); return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } @@ -713,6 +991,11 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -729,11 +1012,6 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -900,37 +1178,6 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) } - /// - /// Post Restore a given CloudEndpoint. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of Storage Sync Service resource. - /// - /// - /// Name of Sync Group resource. - /// - /// - /// Name of Cloud Endpoint object. - /// - /// - /// Body of Cloud Endpoint object. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async System.Threading.Tasks.Task> PostRestoreWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // Send Request - Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginPostRestoreWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - /// /// Triggers detection of changes performed on Azure File share connected to /// the specified Azure File Sync Cloud Endpoint. @@ -964,7 +1211,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) } /// - /// Get the AFS file share metadata signing certificate public keys. + /// Create a new CloudEndpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -978,6 +1225,9 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) /// /// Name of Cloud Endpoint object. /// + /// + /// Body of Cloud Endpoint resource. + /// /// /// Headers that will be added to request. /// @@ -999,12 +1249,22 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task> AfsShareMetadataCertificatePublicKeysWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, CloudEndpointCreateParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (parameters == null) + { + 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 (resourceGroupName == null) { @@ -1021,11 +1281,6 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -1053,14 +1308,15 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) tracingParameters.Add("syncGroupName", syncGroupName); tracingParameters.Add("cloudEndpointName", cloudEndpointName); + tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "AfsShareMetadataCertificatePublicKeys", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/afsShareMetadataCertificatePublicKeys").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"'))); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{storageSyncServiceName}", System.Uri.EscapeDataString(storageSyncServiceName)); @@ -1079,7 +1335,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) // Create HTTP transport objects var _httpRequest = new System.Net.Http.HttpRequestMessage(); System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) @@ -1108,6 +1364,12 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) } // Serialize Request string _requestContent = null; + if(parameters != null) + { + _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 (this.Client.Credentials != null) { @@ -1130,7 +1392,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new StorageSyncErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -1160,7 +1422,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -1174,7 +1436,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } catch (Newtonsoft.Json.JsonException ex) { @@ -1188,7 +1450,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } catch (Newtonsoft.Json.JsonException ex) { @@ -1211,7 +1473,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) } /// - /// Create a new CloudEndpoint. + /// Delete a given CloudEndpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -1225,9 +1487,6 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) /// /// Name of Cloud Endpoint object. /// - /// - /// Body of Cloud Endpoint resource. - /// /// /// Headers that will be added to request. /// @@ -1237,9 +1496,6 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -1249,15 +1505,15 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, CloudEndpointCreateParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (parameters == null) + if (this.Client.ApiVersion == null) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } @@ -1276,11 +1532,6 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -1308,10 +1559,9 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) tracingParameters.Add("syncGroupName", syncGroupName); tracingParameters.Add("cloudEndpointName", cloudEndpointName); - tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL @@ -1335,7 +1585,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) // Create HTTP transport objects var _httpRequest = new System.Net.Http.HttpRequestMessage(); System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) @@ -1364,12 +1614,6 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) } // Serialize Request string _requestContent = null; - if(parameters != null) - { - _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 (this.Client.Credentials != null) { @@ -1392,7 +1636,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { var ex = new StorageSyncErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -1422,7 +1666,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -1430,27 +1674,9 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); - } - catch (Newtonsoft.Json.JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } catch (Newtonsoft.Json.JsonException ex) { @@ -1473,7 +1699,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) } /// - /// Delete a given CloudEndpoint. + /// Post Backup a given CloudEndpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -1487,6 +1713,9 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) /// /// Name of Cloud Endpoint object. /// + /// + /// Azure File Share. + /// /// /// Headers that will be added to request. /// @@ -1496,6 +1725,9 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -1505,12 +1737,17 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> BeginPostBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -1527,11 +1764,6 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -1547,6 +1779,11 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "cloudEndpointName"); } + BackupRequest parameters = new BackupRequest(); + if(azureFileShare != null) + { + parameters.AzureFileShare = azureFileShare; + } // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1559,14 +1796,15 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) tracingParameters.Add("syncGroupName", syncGroupName); tracingParameters.Add("cloudEndpointName", cloudEndpointName); + tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginPostBackup", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/postbackup").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"'))); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{storageSyncServiceName}", System.Uri.EscapeDataString(storageSyncServiceName)); @@ -1585,7 +1823,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) // Create HTTP transport objects var _httpRequest = new System.Net.Http.HttpRequestMessage(); System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) @@ -1614,6 +1852,12 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) } // Serialize Request string _requestContent = null; + if(parameters != null) + { + _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 (this.Client.Credentials != null) { @@ -1636,7 +1880,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { var ex = new StorageSyncErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -1666,7 +1910,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -1674,9 +1918,27 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } catch (Newtonsoft.Json.JsonException ex) { @@ -1699,7 +1961,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) } /// - /// Pre Backup a given CloudEndpoint. + /// Post Restore a given CloudEndpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -1713,8 +1975,8 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) /// /// Name of Cloud Endpoint object. /// - /// - /// Azure File Share. + /// + /// Body of Cloud Endpoint object. /// /// /// Headers that will be added to request. @@ -1734,12 +1996,22 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task> BeginPreBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> BeginPostRestoreWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (parameters == null) + { + 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 (resourceGroupName == null) { @@ -1756,11 +2028,6 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -1776,11 +2043,6 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "cloudEndpointName"); } - BackupRequest parameters = new BackupRequest(); - if(azureFileShare != null) - { - parameters.AzureFileShare = azureFileShare; - } // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1796,12 +2058,12 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginPreBackup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginPostRestore", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/prebackup").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/postrestore").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"'))); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{storageSyncServiceName}", System.Uri.EscapeDataString(storageSyncServiceName)); @@ -1907,7 +2169,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -1917,7 +2179,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } catch (Newtonsoft.Json.JsonException ex) { @@ -1940,7 +2202,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) } /// - /// Post Backup a given CloudEndpoint. + /// Pre Backup a given CloudEndpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -1966,9 +2228,6 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -1978,12 +2237,17 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task> BeginPostBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> BeginPreBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -2000,11 +2264,6 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -2040,12 +2299,12 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginPostBackup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginPreBackup", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/postbackup").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/prebackup").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"'))); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{storageSyncServiceName}", System.Uri.EscapeDataString(storageSyncServiceName)); @@ -2151,7 +2410,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -2159,27 +2418,9 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); - } - catch (Newtonsoft.Json.JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } catch (Newtonsoft.Json.JsonException ex) { @@ -2248,6 +2489,11 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) 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 (resourceGroupName == null) { @@ -2264,11 +2510,6 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -2443,7 +2684,8 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) } /// - /// Post Restore a given CloudEndpoint. + /// Triggers detection of changes performed on Azure File share connected to + /// the specified Azure File Sync Cloud Endpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -2458,7 +2700,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) /// Name of Cloud Endpoint object. /// /// - /// Body of Cloud Endpoint object. + /// Trigger Change Detection Action parameters. /// /// /// Headers that will be added to request. @@ -2478,7 +2720,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task> BeginPostRestoreWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> BeginTriggerChangeDetectionWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, TriggerChangeDetectionParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { @@ -2489,6 +2731,11 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) 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 (resourceGroupName == null) { @@ -2505,11 +2752,6 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -2540,12 +2782,12 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginPostRestore", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginTriggerChangeDetection", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/postrestore").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/triggerChangeDetection").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"'))); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{storageSyncServiceName}", System.Uri.EscapeDataString(storageSyncServiceName)); @@ -2651,7 +2893,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -2661,7 +2903,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } catch (Newtonsoft.Json.JsonException ex) { @@ -2684,23 +2926,10 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) } /// - /// Triggers detection of changes performed on Azure File share connected to - /// the specified Azure File Sync Cloud Endpoint. + /// Get a CloudEndpoint List. /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of Storage Sync Service resource. - /// - /// - /// Name of Sync Group resource. - /// - /// - /// Name of Cloud Endpoint object. - /// - /// - /// Trigger Change Detection Action parameters. + /// + /// The NextLink from the previous successful call to List operation. /// /// /// Headers that will be added to request. @@ -2711,6 +2940,9 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -2720,53 +2952,13 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task> BeginTriggerChangeDetectionWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, TriggerChangeDetectionParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task,CloudEndpointsListBySyncGroupHeaders>> ListBySyncGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - - - - if (parameters == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); - } - - - if (resourceGroupName == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - - if (storageSyncServiceName == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); - } - - if (syncGroupName == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName"); - } - - if (cloudEndpointName == null) + if (nextPageLink == null) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "cloudEndpointName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); } - // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2774,31 +2966,17 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) { _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("storageSyncServiceName", storageSyncServiceName); - tracingParameters.Add("syncGroupName", syncGroupName); - tracingParameters.Add("cloudEndpointName", cloudEndpointName); - - tracingParameters.Add("parameters", parameters); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginTriggerChangeDetection", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySyncGroupNext", tracingParameters); } // Construct URL - - var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/triggerChangeDetection").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"'))); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{storageSyncServiceName}", System.Uri.EscapeDataString(storageSyncServiceName)); - _url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName)); - _url = _url.Replace("{cloudEndpointName}", System.Uri.EscapeDataString(cloudEndpointName)); + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); 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(this.Client.ApiVersion))); - } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -2806,7 +2984,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) // Create HTTP transport objects var _httpRequest = new System.Net.Http.HttpRequestMessage(); System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) @@ -2835,12 +3013,6 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) } // Serialize Request string _requestContent = null; - if(parameters != null) - { - _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 (this.Client.Credentials != null) { @@ -2863,7 +3035,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200) { var ex = new StorageSyncErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -2893,7 +3065,7 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse,CloudEndpointsListBySyncGroupHeaders>(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -2901,9 +3073,27 @@ internal CloudEndpointsOperations (StorageSyncManagementClient client) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } catch (Newtonsoft.Json.JsonException ex) { diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/CloudEndpointsOperationsExtensions.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/CloudEndpointsOperationsExtensions.cs index 60980d6b9cd4..f85e97ab88e1 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/CloudEndpointsOperationsExtensions.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/CloudEndpointsOperationsExtensions.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.Management.StorageSync public static partial class CloudEndpointsOperationsExtensions { /// - /// Create a new CloudEndpoint. + /// Get a CloudEndpoint List. /// /// /// The operations group for this extension method. @@ -27,16 +27,13 @@ public static partial class CloudEndpointsOperationsExtensions /// /// Name of Sync Group resource. /// - /// - /// Name of Cloud Endpoint object. - /// - public static CloudEndpoint Create(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, CloudEndpointCreateParameters parameters) + public static Microsoft.Rest.Azure.IPage ListBySyncGroup(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName) { - return ((ICloudEndpointsOperations)operations).CreateAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters).GetAwaiter().GetResult(); + return ((ICloudEndpointsOperations)operations).ListBySyncGroupAsync(resourceGroupName, storageSyncServiceName, syncGroupName).GetAwaiter().GetResult(); } /// - /// Create a new CloudEndpoint. + /// Get a CloudEndpoint List. /// /// /// The operations group for this extension method. @@ -50,15 +47,12 @@ public static CloudEndpoint Create(this ICloudEndpointsOperations operations, st /// /// Name of Sync Group resource. /// - /// - /// Name of Cloud Endpoint object. - /// /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task CreateAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, CloudEndpointCreateParameters parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task> ListBySyncGroupAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListBySyncGroupWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -115,7 +109,7 @@ public static CloudEndpoint Get(this ICloudEndpointsOperations operations, strin } } /// - /// Delete a given CloudEndpoint. + /// Create a new CloudEndpoint. /// /// /// The operations group for this extension method. @@ -132,13 +126,13 @@ public static CloudEndpoint Get(this ICloudEndpointsOperations operations, strin /// /// Name of Cloud Endpoint object. /// - public static CloudEndpointsDeleteHeaders Delete(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName) + public static CloudEndpoint Create(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, CloudEndpointCreateParameters parameters) { - return ((ICloudEndpointsOperations)operations).DeleteAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName).GetAwaiter().GetResult(); + return ((ICloudEndpointsOperations)operations).CreateAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters).GetAwaiter().GetResult(); } /// - /// Delete a given CloudEndpoint. + /// Create a new CloudEndpoint. /// /// /// The operations group for this extension method. @@ -158,15 +152,15 @@ public static CloudEndpointsDeleteHeaders Delete(this ICloudEndpointsOperations /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task DeleteAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task CreateAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, CloudEndpointCreateParameters parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, null, cancellationToken).ConfigureAwait(false)) { - return _result.Headers; + return _result.Body; } } /// - /// Get a CloudEndpoint List. + /// Delete a given CloudEndpoint. /// /// /// The operations group for this extension method. @@ -180,13 +174,16 @@ public static CloudEndpointsDeleteHeaders Delete(this ICloudEndpointsOperations /// /// Name of Sync Group resource. /// - public static System.Collections.Generic.IEnumerable ListBySyncGroup(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName) + /// + /// Name of Cloud Endpoint object. + /// + public static CloudEndpointsDeleteHeaders Delete(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName) { - return ((ICloudEndpointsOperations)operations).ListBySyncGroupAsync(resourceGroupName, storageSyncServiceName, syncGroupName).GetAwaiter().GetResult(); + return ((ICloudEndpointsOperations)operations).DeleteAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName).GetAwaiter().GetResult(); } /// - /// Get a CloudEndpoint List. + /// Delete a given CloudEndpoint. /// /// /// The operations group for this extension method. @@ -200,18 +197,21 @@ public static System.Collections.Generic.IEnumerable ListBySyncGr /// /// Name of Sync Group resource. /// + /// + /// Name of Cloud Endpoint object. + /// /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task> ListBySyncGroupAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task DeleteAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.ListBySyncGroupWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, null, cancellationToken).ConfigureAwait(false)) { - return _result.Body; + return _result.Headers; } } /// - /// Pre Backup a given CloudEndpoint. + /// Get the AFS file share metadata signing certificate public keys. /// /// /// The operations group for this extension method. @@ -228,13 +228,13 @@ public static System.Collections.Generic.IEnumerable ListBySyncGr /// /// Name of Cloud Endpoint object. /// - public static CloudEndpointsPreBackupHeaders PreBackup(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string)) + public static CloudEndpointAfsShareMetadataCertificatePublicKeys AfsShareMetadataCertificatePublicKeys(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName) { - return ((ICloudEndpointsOperations)operations).PreBackupAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare).GetAwaiter().GetResult(); + return ((ICloudEndpointsOperations)operations).AfsShareMetadataCertificatePublicKeysAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName).GetAwaiter().GetResult(); } /// - /// Pre Backup a given CloudEndpoint. + /// Get the AFS file share metadata signing certificate public keys. /// /// /// The operations group for this extension method. @@ -254,11 +254,11 @@ public static System.Collections.Generic.IEnumerable ListBySyncGr /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task PreBackupAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task AfsShareMetadataCertificatePublicKeysAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.PreBackupWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.AfsShareMetadataCertificatePublicKeysWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, null, cancellationToken).ConfigureAwait(false)) { - return _result.Headers; + return _result.Body; } } /// @@ -313,7 +313,7 @@ public static System.Collections.Generic.IEnumerable ListBySyncGr } } /// - /// Pre Restore a given CloudEndpoint. + /// Post Restore a given CloudEndpoint. /// /// /// The operations group for this extension method. @@ -330,13 +330,13 @@ public static System.Collections.Generic.IEnumerable ListBySyncGr /// /// Name of Cloud Endpoint object. /// - public static CloudEndpointsPreRestoreHeaders PreRestore(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PreRestoreRequest parameters) + public static CloudEndpointsPostRestoreHeaders PostRestore(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters) { - return ((ICloudEndpointsOperations)operations).PreRestoreAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters).GetAwaiter().GetResult(); + return ((ICloudEndpointsOperations)operations).PostRestoreAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters).GetAwaiter().GetResult(); } /// - /// Pre Restore a given CloudEndpoint. + /// Post Restore a given CloudEndpoint. /// /// /// The operations group for this extension method. @@ -356,15 +356,15 @@ public static CloudEndpointsPreRestoreHeaders PreRestore(this ICloudEndpointsOpe /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task PreRestoreAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PreRestoreRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task PostRestoreAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.PreRestoreWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.PostRestoreWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, null, cancellationToken).ConfigureAwait(false)) { return _result.Headers; } } /// - /// Restore Heartbeat a given CloudEndpoint. + /// Pre Backup a given CloudEndpoint. /// /// /// The operations group for this extension method. @@ -381,13 +381,13 @@ public static CloudEndpointsPreRestoreHeaders PreRestore(this ICloudEndpointsOpe /// /// Name of Cloud Endpoint object. /// - public static CloudEndpointsRestoreheartbeatHeaders Restoreheartbeat(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName) + public static CloudEndpointsPreBackupHeaders PreBackup(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string)) { - return ((ICloudEndpointsOperations)operations).RestoreheartbeatAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName).GetAwaiter().GetResult(); + return ((ICloudEndpointsOperations)operations).PreBackupAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare).GetAwaiter().GetResult(); } /// - /// Restore Heartbeat a given CloudEndpoint. + /// Pre Backup a given CloudEndpoint. /// /// /// The operations group for this extension method. @@ -407,15 +407,15 @@ public static CloudEndpointsRestoreheartbeatHeaders Restoreheartbeat(this ICloud /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task RestoreheartbeatAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task PreBackupAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.RestoreheartbeatWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.PreBackupWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare, null, cancellationToken).ConfigureAwait(false)) { return _result.Headers; } } /// - /// Post Restore a given CloudEndpoint. + /// Pre Restore a given CloudEndpoint. /// /// /// The operations group for this extension method. @@ -432,13 +432,13 @@ public static CloudEndpointsRestoreheartbeatHeaders Restoreheartbeat(this ICloud /// /// Name of Cloud Endpoint object. /// - public static CloudEndpointsPostRestoreHeaders PostRestore(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters) + public static CloudEndpointsPreRestoreHeaders PreRestore(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PreRestoreRequest parameters) { - return ((ICloudEndpointsOperations)operations).PostRestoreAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters).GetAwaiter().GetResult(); + return ((ICloudEndpointsOperations)operations).PreRestoreAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters).GetAwaiter().GetResult(); } /// - /// Post Restore a given CloudEndpoint. + /// Pre Restore a given CloudEndpoint. /// /// /// The operations group for this extension method. @@ -458,16 +458,15 @@ public static CloudEndpointsPostRestoreHeaders PostRestore(this ICloudEndpointsO /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task PostRestoreAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task PreRestoreAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PreRestoreRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.PostRestoreWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.PreRestoreWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, null, cancellationToken).ConfigureAwait(false)) { return _result.Headers; } } /// - /// Triggers detection of changes performed on Azure File share connected to - /// the specified Azure File Sync Cloud Endpoint. + /// Restore Heartbeat a given CloudEndpoint. /// /// /// The operations group for this extension method. @@ -484,14 +483,13 @@ public static CloudEndpointsPostRestoreHeaders PostRestore(this ICloudEndpointsO /// /// Name of Cloud Endpoint object. /// - public static CloudEndpointsTriggerChangeDetectionHeaders TriggerChangeDetection(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, TriggerChangeDetectionParameters parameters) + public static CloudEndpointsRestoreheartbeatHeaders Restoreheartbeat(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName) { - return ((ICloudEndpointsOperations)operations).TriggerChangeDetectionAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters).GetAwaiter().GetResult(); + return ((ICloudEndpointsOperations)operations).RestoreheartbeatAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName).GetAwaiter().GetResult(); } /// - /// Triggers detection of changes performed on Azure File share connected to - /// the specified Azure File Sync Cloud Endpoint. + /// Restore Heartbeat a given CloudEndpoint. /// /// /// The operations group for this extension method. @@ -511,15 +509,16 @@ public static CloudEndpointsTriggerChangeDetectionHeaders TriggerChangeDetection /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task TriggerChangeDetectionAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, TriggerChangeDetectionParameters parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task RestoreheartbeatAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.TriggerChangeDetectionWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.RestoreheartbeatWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, null, cancellationToken).ConfigureAwait(false)) { return _result.Headers; } } /// - /// Get the AFS file share metadata signing certificate public keys. + /// Triggers detection of changes performed on Azure File share connected to + /// the specified Azure File Sync Cloud Endpoint. /// /// /// The operations group for this extension method. @@ -536,13 +535,14 @@ public static CloudEndpointsTriggerChangeDetectionHeaders TriggerChangeDetection /// /// Name of Cloud Endpoint object. /// - public static CloudEndpointAfsShareMetadataCertificatePublicKeys AfsShareMetadataCertificatePublicKeys(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName) + public static CloudEndpointsTriggerChangeDetectionHeaders TriggerChangeDetection(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, TriggerChangeDetectionParameters parameters) { - return ((ICloudEndpointsOperations)operations).AfsShareMetadataCertificatePublicKeysAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName).GetAwaiter().GetResult(); + return ((ICloudEndpointsOperations)operations).TriggerChangeDetectionAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters).GetAwaiter().GetResult(); } /// - /// Get the AFS file share metadata signing certificate public keys. + /// Triggers detection of changes performed on Azure File share connected to + /// the specified Azure File Sync Cloud Endpoint. /// /// /// The operations group for this extension method. @@ -562,11 +562,11 @@ public static CloudEndpointAfsShareMetadataCertificatePublicKeys AfsShareMetadat /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task AfsShareMetadataCertificatePublicKeysAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task TriggerChangeDetectionAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, TriggerChangeDetectionParameters parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.AfsShareMetadataCertificatePublicKeysWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.TriggerChangeDetectionWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, null, cancellationToken).ConfigureAwait(false)) { - return _result.Body; + return _result.Headers; } } /// @@ -672,7 +672,7 @@ public static CloudEndpointsDeleteHeaders BeginDelete(this ICloudEndpointsOperat } } /// - /// Pre Backup a given CloudEndpoint. + /// Post Backup a given CloudEndpoint. /// /// /// The operations group for this extension method. @@ -689,13 +689,13 @@ public static CloudEndpointsDeleteHeaders BeginDelete(this ICloudEndpointsOperat /// /// Name of Cloud Endpoint object. /// - public static CloudEndpointsPreBackupHeaders BeginPreBackup(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string)) + public static PostBackupResponse BeginPostBackup(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string)) { - return ((ICloudEndpointsOperations)operations).BeginPreBackupAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare).GetAwaiter().GetResult(); + return ((ICloudEndpointsOperations)operations).BeginPostBackupAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare).GetAwaiter().GetResult(); } /// - /// Pre Backup a given CloudEndpoint. + /// Post Backup a given CloudEndpoint. /// /// /// The operations group for this extension method. @@ -715,15 +715,15 @@ public static CloudEndpointsDeleteHeaders BeginDelete(this ICloudEndpointsOperat /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task BeginPreBackupAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task BeginPostBackupAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.BeginPreBackupWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.BeginPostBackupWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare, null, cancellationToken).ConfigureAwait(false)) { - return _result.Headers; + return _result.Body; } } /// - /// Post Backup a given CloudEndpoint. + /// Post Restore a given CloudEndpoint. /// /// /// The operations group for this extension method. @@ -740,13 +740,13 @@ public static CloudEndpointsDeleteHeaders BeginDelete(this ICloudEndpointsOperat /// /// Name of Cloud Endpoint object. /// - public static PostBackupResponse BeginPostBackup(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string)) + public static CloudEndpointsPostRestoreHeaders BeginPostRestore(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters) { - return ((ICloudEndpointsOperations)operations).BeginPostBackupAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare).GetAwaiter().GetResult(); + return ((ICloudEndpointsOperations)operations).BeginPostRestoreAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters).GetAwaiter().GetResult(); } /// - /// Post Backup a given CloudEndpoint. + /// Post Restore a given CloudEndpoint. /// /// /// The operations group for this extension method. @@ -766,15 +766,15 @@ public static CloudEndpointsDeleteHeaders BeginDelete(this ICloudEndpointsOperat /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task BeginPostBackupAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task BeginPostRestoreAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.BeginPostBackupWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.BeginPostRestoreWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, null, cancellationToken).ConfigureAwait(false)) { - return _result.Body; + return _result.Headers; } } /// - /// Pre Restore a given CloudEndpoint. + /// Pre Backup a given CloudEndpoint. /// /// /// The operations group for this extension method. @@ -791,13 +791,13 @@ public static CloudEndpointsDeleteHeaders BeginDelete(this ICloudEndpointsOperat /// /// Name of Cloud Endpoint object. /// - public static CloudEndpointsPreRestoreHeaders BeginPreRestore(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PreRestoreRequest parameters) + public static CloudEndpointsPreBackupHeaders BeginPreBackup(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string)) { - return ((ICloudEndpointsOperations)operations).BeginPreRestoreAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters).GetAwaiter().GetResult(); + return ((ICloudEndpointsOperations)operations).BeginPreBackupAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare).GetAwaiter().GetResult(); } /// - /// Pre Restore a given CloudEndpoint. + /// Pre Backup a given CloudEndpoint. /// /// /// The operations group for this extension method. @@ -817,15 +817,15 @@ public static CloudEndpointsPreRestoreHeaders BeginPreRestore(this ICloudEndpoin /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task BeginPreRestoreAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PreRestoreRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task BeginPreBackupAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.BeginPreRestoreWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.BeginPreBackupWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare, null, cancellationToken).ConfigureAwait(false)) { return _result.Headers; } } /// - /// Post Restore a given CloudEndpoint. + /// Pre Restore a given CloudEndpoint. /// /// /// The operations group for this extension method. @@ -842,13 +842,13 @@ public static CloudEndpointsPreRestoreHeaders BeginPreRestore(this ICloudEndpoin /// /// Name of Cloud Endpoint object. /// - public static CloudEndpointsPostRestoreHeaders BeginPostRestore(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters) + public static CloudEndpointsPreRestoreHeaders BeginPreRestore(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PreRestoreRequest parameters) { - return ((ICloudEndpointsOperations)operations).BeginPostRestoreAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters).GetAwaiter().GetResult(); + return ((ICloudEndpointsOperations)operations).BeginPreRestoreAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters).GetAwaiter().GetResult(); } /// - /// Post Restore a given CloudEndpoint. + /// Pre Restore a given CloudEndpoint. /// /// /// The operations group for this extension method. @@ -868,9 +868,9 @@ public static CloudEndpointsPostRestoreHeaders BeginPostRestore(this ICloudEndpo /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task BeginPostRestoreAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task BeginPreRestoreAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PreRestoreRequest parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.BeginPostRestoreWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.BeginPreRestoreWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, null, cancellationToken).ConfigureAwait(false)) { return _result.Headers; } @@ -928,5 +928,38 @@ public static CloudEndpointsTriggerChangeDetectionHeaders BeginTriggerChangeDete return _result.Headers; } } + /// + /// Get a CloudEndpoint List. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListBySyncGroupNext(this ICloudEndpointsOperations operations, string nextPageLink) + { + return ((ICloudEndpointsOperations)operations).ListBySyncGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get a CloudEndpoint List. + /// + /// + /// 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> ListBySyncGroupNextAsync(this ICloudEndpointsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListBySyncGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } } } diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/ICloudEndpointsOperations.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/ICloudEndpointsOperations.cs index e2cf6ee79237..ccce44567182 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/ICloudEndpointsOperations.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/ICloudEndpointsOperations.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.Management.StorageSync public partial interface ICloudEndpointsOperations { /// - /// Create a new CloudEndpoint. + /// Get a CloudEndpoint List. /// /// - /// Create a new CloudEndpoint. + /// Get a CloudEndpoint List. /// /// /// The name of the resource group. The name is case insensitive. @@ -28,12 +28,6 @@ public partial interface ICloudEndpointsOperations /// /// Name of Sync Group resource. /// - /// - /// Name of Cloud Endpoint object. - /// - /// - /// Body of Cloud Endpoint resource. - /// /// /// The headers that will be added to request. /// @@ -46,7 +40,7 @@ public partial interface ICloudEndpointsOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, CloudEndpointCreateParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task,CloudEndpointsListBySyncGroupHeaders>> ListBySyncGroupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get a given CloudEndpoint. @@ -81,10 +75,10 @@ public partial interface ICloudEndpointsOperations System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Delete a given CloudEndpoint. + /// Create a new CloudEndpoint. /// /// - /// Delete a given CloudEndpoint. + /// Create a new CloudEndpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -98,6 +92,9 @@ public partial interface ICloudEndpointsOperations /// /// Name of Cloud Endpoint object. /// + /// + /// Body of Cloud Endpoint resource. + /// /// /// The headers that will be added to request. /// @@ -107,13 +104,16 @@ public partial interface ICloudEndpointsOperations /// /// Thrown when the operation returned an invalid status code /// - System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, CloudEndpointCreateParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Get a CloudEndpoint List. + /// Delete a given CloudEndpoint. /// /// - /// Get a CloudEndpoint List. + /// Delete a given CloudEndpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -124,6 +124,9 @@ public partial interface ICloudEndpointsOperations /// /// Name of Sync Group resource. /// + /// + /// Name of Cloud Endpoint object. + /// /// /// The headers that will be added to request. /// @@ -133,16 +136,13 @@ public partial interface ICloudEndpointsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// - System.Threading.Tasks.Task,CloudEndpointsListBySyncGroupHeaders>> ListBySyncGroupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Pre Backup a given CloudEndpoint. + /// Get the AFS file share metadata signing certificate public keys. /// /// - /// Pre Backup a given CloudEndpoint. + /// Get the AFS file share metadata signing certificate public keys. /// /// /// The name of the resource group. The name is case insensitive. @@ -156,9 +156,6 @@ public partial interface ICloudEndpointsOperations /// /// Name of Cloud Endpoint object. /// - /// - /// Azure File Share. - /// /// /// The headers that will be added to request. /// @@ -168,7 +165,10 @@ public partial interface ICloudEndpointsOperations /// /// Thrown when the operation returned an invalid status code /// - System.Threading.Tasks.Task> PreBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> AfsShareMetadataCertificatePublicKeysWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Post Backup a given CloudEndpoint. @@ -206,10 +206,10 @@ public partial interface ICloudEndpointsOperations System.Threading.Tasks.Task> PostBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Pre Restore a given CloudEndpoint. + /// Post Restore a given CloudEndpoint. /// /// - /// Pre Restore a given CloudEndpoint. + /// Post Restore a given CloudEndpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -235,13 +235,13 @@ public partial interface ICloudEndpointsOperations /// /// Thrown when the operation returned an invalid status code /// - System.Threading.Tasks.Task> PreRestoreWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PreRestoreRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> PostRestoreWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Restore Heartbeat a given CloudEndpoint. + /// Pre Backup a given CloudEndpoint. /// /// - /// Restore Heartbeat a given CloudEndpoint. + /// Pre Backup a given CloudEndpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -255,6 +255,9 @@ public partial interface ICloudEndpointsOperations /// /// Name of Cloud Endpoint object. /// + /// + /// Azure File Share. + /// /// /// The headers that will be added to request. /// @@ -264,13 +267,13 @@ public partial interface ICloudEndpointsOperations /// /// Thrown when the operation returned an invalid status code /// - System.Threading.Tasks.Task> RestoreheartbeatWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> PreBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Post Restore a given CloudEndpoint. + /// Pre Restore a given CloudEndpoint. /// /// - /// Post Restore a given CloudEndpoint. + /// Pre Restore a given CloudEndpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -296,15 +299,13 @@ public partial interface ICloudEndpointsOperations /// /// Thrown when the operation returned an invalid status code /// - System.Threading.Tasks.Task> PostRestoreWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> PreRestoreWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PreRestoreRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Triggers detection of changes performed on Azure File share connected to - /// the specified Azure File Sync Cloud Endpoint. + /// Restore Heartbeat a given CloudEndpoint. /// /// - /// Triggers detection of changes performed on Azure File share connected to - /// the specified Azure File Sync Cloud Endpoint. + /// Restore Heartbeat a given CloudEndpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -318,9 +319,6 @@ public partial interface ICloudEndpointsOperations /// /// Name of Cloud Endpoint object. /// - /// - /// Trigger Change Detection Action parameters. - /// /// /// The headers that will be added to request. /// @@ -330,13 +328,15 @@ public partial interface ICloudEndpointsOperations /// /// Thrown when the operation returned an invalid status code /// - System.Threading.Tasks.Task> TriggerChangeDetectionWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, TriggerChangeDetectionParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> RestoreheartbeatWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Get the AFS file share metadata signing certificate public keys. + /// Triggers detection of changes performed on Azure File share connected to + /// the specified Azure File Sync Cloud Endpoint. /// /// - /// Get the AFS file share metadata signing certificate public keys. + /// Triggers detection of changes performed on Azure File share connected to + /// the specified Azure File Sync Cloud Endpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -350,6 +350,9 @@ public partial interface ICloudEndpointsOperations /// /// Name of Cloud Endpoint object. /// + /// + /// Trigger Change Detection Action parameters. + /// /// /// The headers that will be added to request. /// @@ -359,10 +362,7 @@ public partial interface ICloudEndpointsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// - System.Threading.Tasks.Task> AfsShareMetadataCertificatePublicKeysWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TriggerChangeDetectionWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, TriggerChangeDetectionParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create a new CloudEndpoint. @@ -429,10 +429,10 @@ public partial interface ICloudEndpointsOperations System.Threading.Tasks.Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Pre Backup a given CloudEndpoint. + /// Post Backup a given CloudEndpoint. /// /// - /// Pre Backup a given CloudEndpoint. + /// Post Backup a given CloudEndpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -458,13 +458,16 @@ public partial interface ICloudEndpointsOperations /// /// Thrown when the operation returned an invalid status code /// - System.Threading.Tasks.Task> BeginPreBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> BeginPostBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Post Backup a given CloudEndpoint. + /// Post Restore a given CloudEndpoint. /// /// - /// Post Backup a given CloudEndpoint. + /// Post Restore a given CloudEndpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -478,8 +481,8 @@ public partial interface ICloudEndpointsOperations /// /// Name of Cloud Endpoint object. /// - /// - /// Azure File Share. + /// + /// Body of Cloud Endpoint object. /// /// /// The headers that will be added to request. @@ -490,16 +493,13 @@ public partial interface ICloudEndpointsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// - System.Threading.Tasks.Task> BeginPostBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> BeginPostRestoreWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Pre Restore a given CloudEndpoint. + /// Pre Backup a given CloudEndpoint. /// /// - /// Pre Restore a given CloudEndpoint. + /// Pre Backup a given CloudEndpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -513,8 +513,8 @@ public partial interface ICloudEndpointsOperations /// /// Name of Cloud Endpoint object. /// - /// - /// Body of Cloud Endpoint object. + /// + /// Azure File Share. /// /// /// The headers that will be added to request. @@ -525,13 +525,13 @@ public partial interface ICloudEndpointsOperations /// /// Thrown when the operation returned an invalid status code /// - System.Threading.Tasks.Task> BeginPreRestoreWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PreRestoreRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> BeginPreBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Post Restore a given CloudEndpoint. + /// Pre Restore a given CloudEndpoint. /// /// - /// Post Restore a given CloudEndpoint. + /// Pre Restore a given CloudEndpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -557,7 +557,7 @@ public partial interface ICloudEndpointsOperations /// /// Thrown when the operation returned an invalid status code /// - System.Threading.Tasks.Task> BeginPostRestoreWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> BeginPreRestoreWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PreRestoreRequest parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Triggers detection of changes performed on Azure File share connected to @@ -593,5 +593,28 @@ public partial interface ICloudEndpointsOperations /// System.Threading.Tasks.Task> BeginTriggerChangeDetectionWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, TriggerChangeDetectionParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get a CloudEndpoint List. + /// + /// + /// Get a CloudEndpoint List. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task,CloudEndpointsListBySyncGroupHeaders>> ListBySyncGroupNextWithHttpMessagesAsync(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/StorageSync/StorageSync.Management.Sdk/Generated/IOperations.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/IOperations.cs index 954825db6057..88f9051bfb3b 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/IOperations.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/IOperations.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.Management.StorageSync public partial interface IOperations { /// - /// Lists all of the available Storage Sync Rest API operations. + /// List the operations for the provider /// /// - /// Lists all of the available Storage Sync Rest API operations. + /// List the operations for the provider /// /// /// The headers that will be added to request. @@ -34,10 +34,10 @@ public partial interface IOperations System.Threading.Tasks.Task,OperationsListHeaders>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Lists all of the available Storage Sync Rest API operations. + /// List the operations for the provider /// /// - /// Lists all of the available Storage Sync Rest API operations. + /// List the operations for the provider /// /// /// The NextLink from the previous successful call to List operation. diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/IPrivateEndpointConnectionsOperations.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/IPrivateEndpointConnectionsOperations.cs index c85866a06d2f..68b6517d969d 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/IPrivateEndpointConnectionsOperations.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/IPrivateEndpointConnectionsOperations.cs @@ -13,6 +13,32 @@ namespace Microsoft.Azure.Management.StorageSync /// public partial interface IPrivateEndpointConnectionsOperations { + /// + /// Get a PrivateEndpointConnection List. + /// + /// + /// Get a PrivateEndpointConnection List. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of Storage Sync Service resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task,PrivateEndpointConnectionsListByStorageSyncServiceHeaders>> ListByStorageSyncServiceWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets the specified private endpoint connection associated with the storage /// sync service. @@ -25,8 +51,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. + /// Name of Storage Sync Service resource. /// /// /// The name of the private endpoint connection associated with the Azure @@ -58,8 +83,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. + /// Name of Storage Sync Service resource. /// /// /// The name of the private endpoint connection associated with the Azure @@ -94,8 +118,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. + /// Name of Storage Sync Service resource. /// /// /// The name of the private endpoint connection associated with the Azure @@ -112,32 +135,6 @@ public partial interface IPrivateEndpointConnectionsOperations /// System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string privateEndpointConnectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Get a PrivateEndpointConnection List. - /// - /// - /// Get a PrivateEndpointConnection List. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of Storage Sync Service resource. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - System.Threading.Tasks.Task,PrivateEndpointConnectionsListByStorageSyncServiceHeaders>> ListByStorageSyncServiceWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// /// Update the state of specified private endpoint connection associated with /// the storage sync service. @@ -150,8 +147,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. + /// Name of Storage Sync Service resource. /// /// /// The name of the private endpoint connection associated with the Azure @@ -186,8 +182,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. + /// Name of Storage Sync Service resource. /// /// /// The name of the private endpoint connection associated with the Azure @@ -204,5 +199,28 @@ public partial interface IPrivateEndpointConnectionsOperations /// System.Threading.Tasks.Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string privateEndpointConnectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get a PrivateEndpointConnection List. + /// + /// + /// Get a PrivateEndpointConnection List. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task,PrivateEndpointConnectionsListByStorageSyncServiceHeaders>> ListByStorageSyncServiceNextWithHttpMessagesAsync(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/StorageSync/StorageSync.Management.Sdk/Generated/IPrivateLinkResourcesOperations.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/IPrivateLinkResourcesOperations.cs index 0eaeab22b70b..b9709b48f3a6 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/IPrivateLinkResourcesOperations.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/IPrivateLinkResourcesOperations.cs @@ -25,8 +25,7 @@ public partial interface IPrivateLinkResourcesOperations /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. + /// Name of Storage Sync Service resource. /// /// /// The headers that will be added to request. diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/IRegisteredServersOperations.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/IRegisteredServersOperations.cs index d03f5894b445..a21e6bd5333e 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/IRegisteredServersOperations.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/IRegisteredServersOperations.cs @@ -37,7 +37,7 @@ public partial interface IRegisteredServersOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task,RegisteredServersListByStorageSyncServiceHeaders>> ListByStorageSyncServiceWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task,RegisteredServersListByStorageSyncServiceHeaders>> ListByStorageSyncServiceWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get a given registered server. @@ -171,7 +171,7 @@ public partial interface IRegisteredServersOperations /// Name of Storage Sync Service resource. /// /// - /// Server Id + /// GUID identifying the on-premises server. /// /// /// Certificate Data @@ -290,7 +290,7 @@ public partial interface IRegisteredServersOperations /// Name of Storage Sync Service resource. /// /// - /// Server Id + /// GUID identifying the on-premises server. /// /// /// Certificate Data @@ -306,5 +306,28 @@ public partial interface IRegisteredServersOperations /// System.Threading.Tasks.Task> BeginTriggerRolloverWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string serverId, string serverCertificate = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get a given registered server list. + /// + /// + /// Get a given registered server list. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task,RegisteredServersListByStorageSyncServiceHeaders>> ListByStorageSyncServiceNextWithHttpMessagesAsync(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/StorageSync/StorageSync.Management.Sdk/Generated/IServerEndpointsOperations.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/IServerEndpointsOperations.cs index 7c8fda2a0014..48146a7cc0b3 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/IServerEndpointsOperations.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/IServerEndpointsOperations.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.Management.StorageSync public partial interface IServerEndpointsOperations { /// - /// Create a new ServerEndpoint. + /// Get a ServerEndpoint list. /// /// - /// Create a new ServerEndpoint. + /// Get a ServerEndpoint list. /// /// /// The name of the resource group. The name is case insensitive. @@ -28,12 +28,6 @@ public partial interface IServerEndpointsOperations /// /// Name of Sync Group resource. /// - /// - /// Name of Server Endpoint object. - /// - /// - /// Body of Server Endpoint object. - /// /// /// The headers that will be added to request. /// @@ -46,13 +40,13 @@ public partial interface IServerEndpointsOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, ServerEndpointCreateParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task,ServerEndpointsListBySyncGroupHeaders>> ListBySyncGroupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Patch a given ServerEndpoint. + /// Get a ServerEndpoint. /// /// - /// Patch a given ServerEndpoint. + /// Get a ServerEndpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -66,9 +60,6 @@ public partial interface IServerEndpointsOperations /// /// Name of Server Endpoint object. /// - /// - /// Any of the properties applicable in PUT request. - /// /// /// The headers that will be added to request. /// @@ -81,13 +72,13 @@ public partial interface IServerEndpointsOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, ServerEndpointUpdateParameters parameters = default(ServerEndpointUpdateParameters), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Get a ServerEndpoint. + /// Create a new ServerEndpoint. /// /// - /// Get a ServerEndpoint. + /// Create a new ServerEndpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -101,6 +92,9 @@ public partial interface IServerEndpointsOperations /// /// Name of Server Endpoint object. /// + /// + /// Body of Server Endpoint object. + /// /// /// The headers that will be added to request. /// @@ -113,13 +107,13 @@ public partial interface IServerEndpointsOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, ServerEndpointCreateParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Delete a given ServerEndpoint. + /// Patch a given ServerEndpoint. /// /// - /// Delete a given ServerEndpoint. + /// Patch a given ServerEndpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -133,6 +127,9 @@ public partial interface IServerEndpointsOperations /// /// Name of Server Endpoint object. /// + /// + /// Any of the properties applicable in PUT request. + /// /// /// The headers that will be added to request. /// @@ -142,13 +139,16 @@ public partial interface IServerEndpointsOperations /// /// Thrown when the operation returned an invalid status code /// - System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, ServerEndpointUpdateParameters parameters = default(ServerEndpointUpdateParameters), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Get a ServerEndpoint list. + /// Delete a given ServerEndpoint. /// /// - /// Get a ServerEndpoint list. + /// Delete a given ServerEndpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -159,6 +159,9 @@ public partial interface IServerEndpointsOperations /// /// Name of Sync Group resource. /// + /// + /// Name of Server Endpoint object. + /// /// /// The headers that will be added to request. /// @@ -168,10 +171,7 @@ public partial interface IServerEndpointsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// - System.Threading.Tasks.Task,ServerEndpointsListBySyncGroupHeaders>> ListBySyncGroupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Recall a server endpoint. @@ -336,5 +336,28 @@ public partial interface IServerEndpointsOperations /// System.Threading.Tasks.Task> BeginRecallActionWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, RecallActionParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get a ServerEndpoint list. + /// + /// + /// Get a ServerEndpoint list. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task,ServerEndpointsListBySyncGroupHeaders>> ListBySyncGroupNextWithHttpMessagesAsync(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/StorageSync/StorageSync.Management.Sdk/Generated/IStorageSyncManagementClient.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/IStorageSyncManagementClient.cs index 1b90177806e0..4c7a94241b1e 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/IStorageSyncManagementClient.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/IStorageSyncManagementClient.cs @@ -80,15 +80,25 @@ public partial interface IStorageSyncManagementClient : System.IDisposable IStorageSyncServicesOperations StorageSyncServices { get; } /// - /// Gets the IPrivateLinkResourcesOperations + /// Gets the IOperationStatusOperations /// - IPrivateLinkResourcesOperations PrivateLinkResources { get; } + IOperationStatusOperations OperationStatus { get; } /// /// Gets the IPrivateEndpointConnectionsOperations /// IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; } + /// + /// Gets the IPrivateLinkResourcesOperations + /// + IPrivateLinkResourcesOperations PrivateLinkResources { get; } + + /// + /// Gets the IRegisteredServersOperations + /// + IRegisteredServersOperations RegisteredServers { get; } + /// /// Gets the ISyncGroupsOperations /// @@ -104,21 +114,11 @@ public partial interface IStorageSyncManagementClient : System.IDisposable /// IServerEndpointsOperations ServerEndpoints { get; } - /// - /// Gets the IRegisteredServersOperations - /// - IRegisteredServersOperations RegisteredServers { get; } - /// /// Gets the IWorkflowsOperations /// IWorkflowsOperations Workflows { get; } - /// - /// Gets the IOperationStatusOperations - /// - IOperationStatusOperations OperationStatus { get; } - /// /// Get Operation status /// diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/IStorageSyncServicesOperations.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/IStorageSyncServicesOperations.cs index b0f2ffd5b809..950710baa97b 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/IStorageSyncServicesOperations.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/IStorageSyncServicesOperations.cs @@ -40,20 +40,11 @@ public partial interface IStorageSyncServicesOperations System.Threading.Tasks.Task> CheckNameAvailabilityWithHttpMessagesAsync(string locationName, string name, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Create a new StorageSyncService. + /// Get a StorageSyncService list by subscription. /// /// - /// Create a new StorageSyncService. + /// Get a StorageSyncService list by subscription. /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of Storage Sync Service resource. - /// - /// - /// Storage Sync Service resource name. - /// /// /// The headers that will be added to request. /// @@ -66,20 +57,17 @@ public partial interface IStorageSyncServicesOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, StorageSyncServiceCreateParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task,StorageSyncServicesListBySubscriptionHeaders>> ListBySubscriptionWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Get a given StorageSyncService. + /// Get a StorageSyncService list by Resource group name. /// /// - /// Get a given StorageSyncService. + /// Get a StorageSyncService list by Resource group name. /// /// /// The name of the resource group. The name is case insensitive. /// - /// - /// Name of Storage Sync Service resource. - /// /// /// The headers that will be added to request. /// @@ -92,13 +80,13 @@ public partial interface IStorageSyncServicesOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task,StorageSyncServicesListByResourceGroupHeaders>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Patch a given StorageSyncService. + /// Get a given StorageSyncService. /// /// - /// Patch a given StorageSyncService. + /// Get a given StorageSyncService. /// /// /// The name of the resource group. The name is case insensitive. @@ -106,9 +94,6 @@ public partial interface IStorageSyncServicesOperations /// /// Name of Storage Sync Service resource. /// - /// - /// Storage Sync Service resource. - /// /// /// The headers that will be added to request. /// @@ -121,13 +106,13 @@ public partial interface IStorageSyncServicesOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, StorageSyncServiceUpdateParameters parameters = default(StorageSyncServiceUpdateParameters), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Delete a given StorageSyncService. + /// Create a new StorageSyncService. /// /// - /// Delete a given StorageSyncService. + /// Create a new StorageSyncService. /// /// /// The name of the resource group. The name is case insensitive. @@ -135,6 +120,9 @@ public partial interface IStorageSyncServicesOperations /// /// Name of Storage Sync Service resource. /// + /// + /// Storage Sync Service resource name. + /// /// /// The headers that will be added to request. /// @@ -144,17 +132,26 @@ public partial interface IStorageSyncServicesOperations /// /// Thrown when the operation returned an invalid status code /// - System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, StorageSyncServiceCreateParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Get a StorageSyncService list by Resource group name. + /// Patch a given StorageSyncService. /// /// - /// Get a StorageSyncService list by Resource group name. + /// Patch a given StorageSyncService. /// /// /// The name of the resource group. The name is case insensitive. /// + /// + /// Name of Storage Sync Service resource. + /// + /// + /// Storage Sync Service resource. + /// /// /// The headers that will be added to request. /// @@ -167,14 +164,20 @@ public partial interface IStorageSyncServicesOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task,StorageSyncServicesListByResourceGroupHeaders>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, StorageSyncServiceUpdateParameters parameters = default(StorageSyncServiceUpdateParameters), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Get a StorageSyncService list by subscription. + /// Delete a given StorageSyncService. /// /// - /// Get a StorageSyncService list by subscription. + /// Delete a given StorageSyncService. /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of Storage Sync Service resource. + /// /// /// The headers that will be added to request. /// @@ -184,10 +187,7 @@ public partial interface IStorageSyncServicesOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// - System.Threading.Tasks.Task,StorageSyncServicesListBySubscriptionHeaders>> ListBySubscriptionWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Create a new StorageSyncService. @@ -270,5 +270,51 @@ public partial interface IStorageSyncServicesOperations /// System.Threading.Tasks.Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get a StorageSyncService list by subscription. + /// + /// + /// Get a StorageSyncService list by subscription. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task,StorageSyncServicesListBySubscriptionHeaders>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get a StorageSyncService list by Resource group name. + /// + /// + /// Get a StorageSyncService list by Resource group name. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task,StorageSyncServicesListByResourceGroupHeaders>> 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/StorageSync/StorageSync.Management.Sdk/Generated/ISyncGroupsOperations.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/ISyncGroupsOperations.cs index 80dec24a6012..e9c466014dc1 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/ISyncGroupsOperations.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/ISyncGroupsOperations.cs @@ -37,13 +37,13 @@ public partial interface ISyncGroupsOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task,SyncGroupsListByStorageSyncServiceHeaders>> ListByStorageSyncServiceWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task,SyncGroupsListByStorageSyncServiceHeaders>> ListByStorageSyncServiceWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Create a new SyncGroup. + /// Get a given SyncGroup. /// /// - /// Create a new SyncGroup. + /// Get a given SyncGroup. /// /// /// The name of the resource group. The name is case insensitive. @@ -54,9 +54,6 @@ public partial interface ISyncGroupsOperations /// /// Name of Sync Group resource. /// - /// - /// The parameters used to create the sync group - /// /// /// The headers that will be added to request. /// @@ -69,13 +66,13 @@ public partial interface ISyncGroupsOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, object properties = default(object), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Get a given SyncGroup. + /// Create a new SyncGroup. /// /// - /// Get a given SyncGroup. + /// Create a new SyncGroup. /// /// /// The name of the resource group. The name is case insensitive. @@ -86,6 +83,9 @@ public partial interface ISyncGroupsOperations /// /// Name of Sync Group resource. /// + /// + /// The parameters used to create the sync group + /// /// /// The headers that will be added to request. /// @@ -98,7 +98,7 @@ public partial interface ISyncGroupsOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, object properties = default(object), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Delete a given SyncGroup. @@ -126,5 +126,28 @@ public partial interface ISyncGroupsOperations /// System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get a SyncGroup List. + /// + /// + /// Get a SyncGroup List. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task,SyncGroupsListByStorageSyncServiceHeaders>> ListByStorageSyncServiceNextWithHttpMessagesAsync(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/StorageSync/StorageSync.Management.Sdk/Generated/IWorkflowsOperations.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/IWorkflowsOperations.cs index 314a9a578f31..5e9ae6bb2e46 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/IWorkflowsOperations.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/IWorkflowsOperations.cs @@ -37,7 +37,7 @@ public partial interface IWorkflowsOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task,WorkflowsListByStorageSyncServiceHeaders>> ListByStorageSyncServiceWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task,WorkflowsListByStorageSyncServiceHeaders>> ListByStorageSyncServiceWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Get Workflows resource @@ -94,5 +94,28 @@ public partial interface IWorkflowsOperations /// System.Threading.Tasks.Task> AbortWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string workflowId, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get a Workflow List + /// + /// + /// Get a Workflow List + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task,WorkflowsListByStorageSyncServiceHeaders>> ListByStorageSyncServiceNextWithHttpMessagesAsync(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/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders.cs index 0b6506a88817..f239997ab1cb 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders.cs @@ -21,16 +21,16 @@ public CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders() /// Initializes a new instance of the CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders class. /// - /// + /// /// - /// + /// /// - public CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -43,13 +43,13 @@ public CloudEndpointsAfsShareMetadataCertificatePublicKeysHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsCreateHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsCreateHeaders.cs index 55df35beebe9..76b7a920d03f 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsCreateHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsCreateHeaders.cs @@ -21,10 +21,10 @@ public CloudEndpointsCreateHeaders() /// Initializes a new instance of the CloudEndpointsCreateHeaders class. /// - /// + /// /// - /// + /// /// /// @@ -35,11 +35,11 @@ public CloudEndpointsCreateHeaders() /// /// - public CloudEndpointsCreateHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string), string azureAsyncOperation = default(string), string location = default(string), string retryAfter = default(string)) + public CloudEndpointsCreateHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string), string azureAsyncOperation = default(string), string location = default(string), int? retryAfter = default(int?)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; this.AzureAsyncOperation = azureAsyncOperation; this.Location = location; this.RetryAfter = retryAfter; @@ -55,14 +55,14 @@ public CloudEndpointsCreateHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } /// /// Gets or sets @@ -80,6 +80,6 @@ public CloudEndpointsCreateHeaders() /// Gets or sets /// [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] - public string RetryAfter {get; set; } + public int? RetryAfter {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsDeleteHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsDeleteHeaders.cs index 24b9b5e1c859..afda41d81ce3 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsDeleteHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsDeleteHeaders.cs @@ -21,10 +21,10 @@ public CloudEndpointsDeleteHeaders() /// Initializes a new instance of the CloudEndpointsDeleteHeaders class. /// - /// + /// /// - /// + /// /// /// @@ -35,11 +35,11 @@ public CloudEndpointsDeleteHeaders() /// /// - public CloudEndpointsDeleteHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string), string azureAsyncOperation = default(string), string location = default(string), string retryAfter = default(string)) + public CloudEndpointsDeleteHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string), string azureAsyncOperation = default(string), string location = default(string), int? retryAfter = default(int?)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; this.AzureAsyncOperation = azureAsyncOperation; this.Location = location; this.RetryAfter = retryAfter; @@ -55,14 +55,14 @@ public CloudEndpointsDeleteHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } /// /// Gets or sets @@ -80,6 +80,6 @@ public CloudEndpointsDeleteHeaders() /// Gets or sets /// [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] - public string RetryAfter {get; set; } + public int? RetryAfter {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsGetHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsGetHeaders.cs index 42c90fc91cbc..8d86d78b32b0 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsGetHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsGetHeaders.cs @@ -21,16 +21,16 @@ public CloudEndpointsGetHeaders() /// Initializes a new instance of the CloudEndpointsGetHeaders class. /// - /// + /// /// - /// + /// /// - public CloudEndpointsGetHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public CloudEndpointsGetHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -43,13 +43,13 @@ public CloudEndpointsGetHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsListBySyncGroupHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsListBySyncGroupHeaders.cs index db1cc9557c77..1c22f67219ed 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsListBySyncGroupHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsListBySyncGroupHeaders.cs @@ -21,16 +21,16 @@ public CloudEndpointsListBySyncGroupHeaders() /// Initializes a new instance of the CloudEndpointsListBySyncGroupHeaders class. /// - /// + /// /// - /// + /// /// - public CloudEndpointsListBySyncGroupHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public CloudEndpointsListBySyncGroupHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -43,13 +43,13 @@ public CloudEndpointsListBySyncGroupHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsPostBackupHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsPostBackupHeaders.cs index e9eeb891761e..b810cf72b221 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsPostBackupHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsPostBackupHeaders.cs @@ -24,17 +24,21 @@ public CloudEndpointsPostBackupHeaders() /// /// + /// + /// + /// /// - /// + /// /// - public CloudEndpointsPostBackupHeaders(string location = default(string), string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public CloudEndpointsPostBackupHeaders(string location = default(string), string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string), int? retryAfter = default(int?)) { this.Location = location; - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; + this.RetryAfter = retryAfter; CustomInit(); } @@ -50,6 +54,12 @@ public CloudEndpointsPostBackupHeaders() [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] public string Location {get; set; } + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } + /// /// Gets or sets /// @@ -59,7 +69,7 @@ public CloudEndpointsPostBackupHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsPostRestoreHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsPostRestoreHeaders.cs index 83ccb33471ba..f8691a0e36f7 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsPostRestoreHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsPostRestoreHeaders.cs @@ -24,17 +24,21 @@ public CloudEndpointsPostRestoreHeaders() /// /// - /// + /// /// /// /// - public CloudEndpointsPostRestoreHeaders(string location = default(string), string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + + /// + /// + public CloudEndpointsPostRestoreHeaders(string location = default(string), int? retryAfter = default(int?), string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { this.Location = location; - this.XMSRequestId = xmsRequestId; + this.RetryAfter = retryAfter; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -53,13 +57,19 @@ public CloudEndpointsPostRestoreHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } /// /// Gets or sets /// [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] public string XMSCorrelationRequestId {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsPreBackupHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsPreBackupHeaders.cs index 40b22aee8ebe..471210e5a338 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsPreBackupHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsPreBackupHeaders.cs @@ -24,17 +24,21 @@ public CloudEndpointsPreBackupHeaders() /// /// + /// + /// + /// /// - /// + /// /// - public CloudEndpointsPreBackupHeaders(string location = default(string), string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public CloudEndpointsPreBackupHeaders(string location = default(string), string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string), int? retryAfter = default(int?)) { this.Location = location; - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; + this.RetryAfter = retryAfter; CustomInit(); } @@ -50,6 +54,12 @@ public CloudEndpointsPreBackupHeaders() [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] public string Location {get; set; } + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } + /// /// Gets or sets /// @@ -59,7 +69,7 @@ public CloudEndpointsPreBackupHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsPreRestoreHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsPreRestoreHeaders.cs index ff3090763659..d229deda95ce 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsPreRestoreHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsPreRestoreHeaders.cs @@ -24,17 +24,21 @@ public CloudEndpointsPreRestoreHeaders() /// /// - /// + /// /// /// /// - public CloudEndpointsPreRestoreHeaders(string location = default(string), string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + + /// + /// + public CloudEndpointsPreRestoreHeaders(string location = default(string), int? retryAfter = default(int?), string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { this.Location = location; - this.XMSRequestId = xmsRequestId; + this.RetryAfter = retryAfter; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -53,13 +57,19 @@ public CloudEndpointsPreRestoreHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } /// /// Gets or sets /// [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] public string XMSCorrelationRequestId {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsRestoreheartbeatHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsRestoreheartbeatHeaders.cs index 75732ec9e60e..788ffc4c2566 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsRestoreheartbeatHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsRestoreheartbeatHeaders.cs @@ -21,16 +21,16 @@ public CloudEndpointsRestoreheartbeatHeaders() /// Initializes a new instance of the CloudEndpointsRestoreheartbeatHeaders class. /// - /// + /// /// - /// + /// /// - public CloudEndpointsRestoreheartbeatHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public CloudEndpointsRestoreheartbeatHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -43,13 +43,13 @@ public CloudEndpointsRestoreheartbeatHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsTriggerChangeDetectionHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsTriggerChangeDetectionHeaders.cs index c4b80cb73f50..924d96310239 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsTriggerChangeDetectionHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/CloudEndpointsTriggerChangeDetectionHeaders.cs @@ -24,17 +24,21 @@ public CloudEndpointsTriggerChangeDetectionHeaders() /// /// - /// + /// /// /// /// - public CloudEndpointsTriggerChangeDetectionHeaders(string location = default(string), string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + + /// + /// + public CloudEndpointsTriggerChangeDetectionHeaders(string location = default(string), int? retryAfter = default(int?), string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { this.Location = location; - this.XMSRequestId = xmsRequestId; + this.RetryAfter = retryAfter; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -53,13 +57,19 @@ public CloudEndpointsTriggerChangeDetectionHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } /// /// Gets or sets /// [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] public string XMSCorrelationRequestId {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/LocationOperationStatusHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/LocationOperationStatusHeaders.cs index 9919d5fe6b4c..c6b15e29a38a 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/LocationOperationStatusHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/LocationOperationStatusHeaders.cs @@ -21,16 +21,16 @@ public LocationOperationStatusHeaders() /// Initializes a new instance of the LocationOperationStatusHeaders class. /// - /// + /// /// - /// + /// /// - public LocationOperationStatusHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public LocationOperationStatusHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -43,13 +43,13 @@ public LocationOperationStatusHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/OperationDisplayResource.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/OperationDisplayResource.cs deleted file mode 100644 index 582774086525..000000000000 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/OperationDisplayResource.cs +++ /dev/null @@ -1,78 +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.StorageSync.Models -{ - using System.Linq; - - /// - /// Operation Display Resource object. - /// - public partial class OperationDisplayResource - { - /// - /// Initializes a new instance of the OperationDisplayResource class. - /// - public OperationDisplayResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the OperationDisplayResource class. - /// - - /// Operation Display Resource Provider. - /// - - /// Operation Display Resource. - /// - - /// Operation Display Resource Operation. - /// - - /// Operation Display Resource Description. - /// - public OperationDisplayResource(string provider = default(string), string resource = default(string), string operation = default(string), string description = default(string)) - - { - this.Provider = provider; - this.Resource = resource; - this.Operation = operation; - this.Description = description; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - - /// - /// Gets or sets operation Display Resource Provider. - /// - [Newtonsoft.Json.JsonProperty(PropertyName = "provider")] - public string Provider {get; set; } - - /// - /// Gets or sets operation Display Resource. - /// - [Newtonsoft.Json.JsonProperty(PropertyName = "resource")] - public string Resource {get; set; } - - /// - /// Gets or sets operation Display Resource Operation. - /// - [Newtonsoft.Json.JsonProperty(PropertyName = "operation")] - public string Operation {get; set; } - - /// - /// Gets or sets operation Display Resource Description. - /// - [Newtonsoft.Json.JsonProperty(PropertyName = "description")] - public string Description {get; set; } - } -} \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/OperationStatusGetHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/OperationStatusGetHeaders.cs index cbaaa1ccc2db..45614c56e4b7 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/OperationStatusGetHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/OperationStatusGetHeaders.cs @@ -21,16 +21,16 @@ public OperationStatusGetHeaders() /// Initializes a new instance of the OperationStatusGetHeaders class. /// - /// + /// /// - /// + /// /// - public OperationStatusGetHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public OperationStatusGetHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -43,13 +43,13 @@ public OperationStatusGetHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/OperationsListHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/OperationsListHeaders.cs index 1a7f5947c55e..84b08c2bf2c5 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/OperationsListHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/OperationsListHeaders.cs @@ -21,16 +21,16 @@ public OperationsListHeaders() /// Initializes a new instance of the OperationsListHeaders class. /// - /// + /// /// - /// + /// /// - public OperationsListHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public OperationsListHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -43,13 +43,13 @@ public OperationsListHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/Page1.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/Page1.cs deleted file mode 100644 index 2e188b1e0098..000000000000 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/Page1.cs +++ /dev/null @@ -1,43 +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.StorageSync.Models -{ - - /// - /// Defines a page in Azure responses. - /// - /// Type of the page content items - [Newtonsoft.Json.JsonObject] - public class Page1 : Microsoft.Rest.Azure.IPage - { - /// - /// 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/StorageSync/StorageSync.Management.Sdk/Generated/Models/PrivateEndpointConnectionsCreateHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/PrivateEndpointConnectionsCreateHeaders.cs index c7b2d3bc5edf..5527d3115e4b 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/PrivateEndpointConnectionsCreateHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/PrivateEndpointConnectionsCreateHeaders.cs @@ -30,19 +30,19 @@ public PrivateEndpointConnectionsCreateHeaders() /// /// - /// + /// /// - /// + /// /// - public PrivateEndpointConnectionsCreateHeaders(string azureAsyncOperation = default(string), string location = default(string), string retryAfter = default(string), string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public PrivateEndpointConnectionsCreateHeaders(string azureAsyncOperation = default(string), string location = default(string), int? retryAfter = default(int?), string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { this.AzureAsyncOperation = azureAsyncOperation; this.Location = location; this.RetryAfter = retryAfter; - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -68,18 +68,18 @@ public PrivateEndpointConnectionsCreateHeaders() /// Gets or sets /// [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] - public string RetryAfter {get; set; } + public int? RetryAfter {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/PrivateEndpointConnectionsDeleteHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/PrivateEndpointConnectionsDeleteHeaders.cs index c6ba5d13b304..f778823185b0 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/PrivateEndpointConnectionsDeleteHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/PrivateEndpointConnectionsDeleteHeaders.cs @@ -30,19 +30,19 @@ public PrivateEndpointConnectionsDeleteHeaders() /// /// - /// + /// /// - /// + /// /// - public PrivateEndpointConnectionsDeleteHeaders(string azureAsyncOperation = default(string), string location = default(string), string retryAfter = default(string), string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public PrivateEndpointConnectionsDeleteHeaders(string azureAsyncOperation = default(string), string location = default(string), int? retryAfter = default(int?), string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { this.AzureAsyncOperation = azureAsyncOperation; this.Location = location; this.RetryAfter = retryAfter; - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -68,18 +68,18 @@ public PrivateEndpointConnectionsDeleteHeaders() /// Gets or sets /// [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] - public string RetryAfter {get; set; } + public int? RetryAfter {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/PrivateEndpointConnectionsListByStorageSyncServiceHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/PrivateEndpointConnectionsListByStorageSyncServiceHeaders.cs index ed736cea5aab..f0b0acf39918 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/PrivateEndpointConnectionsListByStorageSyncServiceHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/PrivateEndpointConnectionsListByStorageSyncServiceHeaders.cs @@ -21,16 +21,16 @@ public PrivateEndpointConnectionsListByStorageSyncServiceHeaders() /// Initializes a new instance of the PrivateEndpointConnectionsListByStorageSyncServiceHeaders class. /// - /// + /// /// - /// + /// /// - public PrivateEndpointConnectionsListByStorageSyncServiceHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public PrivateEndpointConnectionsListByStorageSyncServiceHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -43,13 +43,13 @@ public PrivateEndpointConnectionsListByStorageSyncServiceHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ProgressType.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ProgressType.cs deleted file mode 100644 index 7d202ed484fb..000000000000 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ProgressType.cs +++ /dev/null @@ -1,22 +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.StorageSync.Models -{ - - /// - /// Defines values for ProgressType. - /// - - - public static class ProgressType - { - public const string None = "none"; - public const string Initialize = "initialize"; - public const string Download = "download"; - public const string Upload = "upload"; - public const string Recall = "recall"; - } -} \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/Reason.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/Reason.cs deleted file mode 100644 index df331c1379b8..000000000000 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/Reason.cs +++ /dev/null @@ -1,22 +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.StorageSync.Models -{ - - /// - /// Defines values for Reason. - /// - - - public static class Reason - { - public const string Registered = "Registered"; - public const string Unregistered = "Unregistered"; - public const string Warned = "Warned"; - public const string Suspended = "Suspended"; - public const string Deleted = "Deleted"; - } -} \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersCreateHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersCreateHeaders.cs index bc4f946872d4..5bb53a49836c 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersCreateHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersCreateHeaders.cs @@ -21,10 +21,10 @@ public RegisteredServersCreateHeaders() /// Initializes a new instance of the RegisteredServersCreateHeaders class. /// - /// + /// /// - /// + /// /// /// @@ -32,13 +32,17 @@ public RegisteredServersCreateHeaders() /// /// - public RegisteredServersCreateHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string), string azureAsyncOperation = default(string), string location = default(string)) + + /// + /// + public RegisteredServersCreateHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string), string azureAsyncOperation = default(string), string location = default(string), int? retryAfter = default(int?)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; this.AzureAsyncOperation = azureAsyncOperation; this.Location = location; + this.RetryAfter = retryAfter; CustomInit(); } @@ -51,14 +55,14 @@ public RegisteredServersCreateHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } /// /// Gets or sets @@ -71,5 +75,11 @@ public RegisteredServersCreateHeaders() /// [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersDeleteHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersDeleteHeaders.cs index 79f65a7d376a..fc8d916fd278 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersDeleteHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersDeleteHeaders.cs @@ -21,20 +21,24 @@ public RegisteredServersDeleteHeaders() /// Initializes a new instance of the RegisteredServersDeleteHeaders class. /// - /// + /// /// - /// + /// /// /// /// - public RegisteredServersDeleteHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string), string location = default(string)) + + /// + /// + public RegisteredServersDeleteHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string), string location = default(string), int? retryAfter = default(int?)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; this.Location = location; + this.RetryAfter = retryAfter; CustomInit(); } @@ -47,19 +51,25 @@ public RegisteredServersDeleteHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } /// /// Gets or sets /// [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersGetHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersGetHeaders.cs index cb555fe8c824..55f164989bd7 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersGetHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersGetHeaders.cs @@ -21,16 +21,16 @@ public RegisteredServersGetHeaders() /// Initializes a new instance of the RegisteredServersGetHeaders class. /// - /// + /// /// - /// + /// /// - public RegisteredServersGetHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public RegisteredServersGetHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -43,13 +43,13 @@ public RegisteredServersGetHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersListByStorageSyncServiceHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersListByStorageSyncServiceHeaders.cs index 1e49a8e2d46a..78c7c3550e26 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersListByStorageSyncServiceHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersListByStorageSyncServiceHeaders.cs @@ -21,16 +21,16 @@ public RegisteredServersListByStorageSyncServiceHeaders() /// Initializes a new instance of the RegisteredServersListByStorageSyncServiceHeaders class. /// - /// + /// /// - /// + /// /// - public RegisteredServersListByStorageSyncServiceHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public RegisteredServersListByStorageSyncServiceHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -43,13 +43,13 @@ public RegisteredServersListByStorageSyncServiceHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersTriggerRolloverHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersTriggerRolloverHeaders.cs index b6a2e8e8aed3..737f8c8f4a34 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersTriggerRolloverHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersTriggerRolloverHeaders.cs @@ -21,20 +21,24 @@ public RegisteredServersTriggerRolloverHeaders() /// Initializes a new instance of the RegisteredServersTriggerRolloverHeaders class. /// - /// + /// /// - /// + /// /// /// /// - public RegisteredServersTriggerRolloverHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string), string location = default(string)) + + /// + /// + public RegisteredServersTriggerRolloverHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string), string location = default(string), int? retryAfter = default(int?)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; this.Location = location; + this.RetryAfter = retryAfter; CustomInit(); } @@ -47,19 +51,25 @@ public RegisteredServersTriggerRolloverHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } /// /// Gets or sets /// [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersUpdateHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersUpdateHeaders.cs index 731498199b2c..b291d06511df 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersUpdateHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/RegisteredServersUpdateHeaders.cs @@ -21,10 +21,10 @@ public RegisteredServersUpdateHeaders() /// Initializes a new instance of the RegisteredServersUpdateHeaders class. /// - /// + /// /// - /// + /// /// /// @@ -32,13 +32,17 @@ public RegisteredServersUpdateHeaders() /// /// - public RegisteredServersUpdateHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string), string azureAsyncOperation = default(string), string location = default(string)) + + /// + /// + public RegisteredServersUpdateHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string), string azureAsyncOperation = default(string), string location = default(string), int? retryAfter = default(int?)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; this.AzureAsyncOperation = azureAsyncOperation; this.Location = location; + this.RetryAfter = retryAfter; CustomInit(); } @@ -51,14 +55,14 @@ public RegisteredServersUpdateHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } /// /// Gets or sets @@ -71,5 +75,11 @@ public RegisteredServersUpdateHeaders() /// [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ResourcesMoveInfo.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ResourcesMoveInfo.cs deleted file mode 100644 index 39c33f60a024..000000000000 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ResourcesMoveInfo.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.Management.StorageSync.Models -{ - using System.Linq; - - /// - /// Resource Move Info. - /// - public partial class ResourcesMoveInfo - { - /// - /// Initializes a new instance of the ResourcesMoveInfo class. - /// - public ResourcesMoveInfo() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ResourcesMoveInfo class. - /// - - /// Target resource group. - /// - - /// Collection of Resources. - /// - public ResourcesMoveInfo(string targetResourceGroup = default(string), System.Collections.Generic.IList resources = default(System.Collections.Generic.IList)) - - { - this.TargetResourceGroup = targetResourceGroup; - this.Resources = resources; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - - /// - /// Gets or sets target resource group. - /// - [Newtonsoft.Json.JsonProperty(PropertyName = "targetResourceGroup")] - public string TargetResourceGroup {get; set; } - - /// - /// Gets or sets collection of Resources. - /// - [Newtonsoft.Json.JsonProperty(PropertyName = "resources")] - public System.Collections.Generic.IList Resources {get; set; } - } -} \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsCreateHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsCreateHeaders.cs index 5628d336ed47..9cebec581210 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsCreateHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsCreateHeaders.cs @@ -21,10 +21,10 @@ public ServerEndpointsCreateHeaders() /// Initializes a new instance of the ServerEndpointsCreateHeaders class. /// - /// + /// /// - /// + /// /// /// @@ -32,13 +32,17 @@ public ServerEndpointsCreateHeaders() /// /// - public ServerEndpointsCreateHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string), string azureAsyncOperation = default(string), string location = default(string)) + + /// + /// + public ServerEndpointsCreateHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string), string azureAsyncOperation = default(string), string location = default(string), int? retryAfter = default(int?)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; this.AzureAsyncOperation = azureAsyncOperation; this.Location = location; + this.RetryAfter = retryAfter; CustomInit(); } @@ -51,14 +55,14 @@ public ServerEndpointsCreateHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } /// /// Gets or sets @@ -71,5 +75,11 @@ public ServerEndpointsCreateHeaders() /// [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsDeleteHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsDeleteHeaders.cs index 4a61b3a59e93..9159e2ec569c 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsDeleteHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsDeleteHeaders.cs @@ -21,20 +21,24 @@ public ServerEndpointsDeleteHeaders() /// Initializes a new instance of the ServerEndpointsDeleteHeaders class. /// - /// + /// /// - /// + /// /// /// /// - public ServerEndpointsDeleteHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string), string location = default(string)) + + /// + /// + public ServerEndpointsDeleteHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string), string location = default(string), int? retryAfter = default(int?)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; this.Location = location; + this.RetryAfter = retryAfter; CustomInit(); } @@ -47,19 +51,25 @@ public ServerEndpointsDeleteHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } /// /// Gets or sets /// [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsGetHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsGetHeaders.cs index 5f4126631981..05e6ff1caca8 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsGetHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsGetHeaders.cs @@ -21,16 +21,16 @@ public ServerEndpointsGetHeaders() /// Initializes a new instance of the ServerEndpointsGetHeaders class. /// - /// + /// /// - /// + /// /// - public ServerEndpointsGetHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public ServerEndpointsGetHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -43,13 +43,13 @@ public ServerEndpointsGetHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsListBySyncGroupHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsListBySyncGroupHeaders.cs index 5f21f5fef569..4fe7cf467a97 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsListBySyncGroupHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsListBySyncGroupHeaders.cs @@ -24,17 +24,17 @@ public ServerEndpointsListBySyncGroupHeaders() /// /// - /// + /// /// - /// + /// /// - public ServerEndpointsListBySyncGroupHeaders(string location = default(string), string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public ServerEndpointsListBySyncGroupHeaders(string location = default(string), string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { this.Location = location; - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -53,13 +53,13 @@ public ServerEndpointsListBySyncGroupHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsRecallActionHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsRecallActionHeaders.cs index 0cd4a5e2b5dc..79090859dd50 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsRecallActionHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsRecallActionHeaders.cs @@ -21,20 +21,24 @@ public ServerEndpointsRecallActionHeaders() /// Initializes a new instance of the ServerEndpointsRecallActionHeaders class. /// - /// + /// /// - /// + /// /// /// /// - public ServerEndpointsRecallActionHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string), string location = default(string)) + + /// + /// + public ServerEndpointsRecallActionHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string), string location = default(string), int? retryAfter = default(int?)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; this.Location = location; + this.RetryAfter = retryAfter; CustomInit(); } @@ -47,19 +51,25 @@ public ServerEndpointsRecallActionHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } /// /// Gets or sets /// [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsUpdateHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsUpdateHeaders.cs index f82e18778dbe..570f45b1fbb4 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsUpdateHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/ServerEndpointsUpdateHeaders.cs @@ -21,10 +21,10 @@ public ServerEndpointsUpdateHeaders() /// Initializes a new instance of the ServerEndpointsUpdateHeaders class. /// - /// + /// /// - /// + /// /// /// @@ -32,13 +32,17 @@ public ServerEndpointsUpdateHeaders() /// /// - public ServerEndpointsUpdateHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string), string azureAsyncOperation = default(string), string location = default(string)) + + /// + /// + public ServerEndpointsUpdateHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string), string azureAsyncOperation = default(string), string location = default(string), int? retryAfter = default(int?)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; this.AzureAsyncOperation = azureAsyncOperation; this.Location = location; + this.RetryAfter = retryAfter; CustomInit(); } @@ -51,14 +55,14 @@ public ServerEndpointsUpdateHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } /// /// Gets or sets @@ -71,5 +75,11 @@ public ServerEndpointsUpdateHeaders() /// [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncService.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncService.cs index dfff0908aced..bc80055d4851 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncService.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncService.cs @@ -46,8 +46,7 @@ public StorageSyncService() /// The geo-location where the resource lives /// - /// managed identities for the Storage Sync service to interact with other - /// Azure services without maintaining any secrets or credentials in code. + /// The managed service identities assigned to this resource. /// /// Incoming Traffic Policy @@ -98,9 +97,7 @@ public StorageSyncService() /// - /// Gets or sets managed identities for the Storage Sync service to interact - /// with other Azure services without maintaining any secrets or credentials in - /// code. + /// Gets or sets the managed service identities assigned to this resource. /// [Newtonsoft.Json.JsonProperty(PropertyName = "identity")] public ManagedServiceIdentity Identity {get; set; } diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesCreateHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesCreateHeaders.cs index 27458687f795..3c66a58506f1 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesCreateHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesCreateHeaders.cs @@ -30,19 +30,19 @@ public StorageSyncServicesCreateHeaders() /// /// - /// + /// /// - /// + /// /// - public StorageSyncServicesCreateHeaders(string azureAsyncOperation = default(string), string location = default(string), string retryAfter = default(string), string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public StorageSyncServicesCreateHeaders(string azureAsyncOperation = default(string), string location = default(string), int? retryAfter = default(int?), string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { this.AzureAsyncOperation = azureAsyncOperation; this.Location = location; this.RetryAfter = retryAfter; - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -68,18 +68,18 @@ public StorageSyncServicesCreateHeaders() /// Gets or sets /// [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] - public string RetryAfter {get; set; } + public int? RetryAfter {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesDeleteHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesDeleteHeaders.cs index dfa8367f1fcc..de4fbb8e70f9 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesDeleteHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesDeleteHeaders.cs @@ -21,10 +21,10 @@ public StorageSyncServicesDeleteHeaders() /// Initializes a new instance of the StorageSyncServicesDeleteHeaders class. /// - /// + /// /// - /// + /// /// /// @@ -35,11 +35,11 @@ public StorageSyncServicesDeleteHeaders() /// /// - public StorageSyncServicesDeleteHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string), string azureAsyncOperation = default(string), string location = default(string), string retryAfter = default(string)) + public StorageSyncServicesDeleteHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string), string azureAsyncOperation = default(string), string location = default(string), int? retryAfter = default(int?)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; this.AzureAsyncOperation = azureAsyncOperation; this.Location = location; this.RetryAfter = retryAfter; @@ -55,14 +55,14 @@ public StorageSyncServicesDeleteHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } /// /// Gets or sets @@ -80,6 +80,6 @@ public StorageSyncServicesDeleteHeaders() /// Gets or sets /// [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] - public string RetryAfter {get; set; } + public int? RetryAfter {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesGetHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesGetHeaders.cs index 74e615eb1757..b8141a5d2ae0 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesGetHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesGetHeaders.cs @@ -21,16 +21,16 @@ public StorageSyncServicesGetHeaders() /// Initializes a new instance of the StorageSyncServicesGetHeaders class. /// - /// + /// /// - /// + /// /// - public StorageSyncServicesGetHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public StorageSyncServicesGetHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -43,13 +43,13 @@ public StorageSyncServicesGetHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesListByResourceGroupHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesListByResourceGroupHeaders.cs index a88f50d1ab13..4253e3bd3be6 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesListByResourceGroupHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesListByResourceGroupHeaders.cs @@ -21,16 +21,16 @@ public StorageSyncServicesListByResourceGroupHeaders() /// Initializes a new instance of the StorageSyncServicesListByResourceGroupHeaders class. /// - /// + /// /// - /// + /// /// - public StorageSyncServicesListByResourceGroupHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public StorageSyncServicesListByResourceGroupHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -43,13 +43,13 @@ public StorageSyncServicesListByResourceGroupHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesListBySubscriptionHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesListBySubscriptionHeaders.cs index 3bd1aa53d27b..ab7c478b9f2c 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesListBySubscriptionHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesListBySubscriptionHeaders.cs @@ -21,16 +21,16 @@ public StorageSyncServicesListBySubscriptionHeaders() /// Initializes a new instance of the StorageSyncServicesListBySubscriptionHeaders class. /// - /// + /// /// - /// + /// /// - public StorageSyncServicesListBySubscriptionHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public StorageSyncServicesListBySubscriptionHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -43,13 +43,13 @@ public StorageSyncServicesListBySubscriptionHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesUpdateHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesUpdateHeaders.cs index 20cd6dccc1ae..af9b01530ffe 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesUpdateHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/StorageSyncServicesUpdateHeaders.cs @@ -21,10 +21,10 @@ public StorageSyncServicesUpdateHeaders() /// Initializes a new instance of the StorageSyncServicesUpdateHeaders class. /// - /// + /// /// - /// + /// /// /// @@ -35,11 +35,11 @@ public StorageSyncServicesUpdateHeaders() /// /// - public StorageSyncServicesUpdateHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string), string azureAsyncOperation = default(string), string location = default(string), string retryAfter = default(string)) + public StorageSyncServicesUpdateHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string), string azureAsyncOperation = default(string), string location = default(string), int? retryAfter = default(int?)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; this.AzureAsyncOperation = azureAsyncOperation; this.Location = location; this.RetryAfter = retryAfter; @@ -55,14 +55,14 @@ public StorageSyncServicesUpdateHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } /// /// Gets or sets @@ -80,6 +80,6 @@ public StorageSyncServicesUpdateHeaders() /// Gets or sets /// [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] - public string RetryAfter {get; set; } + public int? RetryAfter {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/SubscriptionState.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/SubscriptionState.cs deleted file mode 100644 index b67cf74a071d..000000000000 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/SubscriptionState.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.Management.StorageSync.Models -{ - using System.Linq; - - /// - /// Subscription State object. - /// - [Microsoft.Rest.Serialization.JsonTransformation] - public partial class SubscriptionState - { - /// - /// Initializes a new instance of the SubscriptionState class. - /// - public SubscriptionState() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SubscriptionState class. - /// - - /// State of Azure Subscription - /// Possible values include: 'Registered', 'Unregistered', 'Warned', - /// 'Suspended', 'Deleted' - - /// Is Transitioning - /// - - /// Subscription state properties. - /// - public SubscriptionState(string state = default(string), bool? istransitioning = default(bool?), object properties = default(object)) - - { - this.State = state; - this.Istransitioning = istransitioning; - this.Properties = properties; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - - /// - /// Gets or sets state of Azure Subscription Possible values include: 'Registered', 'Unregistered', 'Warned', 'Suspended', 'Deleted' - /// - [Newtonsoft.Json.JsonProperty(PropertyName = "state")] - public string State {get; set; } - - /// - /// Gets is Transitioning - /// - [Newtonsoft.Json.JsonProperty(PropertyName = "istransitioning")] - public bool? Istransitioning {get; private set; } - - /// - /// Gets or sets subscription state properties. - /// - [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] - public object Properties {get; set; } - } -} \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/SyncGroupsCreateHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/SyncGroupsCreateHeaders.cs index 86ab191efefd..9c60ebf39905 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/SyncGroupsCreateHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/SyncGroupsCreateHeaders.cs @@ -21,16 +21,16 @@ public SyncGroupsCreateHeaders() /// Initializes a new instance of the SyncGroupsCreateHeaders class. /// - /// + /// /// - /// + /// /// - public SyncGroupsCreateHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public SyncGroupsCreateHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -43,13 +43,13 @@ public SyncGroupsCreateHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/SyncGroupsDeleteHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/SyncGroupsDeleteHeaders.cs index 45b023ea915d..7f183bcf5069 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/SyncGroupsDeleteHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/SyncGroupsDeleteHeaders.cs @@ -21,16 +21,16 @@ public SyncGroupsDeleteHeaders() /// Initializes a new instance of the SyncGroupsDeleteHeaders class. /// - /// + /// /// - /// + /// /// - public SyncGroupsDeleteHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public SyncGroupsDeleteHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -43,13 +43,13 @@ public SyncGroupsDeleteHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/SyncGroupsGetHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/SyncGroupsGetHeaders.cs index f050b310da47..43e61a6dbbfb 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/SyncGroupsGetHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/SyncGroupsGetHeaders.cs @@ -21,16 +21,16 @@ public SyncGroupsGetHeaders() /// Initializes a new instance of the SyncGroupsGetHeaders class. /// - /// + /// /// - /// + /// /// - public SyncGroupsGetHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public SyncGroupsGetHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -43,13 +43,13 @@ public SyncGroupsGetHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/SyncGroupsListByStorageSyncServiceHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/SyncGroupsListByStorageSyncServiceHeaders.cs index deec1f716c2c..e7ec277fbd43 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/SyncGroupsListByStorageSyncServiceHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/SyncGroupsListByStorageSyncServiceHeaders.cs @@ -21,16 +21,16 @@ public SyncGroupsListByStorageSyncServiceHeaders() /// Initializes a new instance of the SyncGroupsListByStorageSyncServiceHeaders class. /// - /// + /// /// - /// + /// /// - public SyncGroupsListByStorageSyncServiceHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public SyncGroupsListByStorageSyncServiceHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -43,13 +43,13 @@ public SyncGroupsListByStorageSyncServiceHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/WorkflowsAbortHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/WorkflowsAbortHeaders.cs index 0fbf4e8ff933..e5ad44d3f8d2 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/WorkflowsAbortHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/WorkflowsAbortHeaders.cs @@ -21,16 +21,16 @@ public WorkflowsAbortHeaders() /// Initializes a new instance of the WorkflowsAbortHeaders class. /// - /// + /// /// - /// + /// /// - public WorkflowsAbortHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public WorkflowsAbortHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -43,13 +43,13 @@ public WorkflowsAbortHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/WorkflowsGetHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/WorkflowsGetHeaders.cs index 83a1ab69fc5f..63f7a74e2fcc 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/WorkflowsGetHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/WorkflowsGetHeaders.cs @@ -21,16 +21,16 @@ public WorkflowsGetHeaders() /// Initializes a new instance of the WorkflowsGetHeaders class. /// - /// + /// /// - /// + /// /// - public WorkflowsGetHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public WorkflowsGetHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -43,13 +43,13 @@ public WorkflowsGetHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/WorkflowsListByStorageSyncServiceHeaders.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/WorkflowsListByStorageSyncServiceHeaders.cs index 8690deefc4c6..8c79bd799b4d 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/WorkflowsListByStorageSyncServiceHeaders.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Models/WorkflowsListByStorageSyncServiceHeaders.cs @@ -21,16 +21,16 @@ public WorkflowsListByStorageSyncServiceHeaders() /// Initializes a new instance of the WorkflowsListByStorageSyncServiceHeaders class. /// - /// + /// /// - /// + /// /// - public WorkflowsListByStorageSyncServiceHeaders(string xmsRequestId = default(string), string xmsCorrelationRequestId = default(string)) + public WorkflowsListByStorageSyncServiceHeaders(string xmsCorrelationRequestId = default(string), string xmsRequestId = default(string)) { - this.XMSRequestId = xmsRequestId; this.XMSCorrelationRequestId = xmsCorrelationRequestId; + this.XMSRequestId = xmsRequestId; CustomInit(); } @@ -43,13 +43,13 @@ public WorkflowsListByStorageSyncServiceHeaders() /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] - public string XMSRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] + public string XMSCorrelationRequestId {get; set; } /// /// Gets or sets /// - [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-correlation-request-id")] - public string XMSCorrelationRequestId {get; set; } + [Newtonsoft.Json.JsonProperty(PropertyName = "x-ms-request-id")] + public string XMSRequestId {get; set; } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/OperationStatusOperations.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/OperationStatusOperations.cs index 507238cf7e23..158bd0ee82bd 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/OperationStatusOperations.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/OperationStatusOperations.cs @@ -80,6 +80,11 @@ internal OperationStatusOperations (StorageSyncManagementClient client) + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -96,11 +101,6 @@ internal OperationStatusOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (locationName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "locationName"); diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/Operations.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/Operations.cs index e9cc34757eb0..3ea353586a23 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/Operations.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/Operations.cs @@ -39,7 +39,7 @@ internal Operations (StorageSyncManagementClient client) public StorageSyncManagementClient Client { get; private set; } /// - /// Lists all of the available Storage Sync Rest API operations. + /// List the operations for the provider /// /// /// Headers that will be added to request. @@ -234,7 +234,7 @@ internal Operations (StorageSyncManagementClient client) } /// - /// Lists all of the available Storage Sync Rest API operations. + /// List the operations for the provider /// /// /// The NextLink from the previous successful call to List operation. diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/OperationsExtensions.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/OperationsExtensions.cs index c1b39b65b133..31b05307b28f 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/OperationsExtensions.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/OperationsExtensions.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.Management.StorageSync public static partial class OperationsExtensions { /// - /// Lists all of the available Storage Sync Rest API operations. + /// List the operations for the provider /// /// /// The operations group for this extension method. @@ -24,7 +24,7 @@ public static Microsoft.Rest.Azure.IPage List(this IOperations } /// - /// Lists all of the available Storage Sync Rest API operations. + /// List the operations for the provider /// /// /// The operations group for this extension method. @@ -40,7 +40,7 @@ public static Microsoft.Rest.Azure.IPage List(this IOperations } } /// - /// Lists all of the available Storage Sync Rest API operations. + /// List the operations for the provider /// /// /// The operations group for this extension method. @@ -54,7 +54,7 @@ public static Microsoft.Rest.Azure.IPage ListNext(this IOperati } /// - /// Lists all of the available Storage Sync Rest API operations. + /// List the operations for the provider /// /// /// The operations group for this extension method. diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/PrivateEndpointConnectionsOperations.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/PrivateEndpointConnectionsOperations.cs index eeca51c6ce41..5711ad72a208 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/PrivateEndpointConnectionsOperations.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/PrivateEndpointConnectionsOperations.cs @@ -39,19 +39,13 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien public StorageSyncManagementClient Client { get; private set; } /// - /// Gets the specified private endpoint connection associated with the storage - /// sync service. + /// Get a PrivateEndpointConnection List. /// /// /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. - /// - /// - /// The name of the private endpoint connection associated with the Azure - /// resource. + /// Name of Storage Sync Service resource. /// /// /// Headers that will be added to request. @@ -74,12 +68,18 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string privateEndpointConnectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task,PrivateEndpointConnectionsListByStorageSyncServiceHeaders>> ListByStorageSyncServiceWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + if (resourceGroupName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); @@ -100,17 +100,6 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - - - if (privateEndpointConnectionName == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "privateEndpointConnectionName"); - } - // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -120,20 +109,18 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("storageSyncServiceName", storageSyncServiceName); - tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByStorageSyncService", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"'))); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{storageSyncServiceName}", System.Uri.EscapeDataString(storageSyncServiceName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"'))); - _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (this.Client.ApiVersion != null) @@ -228,7 +215,7 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse,PrivateEndpointConnectionsListByStorageSyncServiceHeaders>(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -242,7 +229,7 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } catch (Newtonsoft.Json.JsonException ex) { @@ -254,6 +241,19 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); @@ -266,46 +266,14 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien } /// - /// Update the state of specified private endpoint connection associated with - /// the storage sync service. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// The name of the storage sync service name within the specified resource - /// group. - /// - /// - /// The name of the private endpoint connection associated with the Azure - /// resource. - /// - /// - /// The private endpoint connection properties. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string privateEndpointConnectionName, PrivateEndpointConnection properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // Send Request - Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, privateEndpointConnectionName, properties, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes the specified private endpoint connection associated with the - /// storage sync service. + /// Gets the specified private endpoint connection associated with the storage + /// sync service. /// /// /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. + /// Name of Storage Sync Service resource. /// /// /// The name of the private endpoint connection associated with the Azure @@ -317,28 +285,6 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien /// /// The cancellation token. /// - public async System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string privateEndpointConnectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // Send Request - Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, privateEndpointConnectionName, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a PrivateEndpointConnection List. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of Storage Sync Service resource. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// /// /// Thrown when the operation returned an invalid status code /// @@ -354,12 +300,17 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task,PrivateEndpointConnectionsListByStorageSyncServiceHeaders>> ListByStorageSyncServiceWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string privateEndpointConnectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -376,14 +327,14 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) + if (storageSyncServiceName == null) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); } - if (storageSyncServiceName == null) + if (privateEndpointConnectionName == null) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } // Tracing @@ -395,18 +346,20 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("storageSyncServiceName", storageSyncServiceName); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByStorageSyncService", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"'))); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{storageSyncServiceName}", System.Uri.EscapeDataString(storageSyncServiceName)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (this.Client.ApiVersion != null) @@ -501,7 +454,7 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse,PrivateEndpointConnectionsListByStorageSyncServiceHeaders>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -515,7 +468,7 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } catch (Newtonsoft.Json.JsonException ex) { @@ -527,19 +480,6 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } - try - { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); - } - catch (Newtonsoft.Json.JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); @@ -559,8 +499,64 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. + /// Name of Storage Sync Service resource. + /// + /// + /// The name of the private endpoint connection associated with the Azure + /// resource. + /// + /// + /// The private endpoint connection properties. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string privateEndpointConnectionName, PrivateEndpointConnection properties, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, privateEndpointConnectionName, properties, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes the specified private endpoint connection associated with the + /// storage sync service. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of Storage Sync Service resource. + /// + /// + /// The name of the private endpoint connection associated with the Azure + /// resource. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string privateEndpointConnectionName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, privateEndpointConnectionName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Update the state of specified private endpoint connection associated with + /// the storage sync service. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of Storage Sync Service resource. /// /// /// The name of the private endpoint connection associated with the Azure @@ -601,6 +597,12 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "properties"); } + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + if (resourceGroupName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); @@ -621,12 +623,6 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - - if (privateEndpointConnectionName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "privateEndpointConnectionName"); @@ -652,9 +648,9 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"'))); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{storageSyncServiceName}", System.Uri.EscapeDataString(storageSyncServiceName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"'))); _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); @@ -814,8 +810,7 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. + /// Name of Storage Sync Service resource. /// /// /// The name of the private endpoint connection associated with the Azure @@ -845,6 +840,12 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + if (resourceGroupName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); @@ -865,12 +866,6 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - - if (privateEndpointConnectionName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "privateEndpointConnectionName"); @@ -895,9 +890,9 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"'))); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{storageSyncServiceName}", System.Uri.EscapeDataString(storageSyncServiceName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"'))); _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); @@ -1024,6 +1019,196 @@ internal PrivateEndpointConnectionsOperations (StorageSyncManagementClient clien + } + /// + /// Get a PrivateEndpointConnection List. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task,PrivateEndpointConnectionsListByStorageSyncServiceHeaders>> ListByStorageSyncServiceNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByStorageSyncServiceNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + 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 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 (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new StorageSyncErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + StorageSyncError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse,PrivateEndpointConnectionsListByStorageSyncServiceHeaders>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/PrivateEndpointConnectionsOperationsExtensions.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/PrivateEndpointConnectionsOperationsExtensions.cs index d77921675f24..af7ef3b6225f 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/PrivateEndpointConnectionsOperationsExtensions.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/PrivateEndpointConnectionsOperationsExtensions.cs @@ -12,6 +12,45 @@ namespace Microsoft.Azure.Management.StorageSync /// public static partial class PrivateEndpointConnectionsOperationsExtensions { + /// + /// Get a PrivateEndpointConnection List. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of Storage Sync Service resource. + /// + public static Microsoft.Rest.Azure.IPage ListByStorageSyncService(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string storageSyncServiceName) + { + return ((IPrivateEndpointConnectionsOperations)operations).ListByStorageSyncServiceAsync(resourceGroupName, storageSyncServiceName).GetAwaiter().GetResult(); + } + + /// + /// Get a PrivateEndpointConnection List. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of Storage Sync Service resource. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListByStorageSyncServiceAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string storageSyncServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByStorageSyncServiceWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } /// /// Gets the specified private endpoint connection associated with the storage /// sync service. @@ -23,8 +62,7 @@ public static partial class PrivateEndpointConnectionsOperationsExtensions /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. + /// Name of Storage Sync Service resource. /// /// /// The name of the private endpoint connection associated with the Azure @@ -46,8 +84,7 @@ public static PrivateEndpointConnection Get(this IPrivateEndpointConnectionsOper /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. + /// Name of Storage Sync Service resource. /// /// /// The name of the private endpoint connection associated with the Azure @@ -74,8 +111,7 @@ public static PrivateEndpointConnection Get(this IPrivateEndpointConnectionsOper /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. + /// Name of Storage Sync Service resource. /// /// /// The name of the private endpoint connection associated with the Azure @@ -97,8 +133,7 @@ public static PrivateEndpointConnection Create(this IPrivateEndpointConnectionsO /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. + /// Name of Storage Sync Service resource. /// /// /// The name of the private endpoint connection associated with the Azure @@ -125,8 +160,7 @@ public static PrivateEndpointConnection Create(this IPrivateEndpointConnectionsO /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. + /// Name of Storage Sync Service resource. /// /// /// The name of the private endpoint connection associated with the Azure @@ -148,8 +182,7 @@ public static PrivateEndpointConnectionsDeleteHeaders Delete(this IPrivateEndpoi /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. + /// Name of Storage Sync Service resource. /// /// /// The name of the private endpoint connection associated with the Azure @@ -166,45 +199,6 @@ public static PrivateEndpointConnectionsDeleteHeaders Delete(this IPrivateEndpoi } } /// - /// Get a PrivateEndpointConnection List. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of Storage Sync Service resource. - /// - public static System.Collections.Generic.IEnumerable ListByStorageSyncService(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string storageSyncServiceName) - { - return ((IPrivateEndpointConnectionsOperations)operations).ListByStorageSyncServiceAsync(resourceGroupName, storageSyncServiceName).GetAwaiter().GetResult(); - } - - /// - /// Get a PrivateEndpointConnection List. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of Storage Sync Service resource. - /// - /// - /// The cancellation token. - /// - public static async System.Threading.Tasks.Task> ListByStorageSyncServiceAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string storageSyncServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - using (var _result = await operations.ListByStorageSyncServiceWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - /// /// Update the state of specified private endpoint connection associated with /// the storage sync service. /// @@ -215,8 +209,7 @@ public static System.Collections.Generic.IEnumerable /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. + /// Name of Storage Sync Service resource. /// /// /// The name of the private endpoint connection associated with the Azure @@ -238,8 +231,7 @@ public static PrivateEndpointConnection BeginCreate(this IPrivateEndpointConnect /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. + /// Name of Storage Sync Service resource. /// /// /// The name of the private endpoint connection associated with the Azure @@ -266,8 +258,7 @@ public static PrivateEndpointConnection BeginCreate(this IPrivateEndpointConnect /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. + /// Name of Storage Sync Service resource. /// /// /// The name of the private endpoint connection associated with the Azure @@ -289,8 +280,7 @@ public static PrivateEndpointConnectionsDeleteHeaders BeginDelete(this IPrivateE /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. + /// Name of Storage Sync Service resource. /// /// /// The name of the private endpoint connection associated with the Azure @@ -306,5 +296,38 @@ public static PrivateEndpointConnectionsDeleteHeaders BeginDelete(this IPrivateE return _result.Headers; } } + /// + /// Get a PrivateEndpointConnection List. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByStorageSyncServiceNext(this IPrivateEndpointConnectionsOperations operations, string nextPageLink) + { + return ((IPrivateEndpointConnectionsOperations)operations).ListByStorageSyncServiceNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get a PrivateEndpointConnection List. + /// + /// + /// 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> ListByStorageSyncServiceNextAsync(this IPrivateEndpointConnectionsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByStorageSyncServiceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } } } diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/PrivateLinkResourcesOperations.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/PrivateLinkResourcesOperations.cs index 05b7862d8cf6..b6219b7850ae 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/PrivateLinkResourcesOperations.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/PrivateLinkResourcesOperations.cs @@ -46,8 +46,7 @@ internal PrivateLinkResourcesOperations (StorageSyncManagementClient client) /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. + /// Name of Storage Sync Service resource. /// /// /// Headers that will be added to request. @@ -76,6 +75,12 @@ internal PrivateLinkResourcesOperations (StorageSyncManagementClient client) + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + if (resourceGroupName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); @@ -96,12 +101,6 @@ internal PrivateLinkResourcesOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - - // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -120,9 +119,9 @@ internal PrivateLinkResourcesOperations (StorageSyncManagementClient client) var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateLinkResources").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"'))); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{storageSyncServiceName}", System.Uri.EscapeDataString(storageSyncServiceName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"'))); System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (this.Client.ApiVersion != null) diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/PrivateLinkResourcesOperationsExtensions.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/PrivateLinkResourcesOperationsExtensions.cs index 3f9b7092c1ed..890557ca44ea 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/PrivateLinkResourcesOperationsExtensions.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/PrivateLinkResourcesOperationsExtensions.cs @@ -23,8 +23,7 @@ public static partial class PrivateLinkResourcesOperationsExtensions /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. + /// Name of Storage Sync Service resource. /// public static PrivateLinkResourceListResult ListByStorageSyncService(this IPrivateLinkResourcesOperations operations, string resourceGroupName, string storageSyncServiceName) { @@ -42,8 +41,7 @@ public static PrivateLinkResourceListResult ListByStorageSyncService(this IPriva /// The name of the resource group. The name is case insensitive. /// /// - /// The name of the storage sync service name within the specified resource - /// group. + /// Name of Storage Sync Service resource. /// /// /// The cancellation token. diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/RegisteredServersOperations.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/RegisteredServersOperations.cs index 0aaa88ca8db0..77b66676ce3e 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/RegisteredServersOperations.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/RegisteredServersOperations.cs @@ -68,12 +68,17 @@ internal RegisteredServersOperations (StorageSyncManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task,RegisteredServersListByStorageSyncServiceHeaders>> ListByStorageSyncServiceWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task,RegisteredServersListByStorageSyncServiceHeaders>> ListByStorageSyncServiceWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -90,11 +95,6 @@ internal RegisteredServersOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -215,7 +215,7 @@ internal RegisteredServersOperations (StorageSyncManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse,RegisteredServersListByStorageSyncServiceHeaders>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse,RegisteredServersListByStorageSyncServiceHeaders>(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -229,7 +229,7 @@ internal RegisteredServersOperations (StorageSyncManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } catch (Newtonsoft.Json.JsonException ex) { @@ -304,6 +304,11 @@ internal RegisteredServersOperations (StorageSyncManagementClient client) + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -320,11 +325,6 @@ internal RegisteredServersOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -593,7 +593,7 @@ internal RegisteredServersOperations (StorageSyncManagementClient client) /// Name of Storage Sync Service resource. /// /// - /// Server Id + /// GUID identifying the on-premises server. /// /// /// Certificate Data @@ -658,6 +658,11 @@ internal RegisteredServersOperations (StorageSyncManagementClient client) 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 (resourceGroupName == null) { @@ -674,11 +679,6 @@ internal RegisteredServersOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -909,6 +909,11 @@ internal RegisteredServersOperations (StorageSyncManagementClient client) { 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 (resourceGroupName == null) { @@ -925,11 +930,6 @@ internal RegisteredServersOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -1150,6 +1150,11 @@ internal RegisteredServersOperations (StorageSyncManagementClient client) + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -1166,11 +1171,6 @@ internal RegisteredServersOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -1340,7 +1340,7 @@ internal RegisteredServersOperations (StorageSyncManagementClient client) /// Name of Storage Sync Service resource. /// /// - /// Server Id + /// GUID identifying the on-premises server. /// /// /// Certificate Data @@ -1369,6 +1369,11 @@ internal RegisteredServersOperations (StorageSyncManagementClient client) + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -1385,11 +1390,6 @@ internal RegisteredServersOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -1560,6 +1560,196 @@ internal RegisteredServersOperations (StorageSyncManagementClient client) + } + /// + /// Get a given registered server list. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task,RegisteredServersListByStorageSyncServiceHeaders>> ListByStorageSyncServiceNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByStorageSyncServiceNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + 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 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 (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new StorageSyncErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + StorageSyncError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse,RegisteredServersListByStorageSyncServiceHeaders>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/RegisteredServersOperationsExtensions.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/RegisteredServersOperationsExtensions.cs index 8d77df9d707d..f6b027cb4890 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/RegisteredServersOperationsExtensions.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/RegisteredServersOperationsExtensions.cs @@ -24,7 +24,7 @@ public static partial class RegisteredServersOperationsExtensions /// /// Name of Storage Sync Service resource. /// - public static System.Collections.Generic.IEnumerable ListByStorageSyncService(this IRegisteredServersOperations operations, string resourceGroupName, string storageSyncServiceName) + public static Microsoft.Rest.Azure.IPage ListByStorageSyncService(this IRegisteredServersOperations operations, string resourceGroupName, string storageSyncServiceName) { return ((IRegisteredServersOperations)operations).ListByStorageSyncServiceAsync(resourceGroupName, storageSyncServiceName).GetAwaiter().GetResult(); } @@ -44,7 +44,7 @@ public static System.Collections.Generic.IEnumerable ListBySto /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task> ListByStorageSyncServiceAsync(this IRegisteredServersOperations operations, string resourceGroupName, string storageSyncServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task> ListByStorageSyncServiceAsync(this IRegisteredServersOperations operations, string resourceGroupName, string storageSyncServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.ListByStorageSyncServiceWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, null, cancellationToken).ConfigureAwait(false)) { @@ -244,7 +244,7 @@ public static RegisteredServersDeleteHeaders Delete(this IRegisteredServersOpera /// Name of Storage Sync Service resource. /// /// - /// Server Id + /// GUID identifying the on-premises server. /// public static RegisteredServersTriggerRolloverHeaders TriggerRollover(this IRegisteredServersOperations operations, string resourceGroupName, string storageSyncServiceName, string serverId, string serverCertificate = default(string)) { @@ -264,7 +264,7 @@ public static RegisteredServersDeleteHeaders Delete(this IRegisteredServersOpera /// Name of Storage Sync Service resource. /// /// - /// Server Id + /// GUID identifying the on-premises server. /// /// /// The cancellation token. @@ -424,7 +424,7 @@ public static RegisteredServersDeleteHeaders BeginDelete(this IRegisteredServers /// Name of Storage Sync Service resource. /// /// - /// Server Id + /// GUID identifying the on-premises server. /// public static RegisteredServersTriggerRolloverHeaders BeginTriggerRollover(this IRegisteredServersOperations operations, string resourceGroupName, string storageSyncServiceName, string serverId, string serverCertificate = default(string)) { @@ -444,7 +444,7 @@ public static RegisteredServersDeleteHeaders BeginDelete(this IRegisteredServers /// Name of Storage Sync Service resource. /// /// - /// Server Id + /// GUID identifying the on-premises server. /// /// /// The cancellation token. @@ -456,5 +456,38 @@ public static RegisteredServersDeleteHeaders BeginDelete(this IRegisteredServers return _result.Headers; } } + /// + /// Get a given registered server list. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByStorageSyncServiceNext(this IRegisteredServersOperations operations, string nextPageLink) + { + return ((IRegisteredServersOperations)operations).ListByStorageSyncServiceNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get a given registered server list. + /// + /// + /// 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> ListByStorageSyncServiceNextAsync(this IRegisteredServersOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByStorageSyncServiceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } } } diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/ServerEndpointsOperations.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/ServerEndpointsOperations.cs index 7d409a243b75..90906ef1f1b0 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/ServerEndpointsOperations.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/ServerEndpointsOperations.cs @@ -39,69 +39,7 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) public StorageSyncManagementClient Client { get; private set; } /// - /// Create a new ServerEndpoint. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of Storage Sync Service resource. - /// - /// - /// Name of Sync Group resource. - /// - /// - /// Name of Server Endpoint object. - /// - /// - /// Body of Server Endpoint object. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, ServerEndpointCreateParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // Send Request - Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Patch a given ServerEndpoint. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of Storage Sync Service resource. - /// - /// - /// Name of Sync Group resource. - /// - /// - /// Name of Server Endpoint object. - /// - /// - /// Any of the properties applicable in PUT request. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, ServerEndpointUpdateParameters parameters = default(ServerEndpointUpdateParameters), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // Send Request - Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a ServerEndpoint. + /// Get a ServerEndpoint list. /// /// /// The name of the resource group. The name is case insensitive. @@ -112,9 +50,6 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) /// /// Name of Sync Group resource. /// - /// - /// Name of Server Endpoint object. - /// /// /// Headers that will be added to request. /// @@ -136,12 +71,17 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task,ServerEndpointsListBySyncGroupHeaders>> ListBySyncGroupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -158,11 +98,6 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -173,11 +108,6 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName"); } - if (serverEndpointName == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "serverEndpointName"); - } - // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -188,21 +118,19 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("storageSyncServiceName", storageSyncServiceName); tracingParameters.Add("syncGroupName", syncGroupName); - tracingParameters.Add("serverEndpointName", serverEndpointName); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySyncGroup", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints/{serverEndpointName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"'))); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{storageSyncServiceName}", System.Uri.EscapeDataString(storageSyncServiceName)); _url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName)); - _url = _url.Replace("{serverEndpointName}", System.Uri.EscapeDataString(serverEndpointName)); System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (this.Client.ApiVersion != null) @@ -297,7 +225,7 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse,ServerEndpointsListBySyncGroupHeaders>(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -311,7 +239,7 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } catch (Newtonsoft.Json.JsonException ex) { @@ -325,7 +253,7 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } catch (Newtonsoft.Json.JsonException ex) { @@ -348,7 +276,7 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) } /// - /// Delete a given ServerEndpoint. + /// Get a ServerEndpoint. /// /// /// The name of the resource group. The name is case insensitive. @@ -368,31 +296,6 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) /// /// The cancellation token. /// - public async System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // Send Request - Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a ServerEndpoint list. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of Storage Sync Service resource. - /// - /// - /// Name of Sync Group resource. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// /// /// Thrown when the operation returned an invalid status code /// @@ -408,12 +311,17 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task,ServerEndpointsListBySyncGroupHeaders>> ListBySyncGroupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -430,11 +338,6 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -445,6 +348,11 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName"); } + if (serverEndpointName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "serverEndpointName"); + } + // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -455,19 +363,21 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("storageSyncServiceName", storageSyncServiceName); tracingParameters.Add("syncGroupName", syncGroupName); + tracingParameters.Add("serverEndpointName", serverEndpointName); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySyncGroup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints/{serverEndpointName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"'))); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{storageSyncServiceName}", System.Uri.EscapeDataString(storageSyncServiceName)); _url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName)); + _url = _url.Replace("{serverEndpointName}", System.Uri.EscapeDataString(serverEndpointName)); System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (this.Client.ApiVersion != null) @@ -562,7 +472,7 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse,ServerEndpointsListBySyncGroupHeaders>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -576,7 +486,7 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } catch (Newtonsoft.Json.JsonException ex) { @@ -590,7 +500,7 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } catch (Newtonsoft.Json.JsonException ex) { @@ -612,6 +522,96 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) } + /// + /// Create a new ServerEndpoint. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of Storage Sync Service resource. + /// + /// + /// Name of Sync Group resource. + /// + /// + /// Name of Server Endpoint object. + /// + /// + /// Body of Server Endpoint object. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, ServerEndpointCreateParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Patch a given ServerEndpoint. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of Storage Sync Service resource. + /// + /// + /// Name of Sync Group resource. + /// + /// + /// Name of Server Endpoint object. + /// + /// + /// Any of the properties applicable in PUT request. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, ServerEndpointUpdateParameters parameters = default(ServerEndpointUpdateParameters), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete a given ServerEndpoint. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of Storage Sync Service resource. + /// + /// + /// Name of Sync Group resource. + /// + /// + /// Name of Server Endpoint object. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + /// /// Recall a server endpoint. /// @@ -696,6 +696,11 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) { parameters.Validate(); } + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -712,11 +717,6 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -953,6 +953,11 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -969,11 +974,6 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -1204,6 +1204,11 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -1220,11 +1225,6 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -1438,6 +1438,11 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) 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 (resourceGroupName == null) { @@ -1454,11 +1459,6 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -1631,6 +1631,196 @@ internal ServerEndpointsOperations (StorageSyncManagementClient client) + } + /// + /// Get a ServerEndpoint list. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task,ServerEndpointsListBySyncGroupHeaders>> ListBySyncGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySyncGroupNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + 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 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 (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new StorageSyncErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + StorageSyncError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse,ServerEndpointsListBySyncGroupHeaders>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/ServerEndpointsOperationsExtensions.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/ServerEndpointsOperationsExtensions.cs index 8802b3c6a416..a53228e926e1 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/ServerEndpointsOperationsExtensions.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/ServerEndpointsOperationsExtensions.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.Management.StorageSync public static partial class ServerEndpointsOperationsExtensions { /// - /// Create a new ServerEndpoint. + /// Get a ServerEndpoint list. /// /// /// The operations group for this extension method. @@ -27,16 +27,13 @@ public static partial class ServerEndpointsOperationsExtensions /// /// Name of Sync Group resource. /// - /// - /// Name of Server Endpoint object. - /// - public static ServerEndpoint Create(this IServerEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, ServerEndpointCreateParameters parameters) + public static Microsoft.Rest.Azure.IPage ListBySyncGroup(this IServerEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName) { - return ((IServerEndpointsOperations)operations).CreateAsync(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters).GetAwaiter().GetResult(); + return ((IServerEndpointsOperations)operations).ListBySyncGroupAsync(resourceGroupName, storageSyncServiceName, syncGroupName).GetAwaiter().GetResult(); } /// - /// Create a new ServerEndpoint. + /// Get a ServerEndpoint list. /// /// /// The operations group for this extension method. @@ -50,21 +47,18 @@ public static ServerEndpoint Create(this IServerEndpointsOperations operations, /// /// Name of Sync Group resource. /// - /// - /// Name of Server Endpoint object. - /// /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task CreateAsync(this IServerEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, ServerEndpointCreateParameters parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task> ListBySyncGroupAsync(this IServerEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListBySyncGroupWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Patch a given ServerEndpoint. + /// Get a ServerEndpoint. /// /// /// The operations group for this extension method. @@ -81,13 +75,13 @@ public static ServerEndpoint Create(this IServerEndpointsOperations operations, /// /// Name of Server Endpoint object. /// - public static ServerEndpoint Update(this IServerEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, ServerEndpointUpdateParameters parameters = default(ServerEndpointUpdateParameters)) + public static ServerEndpoint Get(this IServerEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName) { - return ((IServerEndpointsOperations)operations).UpdateAsync(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters).GetAwaiter().GetResult(); + return ((IServerEndpointsOperations)operations).GetAsync(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName).GetAwaiter().GetResult(); } /// - /// Patch a given ServerEndpoint. + /// Get a ServerEndpoint. /// /// /// The operations group for this extension method. @@ -107,15 +101,15 @@ public static ServerEndpoint Create(this IServerEndpointsOperations operations, /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task UpdateAsync(this IServerEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, ServerEndpointUpdateParameters parameters = default(ServerEndpointUpdateParameters), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task GetAsync(this IServerEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Get a ServerEndpoint. + /// Create a new ServerEndpoint. /// /// /// The operations group for this extension method. @@ -132,13 +126,13 @@ public static ServerEndpoint Create(this IServerEndpointsOperations operations, /// /// Name of Server Endpoint object. /// - public static ServerEndpoint Get(this IServerEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName) + public static ServerEndpoint Create(this IServerEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, ServerEndpointCreateParameters parameters) { - return ((IServerEndpointsOperations)operations).GetAsync(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName).GetAwaiter().GetResult(); + return ((IServerEndpointsOperations)operations).CreateAsync(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters).GetAwaiter().GetResult(); } /// - /// Get a ServerEndpoint. + /// Create a new ServerEndpoint. /// /// /// The operations group for this extension method. @@ -158,15 +152,15 @@ public static ServerEndpoint Get(this IServerEndpointsOperations operations, str /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task GetAsync(this IServerEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task CreateAsync(this IServerEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, ServerEndpointCreateParameters parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Delete a given ServerEndpoint. + /// Patch a given ServerEndpoint. /// /// /// The operations group for this extension method. @@ -183,13 +177,13 @@ public static ServerEndpoint Get(this IServerEndpointsOperations operations, str /// /// Name of Server Endpoint object. /// - public static ServerEndpointsDeleteHeaders Delete(this IServerEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName) + public static ServerEndpoint Update(this IServerEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, ServerEndpointUpdateParameters parameters = default(ServerEndpointUpdateParameters)) { - return ((IServerEndpointsOperations)operations).DeleteAsync(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName).GetAwaiter().GetResult(); + return ((IServerEndpointsOperations)operations).UpdateAsync(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters).GetAwaiter().GetResult(); } /// - /// Delete a given ServerEndpoint. + /// Patch a given ServerEndpoint. /// /// /// The operations group for this extension method. @@ -209,15 +203,15 @@ public static ServerEndpointsDeleteHeaders Delete(this IServerEndpointsOperation /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task DeleteAsync(this IServerEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task UpdateAsync(this IServerEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, ServerEndpointUpdateParameters parameters = default(ServerEndpointUpdateParameters), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, parameters, null, cancellationToken).ConfigureAwait(false)) { - return _result.Headers; + return _result.Body; } } /// - /// Get a ServerEndpoint list. + /// Delete a given ServerEndpoint. /// /// /// The operations group for this extension method. @@ -231,13 +225,16 @@ public static ServerEndpointsDeleteHeaders Delete(this IServerEndpointsOperation /// /// Name of Sync Group resource. /// - public static System.Collections.Generic.IEnumerable ListBySyncGroup(this IServerEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName) + /// + /// Name of Server Endpoint object. + /// + public static ServerEndpointsDeleteHeaders Delete(this IServerEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName) { - return ((IServerEndpointsOperations)operations).ListBySyncGroupAsync(resourceGroupName, storageSyncServiceName, syncGroupName).GetAwaiter().GetResult(); + return ((IServerEndpointsOperations)operations).DeleteAsync(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName).GetAwaiter().GetResult(); } /// - /// Get a ServerEndpoint list. + /// Delete a given ServerEndpoint. /// /// /// The operations group for this extension method. @@ -251,14 +248,17 @@ public static System.Collections.Generic.IEnumerable ListBySyncG /// /// Name of Sync Group resource. /// + /// + /// Name of Server Endpoint object. + /// /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task> ListBySyncGroupAsync(this IServerEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task DeleteAsync(this IServerEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.ListBySyncGroupWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, serverEndpointName, null, cancellationToken).ConfigureAwait(false)) { - return _result.Body; + return _result.Headers; } } /// @@ -516,5 +516,38 @@ public static ServerEndpointsRecallActionHeaders BeginRecallAction(this IServerE return _result.Headers; } } + /// + /// Get a ServerEndpoint list. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListBySyncGroupNext(this IServerEndpointsOperations operations, string nextPageLink) + { + return ((IServerEndpointsOperations)operations).ListBySyncGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get a ServerEndpoint list. + /// + /// + /// 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> ListBySyncGroupNextAsync(this IServerEndpointsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListBySyncGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } } } diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/StorageSyncManagementClient.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/StorageSyncManagementClient.cs index ba2f5f8b8c4f..af7950a8dee6 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/StorageSyncManagementClient.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/StorageSyncManagementClient.cs @@ -70,14 +70,22 @@ public partial class StorageSyncManagementClient : Microsoft.Rest.ServiceClient< /// public virtual IStorageSyncServicesOperations StorageSyncServices { get; private set; } /// - /// Gets the IPrivateLinkResourcesOperations + /// Gets the IOperationStatusOperations /// - public virtual IPrivateLinkResourcesOperations PrivateLinkResources { get; private set; } + public virtual IOperationStatusOperations OperationStatus { get; private set; } /// /// Gets the IPrivateEndpointConnectionsOperations /// public virtual IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; private set; } /// + /// Gets the IPrivateLinkResourcesOperations + /// + public virtual IPrivateLinkResourcesOperations PrivateLinkResources { get; private set; } + /// + /// Gets the IRegisteredServersOperations + /// + public virtual IRegisteredServersOperations RegisteredServers { get; private set; } + /// /// Gets the ISyncGroupsOperations /// public virtual ISyncGroupsOperations SyncGroups { get; private set; } @@ -90,18 +98,10 @@ public partial class StorageSyncManagementClient : Microsoft.Rest.ServiceClient< /// public virtual IServerEndpointsOperations ServerEndpoints { get; private set; } /// - /// Gets the IRegisteredServersOperations - /// - public virtual IRegisteredServersOperations RegisteredServers { get; private set; } - /// /// Gets the IWorkflowsOperations /// public virtual IWorkflowsOperations Workflows { get; private set; } /// - /// Gets the IOperationStatusOperations - /// - public virtual IOperationStatusOperations OperationStatus { get; private set; } - /// /// Initializes a new instance of the StorageSyncManagementClient class. /// /// @@ -341,14 +341,14 @@ private void Initialize() { this.Operations = new Operations(this); this.StorageSyncServices = new StorageSyncServicesOperations(this); - this.PrivateLinkResources = new PrivateLinkResourcesOperations(this); + this.OperationStatus = new OperationStatusOperations(this); this.PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this); + this.PrivateLinkResources = new PrivateLinkResourcesOperations(this); + this.RegisteredServers = new RegisteredServersOperations(this); this.SyncGroups = new SyncGroupsOperations(this); this.CloudEndpoints = new CloudEndpointsOperations(this); this.ServerEndpoints = new ServerEndpointsOperations(this); - this.RegisteredServers = new RegisteredServersOperations(this); this.Workflows = new WorkflowsOperations(this); - this.OperationStatus = new OperationStatusOperations(this); this.BaseUri = new System.Uri("https://management.azure.com"); this.ApiVersion = "2022-09-01"; this.AcceptLanguage = "en-US"; @@ -420,12 +420,12 @@ private void Initialize() - if (this.ApiVersion == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.ApiVersion"); } + if (locationName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "locationName"); diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/StorageSyncServicesOperations.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/StorageSyncServicesOperations.cs index a4e76b62af53..52917db6f35f 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/StorageSyncServicesOperations.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/StorageSyncServicesOperations.cs @@ -74,17 +74,17 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) - if (locationName == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "locationName"); - } - if (this.Client.ApiVersion == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (locationName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "locationName"); + } + CheckNameAvailabilityParameters parameters = new CheckNameAvailabilityParameters(); if(name != null) { @@ -108,8 +108,8 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) var _baseUrl = this.Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.StorageSync/locations/{locationName}/checkNameAvailability").ToString(); - _url = _url.Replace("{locationName}", System.Uri.EscapeDataString(locationName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"'))); + _url = _url.Replace("{locationName}", System.Uri.EscapeDataString(locationName)); System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (this.Client.ApiVersion != null) @@ -248,39 +248,8 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) } /// - /// Create a new StorageSyncService. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of Storage Sync Service resource. - /// - /// - /// Storage Sync Service resource name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, StorageSyncServiceCreateParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // Send Request - Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a given StorageSyncService. + /// Get a StorageSyncService list by subscription. /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of Storage Sync Service resource. - /// /// /// Headers that will be added to request. /// @@ -302,38 +271,18 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task,StorageSyncServicesListBySubscriptionHeaders>> ListBySubscriptionWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - - if (resourceGroupName == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); - } - } - if (storageSyncServiceName == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); - } - if (this.Client.ApiVersion == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -341,20 +290,16 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) { _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("storageSyncServiceName", storageSyncServiceName); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.StorageSync/storageSyncServices").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"'))); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{storageSyncServiceName}", System.Uri.EscapeDataString(storageSyncServiceName)); System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (this.Client.ApiVersion != null) @@ -449,7 +394,7 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse,StorageSyncServicesListBySubscriptionHeaders>(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -463,7 +408,7 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } catch (Newtonsoft.Json.JsonException ex) { @@ -477,7 +422,7 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } catch (Newtonsoft.Json.JsonException ex) { @@ -499,53 +444,6 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) } - /// - /// Patch a given StorageSyncService. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of Storage Sync Service resource. - /// - /// - /// Storage Sync Service resource. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, StorageSyncServiceUpdateParameters parameters = default(StorageSyncServiceUpdateParameters), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // Send Request - Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete a given StorageSyncService. - /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of Storage Sync Service resource. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // Send Request - Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - /// /// Get a StorageSyncService list by Resource group name. /// @@ -573,12 +471,17 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task,StorageSyncServicesListByResourceGroupHeaders>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task,StorageSyncServicesListByResourceGroupHeaders>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -595,11 +498,6 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -713,7 +611,7 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse,StorageSyncServicesListByResourceGroupHeaders>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse,StorageSyncServicesListByResourceGroupHeaders>(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -727,7 +625,7 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } catch (Newtonsoft.Json.JsonException ex) { @@ -764,8 +662,14 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) } /// - /// Get a StorageSyncService list by subscription. + /// Get a given StorageSyncService. /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of Storage Sync Service resource. + /// /// /// Headers that will be added to request. /// @@ -787,18 +691,38 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task,StorageSyncServicesListBySubscriptionHeaders>> ListBySubscriptionWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (this.Client.ApiVersion == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (storageSyncServiceName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); + } + // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -806,16 +730,20 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) { _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("storageSyncServiceName", storageSyncServiceName); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.StorageSync/storageSyncServices").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(this.Client.SubscriptionId, this.Client.SerializationSettings).Trim('"'))); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{storageSyncServiceName}", System.Uri.EscapeDataString(storageSyncServiceName)); System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); if (this.Client.ApiVersion != null) @@ -910,7 +838,7 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse,StorageSyncServicesListBySubscriptionHeaders>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -924,7 +852,7 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } catch (Newtonsoft.Json.JsonException ex) { @@ -938,7 +866,7 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } catch (Newtonsoft.Json.JsonException ex) { @@ -960,6 +888,78 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) } + /// + /// Create a new StorageSyncService. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of Storage Sync Service resource. + /// + /// + /// Storage Sync Service resource name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, StorageSyncServiceCreateParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Patch a given StorageSyncService. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of Storage Sync Service resource. + /// + /// + /// Storage Sync Service resource. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, StorageSyncServiceUpdateParameters parameters = default(StorageSyncServiceUpdateParameters), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete a given StorageSyncService. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of Storage Sync Service resource. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + /// /// Create a new StorageSyncService. /// @@ -1007,10 +1007,15 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) { parameters.Validate(); } - - if (resourceGroupName == null) + if (this.Client.ApiVersion == null) { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + + + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { @@ -1023,11 +1028,6 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -1244,6 +1244,11 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -1260,11 +1265,6 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -1475,6 +1475,11 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -1491,11 +1496,6 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -1647,6 +1647,386 @@ internal StorageSyncServicesOperations (StorageSyncManagementClient client) + } + /// + /// Get a StorageSyncService list by subscription. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task,StorageSyncServicesListBySubscriptionHeaders>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + 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 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 (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new StorageSyncErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + StorageSyncError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse,StorageSyncServicesListBySubscriptionHeaders>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Get a StorageSyncService list by Resource group name. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task,StorageSyncServicesListByResourceGroupHeaders>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + 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 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 (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new StorageSyncErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + StorageSyncError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse,StorageSyncServicesListByResourceGroupHeaders>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/StorageSyncServicesOperationsExtensions.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/StorageSyncServicesOperationsExtensions.cs index 0769fce9424c..38befa0013fb 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/StorageSyncServicesOperationsExtensions.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/StorageSyncServicesOperationsExtensions.cs @@ -46,46 +46,34 @@ public static CheckNameAvailabilityResult CheckNameAvailability(this IStorageSyn } } /// - /// Create a new StorageSyncService. + /// Get a StorageSyncService list by subscription. /// /// /// The operations group for this extension method. /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of Storage Sync Service resource. - /// - public static StorageSyncService Create(this IStorageSyncServicesOperations operations, string resourceGroupName, string storageSyncServiceName, StorageSyncServiceCreateParameters parameters) + public static Microsoft.Rest.Azure.IPage ListBySubscription(this IStorageSyncServicesOperations operations) { - return ((IStorageSyncServicesOperations)operations).CreateAsync(resourceGroupName, storageSyncServiceName, parameters).GetAwaiter().GetResult(); + return ((IStorageSyncServicesOperations)operations).ListBySubscriptionAsync().GetAwaiter().GetResult(); } /// - /// Create a new StorageSyncService. + /// Get a StorageSyncService list by subscription. /// /// /// The operations group for this extension method. /// - /// - /// The name of the resource group. The name is case insensitive. - /// - /// - /// Name of Storage Sync Service resource. - /// /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task CreateAsync(this IStorageSyncServicesOperations operations, string resourceGroupName, string storageSyncServiceName, StorageSyncServiceCreateParameters parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task> ListBySubscriptionAsync(this IStorageSyncServicesOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Get a given StorageSyncService. + /// Get a StorageSyncService list by Resource group name. /// /// /// The operations group for this extension method. @@ -93,16 +81,13 @@ public static StorageSyncService Create(this IStorageSyncServicesOperations oper /// /// The name of the resource group. The name is case insensitive. /// - /// - /// Name of Storage Sync Service resource. - /// - public static StorageSyncService Get(this IStorageSyncServicesOperations operations, string resourceGroupName, string storageSyncServiceName) + public static Microsoft.Rest.Azure.IPage ListByResourceGroup(this IStorageSyncServicesOperations operations, string resourceGroupName) { - return ((IStorageSyncServicesOperations)operations).GetAsync(resourceGroupName, storageSyncServiceName).GetAwaiter().GetResult(); + return ((IStorageSyncServicesOperations)operations).ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); } /// - /// Get a given StorageSyncService. + /// Get a StorageSyncService list by Resource group name. /// /// /// The operations group for this extension method. @@ -110,21 +95,18 @@ public static StorageSyncService Get(this IStorageSyncServicesOperations operati /// /// The name of the resource group. The name is case insensitive. /// - /// - /// Name of Storage Sync Service resource. - /// /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task GetAsync(this IStorageSyncServicesOperations operations, string resourceGroupName, string storageSyncServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task> ListByResourceGroupAsync(this IStorageSyncServicesOperations operations, string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Patch a given StorageSyncService. + /// Get a given StorageSyncService. /// /// /// The operations group for this extension method. @@ -135,13 +117,13 @@ public static StorageSyncService Get(this IStorageSyncServicesOperations operati /// /// Name of Storage Sync Service resource. /// - public static StorageSyncService Update(this IStorageSyncServicesOperations operations, string resourceGroupName, string storageSyncServiceName, StorageSyncServiceUpdateParameters parameters = default(StorageSyncServiceUpdateParameters)) + public static StorageSyncService Get(this IStorageSyncServicesOperations operations, string resourceGroupName, string storageSyncServiceName) { - return ((IStorageSyncServicesOperations)operations).UpdateAsync(resourceGroupName, storageSyncServiceName, parameters).GetAwaiter().GetResult(); + return ((IStorageSyncServicesOperations)operations).GetAsync(resourceGroupName, storageSyncServiceName).GetAwaiter().GetResult(); } /// - /// Patch a given StorageSyncService. + /// Get a given StorageSyncService. /// /// /// The operations group for this extension method. @@ -155,15 +137,15 @@ public static StorageSyncService Get(this IStorageSyncServicesOperations operati /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task UpdateAsync(this IStorageSyncServicesOperations operations, string resourceGroupName, string storageSyncServiceName, StorageSyncServiceUpdateParameters parameters = default(StorageSyncServiceUpdateParameters), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task GetAsync(this IStorageSyncServicesOperations operations, string resourceGroupName, string storageSyncServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Delete a given StorageSyncService. + /// Create a new StorageSyncService. /// /// /// The operations group for this extension method. @@ -174,13 +156,13 @@ public static StorageSyncService Get(this IStorageSyncServicesOperations operati /// /// Name of Storage Sync Service resource. /// - public static StorageSyncServicesDeleteHeaders Delete(this IStorageSyncServicesOperations operations, string resourceGroupName, string storageSyncServiceName) + public static StorageSyncService Create(this IStorageSyncServicesOperations operations, string resourceGroupName, string storageSyncServiceName, StorageSyncServiceCreateParameters parameters) { - return ((IStorageSyncServicesOperations)operations).DeleteAsync(resourceGroupName, storageSyncServiceName).GetAwaiter().GetResult(); + return ((IStorageSyncServicesOperations)operations).CreateAsync(resourceGroupName, storageSyncServiceName, parameters).GetAwaiter().GetResult(); } /// - /// Delete a given StorageSyncService. + /// Create a new StorageSyncService. /// /// /// The operations group for this extension method. @@ -194,15 +176,15 @@ public static StorageSyncServicesDeleteHeaders Delete(this IStorageSyncServicesO /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task DeleteAsync(this IStorageSyncServicesOperations operations, string resourceGroupName, string storageSyncServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task CreateAsync(this IStorageSyncServicesOperations operations, string resourceGroupName, string storageSyncServiceName, StorageSyncServiceCreateParameters parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, parameters, null, cancellationToken).ConfigureAwait(false)) { - return _result.Headers; + return _result.Body; } } /// - /// Get a StorageSyncService list by Resource group name. + /// Patch a given StorageSyncService. /// /// /// The operations group for this extension method. @@ -210,13 +192,16 @@ public static StorageSyncServicesDeleteHeaders Delete(this IStorageSyncServicesO /// /// The name of the resource group. The name is case insensitive. /// - public static System.Collections.Generic.IEnumerable ListByResourceGroup(this IStorageSyncServicesOperations operations, string resourceGroupName) + /// + /// Name of Storage Sync Service resource. + /// + public static StorageSyncService Update(this IStorageSyncServicesOperations operations, string resourceGroupName, string storageSyncServiceName, StorageSyncServiceUpdateParameters parameters = default(StorageSyncServiceUpdateParameters)) { - return ((IStorageSyncServicesOperations)operations).ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); + return ((IStorageSyncServicesOperations)operations).UpdateAsync(resourceGroupName, storageSyncServiceName, parameters).GetAwaiter().GetResult(); } /// - /// Get a StorageSyncService list by Resource group name. + /// Patch a given StorageSyncService. /// /// /// The operations group for this extension method. @@ -224,41 +209,56 @@ public static System.Collections.Generic.IEnumerable ListByR /// /// The name of the resource group. The name is case insensitive. /// + /// + /// Name of Storage Sync Service resource. + /// /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task> ListByResourceGroupAsync(this IStorageSyncServicesOperations operations, string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task UpdateAsync(this IStorageSyncServicesOperations operations, string resourceGroupName, string storageSyncServiceName, StorageSyncServiceUpdateParameters parameters = default(StorageSyncServiceUpdateParameters), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, parameters, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Get a StorageSyncService list by subscription. + /// Delete a given StorageSyncService. /// /// /// The operations group for this extension method. /// - public static System.Collections.Generic.IEnumerable ListBySubscription(this IStorageSyncServicesOperations operations) + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of Storage Sync Service resource. + /// + public static StorageSyncServicesDeleteHeaders Delete(this IStorageSyncServicesOperations operations, string resourceGroupName, string storageSyncServiceName) { - return ((IStorageSyncServicesOperations)operations).ListBySubscriptionAsync().GetAwaiter().GetResult(); + return ((IStorageSyncServicesOperations)operations).DeleteAsync(resourceGroupName, storageSyncServiceName).GetAwaiter().GetResult(); } /// - /// Get a StorageSyncService list by subscription. + /// Delete a given StorageSyncService. /// /// /// The operations group for this extension method. /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Name of Storage Sync Service resource. + /// /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task> ListBySubscriptionAsync(this IStorageSyncServicesOperations operations, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task DeleteAsync(this IStorageSyncServicesOperations operations, string resourceGroupName, string storageSyncServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, null, cancellationToken).ConfigureAwait(false)) { - return _result.Body; + return _result.Headers; } } /// @@ -378,5 +378,71 @@ public static StorageSyncServicesDeleteHeaders BeginDelete(this IStorageSyncServ return _result.Headers; } } + /// + /// Get a StorageSyncService list by subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListBySubscriptionNext(this IStorageSyncServicesOperations operations, string nextPageLink) + { + return ((IStorageSyncServicesOperations)operations).ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get a StorageSyncService list by 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> ListBySubscriptionNextAsync(this IStorageSyncServicesOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Get a StorageSyncService list by Resource group name. + /// + /// + /// 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 IStorageSyncServicesOperations operations, string nextPageLink) + { + return ((IStorageSyncServicesOperations)operations).ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get a StorageSyncService list by Resource group name. + /// + /// + /// 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 IStorageSyncServicesOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } } } diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/SyncGroupsOperations.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/SyncGroupsOperations.cs index 487742e2d962..e88977cbf844 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/SyncGroupsOperations.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/SyncGroupsOperations.cs @@ -68,12 +68,17 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task,SyncGroupsListByStorageSyncServiceHeaders>> ListByStorageSyncServiceWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task,SyncGroupsListByStorageSyncServiceHeaders>> ListByStorageSyncServiceWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -90,11 +95,6 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -215,7 +215,7 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse,SyncGroupsListByStorageSyncServiceHeaders>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse,SyncGroupsListByStorageSyncServiceHeaders>(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -229,7 +229,7 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } catch (Newtonsoft.Json.JsonException ex) { @@ -266,7 +266,7 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) } /// - /// Create a new SyncGroup. + /// Get a given SyncGroup. /// /// /// The name of the resource group. The name is case insensitive. @@ -277,9 +277,6 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) /// /// Name of Sync Group resource. /// - /// - /// The parameters used to create the sync group - /// /// /// Headers that will be added to request. /// @@ -301,12 +298,17 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, object properties = default(object), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -323,11 +325,6 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -338,11 +335,6 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName"); } - SyncGroupCreateParameters parameters = new SyncGroupCreateParameters(); - if(properties != null) - { - parameters.Properties = properties; - } // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -354,10 +346,9 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) tracingParameters.Add("storageSyncServiceName", storageSyncServiceName); tracingParameters.Add("syncGroupName", syncGroupName); - tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL @@ -380,7 +371,7 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) // Create HTTP transport objects var _httpRequest = new System.Net.Http.HttpRequestMessage(); System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) @@ -409,12 +400,6 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) } // Serialize Request string _requestContent = null; - if(parameters != null) - { - _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 (this.Client.Credentials != null) { @@ -467,7 +452,7 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -495,7 +480,7 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } catch (Newtonsoft.Json.JsonException ex) { @@ -518,7 +503,7 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) } /// - /// Get a given SyncGroup. + /// Create a new SyncGroup. /// /// /// The name of the resource group. The name is case insensitive. @@ -529,6 +514,9 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) /// /// Name of Sync Group resource. /// + /// + /// The parameters used to create the sync group + /// /// /// Headers that will be added to request. /// @@ -550,12 +538,17 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, object properties = default(object), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -572,11 +565,6 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -587,6 +575,11 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName"); } + SyncGroupCreateParameters parameters = new SyncGroupCreateParameters(); + if(properties != null) + { + parameters.Properties = properties; + } // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -598,9 +591,10 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) tracingParameters.Add("storageSyncServiceName", storageSyncServiceName); tracingParameters.Add("syncGroupName", syncGroupName); + tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters); } // Construct URL @@ -623,7 +617,7 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) // Create HTTP transport objects var _httpRequest = new System.Net.Http.HttpRequestMessage(); System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) @@ -652,6 +646,12 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) } // Serialize Request string _requestContent = null; + if(parameters != null) + { + _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 (this.Client.Credentials != null) { @@ -704,7 +704,7 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -732,7 +732,7 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) } try { - _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } catch (Newtonsoft.Json.JsonException ex) { @@ -790,6 +790,11 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -806,11 +811,6 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -969,6 +969,196 @@ internal SyncGroupsOperations (StorageSyncManagementClient client) + } + /// + /// Get a SyncGroup List. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task,SyncGroupsListByStorageSyncServiceHeaders>> ListByStorageSyncServiceNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByStorageSyncServiceNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + 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 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 (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new StorageSyncErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + StorageSyncError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse,SyncGroupsListByStorageSyncServiceHeaders>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/SyncGroupsOperationsExtensions.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/SyncGroupsOperationsExtensions.cs index bf9cdeeb3f8f..b7b5107fea76 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/SyncGroupsOperationsExtensions.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/SyncGroupsOperationsExtensions.cs @@ -24,7 +24,7 @@ public static partial class SyncGroupsOperationsExtensions /// /// Name of Storage Sync Service resource. /// - public static System.Collections.Generic.IEnumerable ListByStorageSyncService(this ISyncGroupsOperations operations, string resourceGroupName, string storageSyncServiceName) + public static Microsoft.Rest.Azure.IPage ListByStorageSyncService(this ISyncGroupsOperations operations, string resourceGroupName, string storageSyncServiceName) { return ((ISyncGroupsOperations)operations).ListByStorageSyncServiceAsync(resourceGroupName, storageSyncServiceName).GetAwaiter().GetResult(); } @@ -44,7 +44,7 @@ public static System.Collections.Generic.IEnumerable ListByStorageSyn /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task> ListByStorageSyncServiceAsync(this ISyncGroupsOperations operations, string resourceGroupName, string storageSyncServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task> ListByStorageSyncServiceAsync(this ISyncGroupsOperations operations, string resourceGroupName, string storageSyncServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.ListByStorageSyncServiceWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, null, cancellationToken).ConfigureAwait(false)) { @@ -52,7 +52,7 @@ public static System.Collections.Generic.IEnumerable ListByStorageSyn } } /// - /// Create a new SyncGroup. + /// Get a given SyncGroup. /// /// /// The operations group for this extension method. @@ -66,13 +66,13 @@ public static System.Collections.Generic.IEnumerable ListByStorageSyn /// /// Name of Sync Group resource. /// - public static SyncGroup Create(this ISyncGroupsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, object properties = default(object)) + public static SyncGroup Get(this ISyncGroupsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName) { - return ((ISyncGroupsOperations)operations).CreateAsync(resourceGroupName, storageSyncServiceName, syncGroupName, properties).GetAwaiter().GetResult(); + return ((ISyncGroupsOperations)operations).GetAsync(resourceGroupName, storageSyncServiceName, syncGroupName).GetAwaiter().GetResult(); } /// - /// Create a new SyncGroup. + /// Get a given SyncGroup. /// /// /// The operations group for this extension method. @@ -89,15 +89,15 @@ public static System.Collections.Generic.IEnumerable ListByStorageSyn /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task CreateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, object properties = default(object), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task GetAsync(this ISyncGroupsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, properties, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Get a given SyncGroup. + /// Create a new SyncGroup. /// /// /// The operations group for this extension method. @@ -111,13 +111,13 @@ public static System.Collections.Generic.IEnumerable ListByStorageSyn /// /// Name of Sync Group resource. /// - public static SyncGroup Get(this ISyncGroupsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName) + public static SyncGroup Create(this ISyncGroupsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, object properties = default(object)) { - return ((ISyncGroupsOperations)operations).GetAsync(resourceGroupName, storageSyncServiceName, syncGroupName).GetAwaiter().GetResult(); + return ((ISyncGroupsOperations)operations).CreateAsync(resourceGroupName, storageSyncServiceName, syncGroupName, properties).GetAwaiter().GetResult(); } /// - /// Get a given SyncGroup. + /// Create a new SyncGroup. /// /// /// The operations group for this extension method. @@ -134,9 +134,9 @@ public static SyncGroup Get(this ISyncGroupsOperations operations, string resour /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task GetAsync(this ISyncGroupsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task CreateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, object properties = default(object), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, properties, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -186,5 +186,38 @@ public static SyncGroupsDeleteHeaders Delete(this ISyncGroupsOperations operatio return _result.Headers; } } + /// + /// Get a SyncGroup List. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByStorageSyncServiceNext(this ISyncGroupsOperations operations, string nextPageLink) + { + return ((ISyncGroupsOperations)operations).ListByStorageSyncServiceNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get a SyncGroup List. + /// + /// + /// 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> ListByStorageSyncServiceNextAsync(this ISyncGroupsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByStorageSyncServiceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } } } diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/WorkflowsOperations.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/WorkflowsOperations.cs index a8527cbd5bbc..b6c6f97d26a8 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/WorkflowsOperations.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/WorkflowsOperations.cs @@ -68,12 +68,17 @@ internal WorkflowsOperations (StorageSyncManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task,WorkflowsListByStorageSyncServiceHeaders>> ListByStorageSyncServiceWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task,WorkflowsListByStorageSyncServiceHeaders>> ListByStorageSyncServiceWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -90,11 +95,6 @@ internal WorkflowsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -215,7 +215,7 @@ internal WorkflowsOperations (StorageSyncManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse,WorkflowsListByStorageSyncServiceHeaders>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse,WorkflowsListByStorageSyncServiceHeaders>(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -229,7 +229,7 @@ internal WorkflowsOperations (StorageSyncManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } catch (Newtonsoft.Json.JsonException ex) { @@ -304,6 +304,11 @@ internal WorkflowsOperations (StorageSyncManagementClient client) + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -320,11 +325,6 @@ internal WorkflowsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -538,6 +538,11 @@ internal WorkflowsOperations (StorageSyncManagementClient client) + if (this.Client.ApiVersion == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (resourceGroupName == null) { @@ -554,11 +559,6 @@ internal WorkflowsOperations (StorageSyncManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - if (this.Client.ApiVersion == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (storageSyncServiceName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "storageSyncServiceName"); @@ -717,6 +717,196 @@ internal WorkflowsOperations (StorageSyncManagementClient client) + } + /// + /// Get a Workflow List + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task,WorkflowsListByStorageSyncServiceHeaders>> ListByStorageSyncServiceNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByStorageSyncServiceNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + 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 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 (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage); + } + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + // Serialize Request + string _requestContent = null; + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new StorageSyncErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + StorageSyncError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationResponse,WorkflowsListByStorageSyncServiceHeaders>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + } } } \ No newline at end of file diff --git a/src/StorageSync/StorageSync.Management.Sdk/Generated/WorkflowsOperationsExtensions.cs b/src/StorageSync/StorageSync.Management.Sdk/Generated/WorkflowsOperationsExtensions.cs index f3ec7b038935..88ef64c21004 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/Generated/WorkflowsOperationsExtensions.cs +++ b/src/StorageSync/StorageSync.Management.Sdk/Generated/WorkflowsOperationsExtensions.cs @@ -24,7 +24,7 @@ public static partial class WorkflowsOperationsExtensions /// /// Name of Storage Sync Service resource. /// - public static System.Collections.Generic.IEnumerable ListByStorageSyncService(this IWorkflowsOperations operations, string resourceGroupName, string storageSyncServiceName) + public static Microsoft.Rest.Azure.IPage ListByStorageSyncService(this IWorkflowsOperations operations, string resourceGroupName, string storageSyncServiceName) { return ((IWorkflowsOperations)operations).ListByStorageSyncServiceAsync(resourceGroupName, storageSyncServiceName).GetAwaiter().GetResult(); } @@ -44,7 +44,7 @@ public static System.Collections.Generic.IEnumerable ListByStorageSync /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task> ListByStorageSyncServiceAsync(this IWorkflowsOperations operations, string resourceGroupName, string storageSyncServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task> ListByStorageSyncServiceAsync(this IWorkflowsOperations operations, string resourceGroupName, string storageSyncServiceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.ListByStorageSyncServiceWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, null, cancellationToken).ConfigureAwait(false)) { @@ -141,5 +141,38 @@ public static WorkflowsAbortHeaders Abort(this IWorkflowsOperations operations, return _result.Headers; } } + /// + /// Get a Workflow List + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListByStorageSyncServiceNext(this IWorkflowsOperations operations, string nextPageLink) + { + return ((IWorkflowsOperations)operations).ListByStorageSyncServiceNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Get a Workflow List + /// + /// + /// 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> ListByStorageSyncServiceNextAsync(this IWorkflowsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListByStorageSyncServiceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } } } diff --git a/src/StorageSync/StorageSync.Management.Sdk/README.md b/src/StorageSync/StorageSync.Management.Sdk/README.md index 21cb4a793e55..d4981ae672fc 100644 --- a/src/StorageSync/StorageSync.Management.Sdk/README.md +++ b/src/StorageSync/StorageSync.Management.Sdk/README.md @@ -26,9 +26,9 @@ payload-flattening-threshold: 1 ### ``` yaml -commit: c29b9330313c91d43a75d9d08144c98071c904d0 +commit: 2ec4c94bd944ea1230297b26ba6bbfa94becdcce input-file: - - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/storagesync/resource-manager/Microsoft.StorageSync/stable/2022-09-01/storagesync.json + - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/storagesync/resource-manager/Microsoft.StorageSync/StorageSync/stable/2022-09-01/storagesync.json output-folder: Generated