diff --git a/src/SDKs/StorageSync/AzSdk.RP.props b/src/SDKs/StorageSync/AzSdk.RP.props
new file mode 100644
index 000000000000..c55d0f9c08e0
--- /dev/null
+++ b/src/SDKs/StorageSync/AzSdk.RP.props
@@ -0,0 +1,7 @@
+
+
+
+ StorageSync_2018-04-02;
+ $(PackageTags);$(CommonTags);$(AzureApiTag);
+
+
\ No newline at end of file
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/CloudEndpointsOperations.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/CloudEndpointsOperations.cs
new file mode 100644
index 000000000000..9d9e05a9b05f
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/CloudEndpointsOperations.cs
@@ -0,0 +1,2454 @@
+//
+// 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
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// CloudEndpointsOperations operations.
+ ///
+ internal partial class CloudEndpointsOperations : IServiceOperations, ICloudEndpointsOperations
+ {
+ ///
+ /// Initializes a new instance of the CloudEndpointsOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal CloudEndpointsOperations(StorageSyncManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the StorageSyncManagementClient
+ ///
+ public StorageSyncManagementClient Client { get; private set; }
+
+ ///
+ /// 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, CloudEndpointCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get 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.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (storageSyncServiceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "storageSyncServiceName");
+ }
+ if (syncGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "syncGroupName");
+ }
+ if (cloudEndpointName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "cloudEndpointName");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("storageSyncServiceName", storageSyncServiceName);
+ tracingParameters.Add("syncGroupName", syncGroupName);
+ tracingParameters.Add("cloudEndpointName", cloudEndpointName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _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));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new StorageSyncErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ StorageSyncError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ try
+ {
+ _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings));
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Delete 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationHeaderResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// 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.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task,CloudEndpointsListBySyncGroupHeaders>> ListBySyncGroupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (storageSyncServiceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "storageSyncServiceName");
+ }
+ if (syncGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "syncGroupName");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("storageSyncServiceName", storageSyncServiceName);
+ tracingParameters.Add("syncGroupName", syncGroupName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListBySyncGroup", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{storageSyncServiceName}", System.Uri.EscapeDataString(storageSyncServiceName));
+ _url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new StorageSyncErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ StorageSyncError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new 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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ try
+ {
+ _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings));
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Pre Backup 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.
+ ///
+ ///
+ /// Azure File Share.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> PreBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationHeaderResponse _response = await BeginPreBackupWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Post Backup 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.
+ ///
+ ///
+ /// Azure File Share.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> PostBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginPostBackupWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Pre 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> PreRestoreWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PreRestoreRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationHeaderResponse _response = await BeginPreRestoreWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Restore Heartbeat 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.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> RestoreheartbeatWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (storageSyncServiceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "storageSyncServiceName");
+ }
+ if (syncGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "syncGroupName");
+ }
+ if (cloudEndpointName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "cloudEndpointName");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("storageSyncServiceName", storageSyncServiceName);
+ tracingParameters.Add("syncGroupName", syncGroupName);
+ tracingParameters.Add("cloudEndpointName", cloudEndpointName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Restoreheartbeat", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/restoreheartbeat").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _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));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new StorageSyncErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ StorageSyncError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationHeaderResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ try
+ {
+ _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings));
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> PostRestoreWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationHeaderResponse _response = await BeginPostRestoreWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// 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.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, CloudEndpointCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (storageSyncServiceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "storageSyncServiceName");
+ }
+ if (syncGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "syncGroupName");
+ }
+ if (cloudEndpointName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "cloudEndpointName");
+ }
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("storageSyncServiceName", storageSyncServiceName);
+ tracingParameters.Add("syncGroupName", syncGroupName);
+ tracingParameters.Add("cloudEndpointName", cloudEndpointName);
+ tracingParameters.Add("parameters", parameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _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));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PUT");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new StorageSyncErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ StorageSyncError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ try
+ {
+ _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings));
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Delete 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.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (storageSyncServiceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "storageSyncServiceName");
+ }
+ if (syncGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "syncGroupName");
+ }
+ if (cloudEndpointName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "cloudEndpointName");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("storageSyncServiceName", storageSyncServiceName);
+ tracingParameters.Add("syncGroupName", syncGroupName);
+ tracingParameters.Add("cloudEndpointName", cloudEndpointName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _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));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("DELETE");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204)
+ {
+ var ex = new StorageSyncErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ StorageSyncError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationHeaderResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ try
+ {
+ _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings));
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Pre Backup 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.
+ ///
+ ///
+ /// Azure File Share.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> BeginPreBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (storageSyncServiceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "storageSyncServiceName");
+ }
+ if (syncGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "syncGroupName");
+ }
+ if (cloudEndpointName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "cloudEndpointName");
+ }
+ BackupRequest parameters = new BackupRequest();
+ if (azureFileShare != null)
+ {
+ parameters.AzureFileShare = azureFileShare;
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("storageSyncServiceName", storageSyncServiceName);
+ tracingParameters.Add("syncGroupName", syncGroupName);
+ tracingParameters.Add("cloudEndpointName", cloudEndpointName);
+ tracingParameters.Add("parameters", parameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginPreBackup", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/prebackup").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _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));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new StorageSyncErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ StorageSyncError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationHeaderResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ try
+ {
+ _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings));
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Post Backup 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.
+ ///
+ ///
+ /// Azure File Share.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> BeginPostBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (storageSyncServiceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "storageSyncServiceName");
+ }
+ if (syncGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "syncGroupName");
+ }
+ if (cloudEndpointName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "cloudEndpointName");
+ }
+ BackupRequest parameters = new BackupRequest();
+ if (azureFileShare != null)
+ {
+ parameters.AzureFileShare = azureFileShare;
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("storageSyncServiceName", storageSyncServiceName);
+ tracingParameters.Add("syncGroupName", syncGroupName);
+ tracingParameters.Add("cloudEndpointName", cloudEndpointName);
+ tracingParameters.Add("parameters", parameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginPostBackup", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/postbackup").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _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));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new StorageSyncErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ StorageSyncError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ try
+ {
+ _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings));
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Pre 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.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> BeginPreRestoreWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PreRestoreRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (storageSyncServiceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "storageSyncServiceName");
+ }
+ if (syncGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "syncGroupName");
+ }
+ if (cloudEndpointName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "cloudEndpointName");
+ }
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("storageSyncServiceName", storageSyncServiceName);
+ tracingParameters.Add("syncGroupName", syncGroupName);
+ tracingParameters.Add("cloudEndpointName", cloudEndpointName);
+ tracingParameters.Add("parameters", parameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginPreRestore", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/prerestore").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _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));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new StorageSyncErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ StorageSyncError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationHeaderResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ try
+ {
+ _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings));
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// 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.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> BeginPostRestoreWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.SubscriptionId != null)
+ {
+ if (Client.SubscriptionId.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
+ }
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceGroupName != null)
+ {
+ if (resourceGroupName.Length > 90)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
+ }
+ if (resourceGroupName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (storageSyncServiceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "storageSyncServiceName");
+ }
+ if (syncGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "syncGroupName");
+ }
+ if (cloudEndpointName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "cloudEndpointName");
+ }
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("storageSyncServiceName", storageSyncServiceName);
+ tracingParameters.Add("syncGroupName", syncGroupName);
+ tracingParameters.Add("cloudEndpointName", cloudEndpointName);
+ tracingParameters.Add("parameters", parameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginPostRestore", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/postrestore").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _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));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new StorageSyncErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ StorageSyncError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationHeaderResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ try
+ {
+ _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings));
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex);
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/CloudEndpointsOperationsExtensions.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/CloudEndpointsOperationsExtensions.cs
new file mode 100644
index 000000000000..639635f4033d
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/CloudEndpointsOperationsExtensions.cs
@@ -0,0 +1,861 @@
+//
+// 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
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for CloudEndpointsOperations.
+ ///
+ public static partial class CloudEndpointsOperationsExtensions
+ {
+ ///
+ /// Create a new CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static CloudEndpoint Create(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, CloudEndpointCreateParameters parameters)
+ {
+ return operations.CreateAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Create a new CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, CloudEndpointCreateParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Get a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static CloudEndpoint Get(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName)
+ {
+ return operations.GetAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Get a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Delete a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static CloudEndpointsDeleteHeaders Delete(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName)
+ {
+ return operations.DeleteAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Delete a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DeleteAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Headers;
+ }
+ }
+
+ ///
+ /// Get a CloudEndpoint 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.
+ ///
+ ///
+ /// Name of Sync Group resource.
+ ///
+ public static IEnumerable ListBySyncGroup(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName)
+ {
+ return operations.ListBySyncGroupAsync(resourceGroupName, storageSyncServiceName, syncGroupName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Get a CloudEndpoint 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.
+ ///
+ ///
+ /// Name of Sync Group resource.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListBySyncGroupAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListBySyncGroupWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Pre Backup a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// Azure File Share.
+ ///
+ public static CloudEndpointsPreBackupHeaders PreBackup(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string))
+ {
+ return operations.PreBackupAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Pre Backup a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// Azure File Share.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task PreBackupAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.PreBackupWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Headers;
+ }
+ }
+
+ ///
+ /// Post Backup a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// Azure File Share.
+ ///
+ public static PostBackupResponse PostBackup(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string))
+ {
+ return operations.PostBackupAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Post Backup a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// Azure File Share.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task PostBackupAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.PostBackupWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Pre Restore a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static CloudEndpointsPreRestoreHeaders PreRestore(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PreRestoreRequest parameters)
+ {
+ return operations.PreRestoreAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Pre Restore a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task PreRestoreAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PreRestoreRequest parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.PreRestoreWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Headers;
+ }
+ }
+
+ ///
+ /// Restore Heartbeat a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static CloudEndpointsRestoreheartbeatHeaders Restoreheartbeat(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName)
+ {
+ return operations.RestoreheartbeatAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Restore Heartbeat a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task RestoreheartbeatAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.RestoreheartbeatWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Headers;
+ }
+ }
+
+ ///
+ /// Post Restore a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static CloudEndpointsPostRestoreHeaders PostRestore(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters)
+ {
+ return operations.PostRestoreAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Post Restore a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task PostRestoreAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.PostRestoreWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Headers;
+ }
+ }
+
+ ///
+ /// Create a new CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static CloudEndpoint BeginCreate(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, CloudEndpointCreateParameters parameters)
+ {
+ return operations.BeginCreateAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Create a new CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginCreateAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, CloudEndpointCreateParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginCreateWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Delete a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static CloudEndpointsDeleteHeaders BeginDelete(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName)
+ {
+ return operations.BeginDeleteAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Delete a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginDeleteAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Headers;
+ }
+ }
+
+ ///
+ /// Pre Backup a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// Azure File Share.
+ ///
+ public static CloudEndpointsPreBackupHeaders BeginPreBackup(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string))
+ {
+ return operations.BeginPreBackupAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Pre Backup a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// Azure File Share.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginPreBackupAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginPreBackupWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Headers;
+ }
+ }
+
+ ///
+ /// Post Backup a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// Azure File Share.
+ ///
+ public static PostBackupResponse BeginPostBackup(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string))
+ {
+ return operations.BeginPostBackupAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Post Backup a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// Azure File Share.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginPostBackupAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginPostBackupWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, azureFileShare, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Pre Restore a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static CloudEndpointsPreRestoreHeaders BeginPreRestore(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PreRestoreRequest parameters)
+ {
+ return operations.BeginPreRestoreAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Pre Restore a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginPreRestoreAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PreRestoreRequest parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginPreRestoreWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Headers;
+ }
+ }
+
+ ///
+ /// Post Restore a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ public static CloudEndpointsPostRestoreHeaders BeginPostRestore(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters)
+ {
+ return operations.BeginPostRestoreAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Post Restore a given CloudEndpoint.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginPostRestoreAsync(this ICloudEndpointsOperations operations, string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginPostRestoreWithHttpMessagesAsync(resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Headers;
+ }
+ }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/ICloudEndpointsOperations.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/ICloudEndpointsOperations.cs
new file mode 100644
index 000000000000..2651c5b677f7
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/ICloudEndpointsOperations.cs
@@ -0,0 +1,492 @@
+//
+// 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
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// CloudEndpointsOperations operations.
+ ///
+ public partial interface ICloudEndpointsOperations
+ {
+ ///
+ /// 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, CloudEndpointCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task,CloudEndpointsListBySyncGroupHeaders>> ListBySyncGroupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Pre Backup 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.
+ ///
+ ///
+ /// Azure File Share.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> PreBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Post Backup 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.
+ ///
+ ///
+ /// Azure File Share.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> PostBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Pre 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> PreRestoreWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PreRestoreRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Restore Heartbeat 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> RestoreheartbeatWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> PostRestoreWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, CloudEndpointCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Pre Backup 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.
+ ///
+ ///
+ /// Azure File Share.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginPreBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Post Backup 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.
+ ///
+ ///
+ /// Azure File Share.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginPostBackupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, string azureFileShare = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Pre 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginPreRestoreWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PreRestoreRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginPostRestoreWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string cloudEndpointName, PostRestoreRequest parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/IOperations.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/IOperations.cs
new file mode 100644
index 000000000000..ed6b06e574c4
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/IOperations.cs
@@ -0,0 +1,68 @@
+//
+// 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
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Operations operations.
+ ///
+ public partial interface IOperations
+ {
+ ///
+ /// Lists all of the available Storage Sync Rest API operations.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task,OperationsListHeaders>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all of the available Storage Sync Rest API operations.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task,OperationsListHeaders>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/IRegisteredServersOperations.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/IRegisteredServersOperations.cs
new file mode 100644
index 000000000000..3db831aab520
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/IRegisteredServersOperations.cs
@@ -0,0 +1,192 @@
+//
+// 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
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// RegisteredServersOperations operations.
+ ///
+ public partial interface IRegisteredServersOperations
+ {
+ ///
+ /// Get a given registered server 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task,RegisteredServersListByStorageSyncServiceHeaders>> ListByStorageSyncServiceWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get a given registered server.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of Storage Sync Service resource.
+ ///
+ ///
+ /// GUID identifying the on-premises server.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string serverId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Add a new registered server.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of Storage Sync Service resource.
+ ///
+ ///
+ /// GUID identifying the on-premises server.
+ ///
+ ///
+ /// Body of Registered Server object.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string serverId, RegisteredServerCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete the given registered server.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of Storage Sync Service resource.
+ ///
+ ///
+ /// GUID identifying the on-premises server.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string serverId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Add a new registered server.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of Storage Sync Service resource.
+ ///
+ ///
+ /// GUID identifying the on-premises server.
+ ///
+ ///
+ /// Body of Registered Server object.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string serverId, RegisteredServerCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete the given registered server.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of Storage Sync Service resource.
+ ///
+ ///
+ /// GUID identifying the on-premises server.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string serverId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/IServerEndpointsOperations.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/IServerEndpointsOperations.cs
new file mode 100644
index 000000000000..30da4931bbf6
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/IServerEndpointsOperations.cs
@@ -0,0 +1,340 @@
+//
+// 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
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// ServerEndpointsOperations operations.
+ ///
+ public partial interface IServerEndpointsOperations
+ {
+ ///
+ /// 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, ServerEndpointCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, ServerEndpointUpdateParameters parameters = default(ServerEndpointUpdateParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get a 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task,ServerEndpointsListBySyncGroupHeaders>> ListBySyncGroupWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Recall a 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 Recall Action object.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> RecallActionWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, RecallActionParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, ServerEndpointCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, ServerEndpointUpdateParameters parameters = default(ServerEndpointUpdateParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Recall a 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 Recall Action object.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginRecallActionWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, string serverEndpointName, RecallActionParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/IStorageSyncManagementClient.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/IStorageSyncManagementClient.cs
new file mode 100644
index 000000000000..3d5b5de791e4
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/IStorageSyncManagementClient.cs
@@ -0,0 +1,108 @@
+//
+// 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
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+
+ ///
+ /// Microsoft Storage Sync Service API
+ ///
+ public partial interface IStorageSyncManagementClient : System.IDisposable
+ {
+ ///
+ /// The base URI of the service.
+ ///
+ System.Uri BaseUri { get; set; }
+
+ ///
+ /// Gets or sets json serialization settings.
+ ///
+ JsonSerializerSettings SerializationSettings { get; }
+
+ ///
+ /// Gets or sets json deserialization settings.
+ ///
+ JsonSerializerSettings DeserializationSettings { get; }
+
+ ///
+ /// Credentials needed for the client to connect to Azure.
+ ///
+ ServiceClientCredentials Credentials { get; }
+
+ ///
+ /// The API version to use for this operation.
+ ///
+ string ApiVersion { get; }
+
+ ///
+ /// The ID of the target subscription.
+ ///
+ string SubscriptionId { get; set; }
+
+ ///
+ /// The preferred language for the response.
+ ///
+ string AcceptLanguage { get; set; }
+
+ ///
+ /// The retry timeout in seconds for Long Running Operations. Default
+ /// value is 30.
+ ///
+ int? LongRunningOperationRetryTimeout { get; set; }
+
+ ///
+ /// Whether a unique x-ms-client-request-id should be generated. When
+ /// set to true a unique x-ms-client-request-id value is generated and
+ /// included in each request. Default is true.
+ ///
+ bool? GenerateClientRequestId { get; set; }
+
+
+ ///
+ /// Gets the IOperations.
+ ///
+ IOperations Operations { get; }
+
+ ///
+ /// Gets the IStorageSyncServicesOperations.
+ ///
+ IStorageSyncServicesOperations StorageSyncServices { get; }
+
+ ///
+ /// Gets the ISyncGroupsOperations.
+ ///
+ ISyncGroupsOperations SyncGroups { get; }
+
+ ///
+ /// Gets the ICloudEndpointsOperations.
+ ///
+ ICloudEndpointsOperations CloudEndpoints { get; }
+
+ ///
+ /// Gets the IServerEndpointsOperations.
+ ///
+ IServerEndpointsOperations ServerEndpoints { get; }
+
+ ///
+ /// Gets the IRegisteredServersOperations.
+ ///
+ IRegisteredServersOperations RegisteredServers { get; }
+
+ ///
+ /// Gets the IWorkflowsOperations.
+ ///
+ IWorkflowsOperations Workflows { get; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/IStorageSyncServicesOperations.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/IStorageSyncServicesOperations.cs
new file mode 100644
index 000000000000..c3b60de9579d
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/IStorageSyncServicesOperations.cs
@@ -0,0 +1,196 @@
+//
+// 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
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// StorageSyncServicesOperations operations.
+ ///
+ public partial interface IStorageSyncServicesOperations
+ {
+ ///
+ /// Check the give namespace name availability.
+ ///
+ ///
+ /// The desired region for the name check.
+ ///
+ ///
+ /// The name to check for availability
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CheckNameAvailabilityWithHttpMessagesAsync(string locationName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// 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.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, StorageSyncServiceCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get 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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// 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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, StorageSyncServiceUpdateParameters parameters = default(StorageSyncServiceUpdateParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// 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.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get a StorageSyncService list by Resource group name.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task,StorageSyncServicesListByResourceGroupHeaders>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get a StorageSyncService list by subscription.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task,StorageSyncServicesListBySubscriptionHeaders>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/ISyncGroupsOperations.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/ISyncGroupsOperations.cs
new file mode 100644
index 000000000000..6a2a45a172f7
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/ISyncGroupsOperations.cs
@@ -0,0 +1,136 @@
+//
+// 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
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// SyncGroupsOperations operations.
+ ///
+ public partial interface ISyncGroupsOperations
+ {
+ ///
+ /// Get a SyncGroup 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
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task,SyncGroupsListByStorageSyncServiceHeaders>> ListByStorageSyncServiceWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create a new SyncGroup.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of Storage Sync Service resource.
+ ///
+ ///
+ /// Name of Sync Group resource.
+ ///
+ ///
+ /// Sync Group Body
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CreateWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, SyncGroupCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get a given SyncGroup.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of Storage Sync Service resource.
+ ///
+ ///
+ /// Name of Sync Group resource.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete a given SyncGroup.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of Storage Sync Service resource.
+ ///
+ ///
+ /// Name of Sync Group resource.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string syncGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/IWorkflowsOperations.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/IWorkflowsOperations.cs
new file mode 100644
index 000000000000..0d5c2d5737a0
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/IWorkflowsOperations.cs
@@ -0,0 +1,80 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// WorkflowsOperations operations.
+ ///
+ public partial interface IWorkflowsOperations
+ {
+ ///
+ /// Get Workflows resource
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of Storage Sync Service resource.
+ ///
+ ///
+ /// workflow Id
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string workflowId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Abort the given workflow.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// Name of Storage Sync Service resource.
+ ///
+ ///
+ /// workflow Id
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> AbortWithHttpMessagesAsync(string resourceGroupName, string storageSyncServiceName, string workflowId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/AzureEntityResource.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/AzureEntityResource.cs
new file mode 100644
index 000000000000..52f7c8cb20e5
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/AzureEntityResource.cs
@@ -0,0 +1,59 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// 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 Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The resource model definition for a Azure Resource Manager resource
+ /// with an etag.
+ ///
+ public partial class AzureEntityResource : Resource
+ {
+ ///
+ /// Initializes a new instance of the AzureEntityResource class.
+ ///
+ public AzureEntityResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AzureEntityResource class.
+ ///
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
+ /// Resource Etag.
+ public AzureEntityResource(string id = default(string), string name = default(string), string type = default(string), string etag = default(string))
+ : base(id, name, type)
+ {
+ Etag = etag;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets resource Etag.
+ ///
+ [JsonProperty(PropertyName = "etag")]
+ public string Etag { get; private set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/BackupRequest.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/BackupRequest.cs
new file mode 100644
index 000000000000..cdbd85bb266a
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/BackupRequest.cs
@@ -0,0 +1,51 @@
+//
+// 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 Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Backup request
+ ///
+ public partial class BackupRequest
+ {
+ ///
+ /// Initializes a new instance of the BackupRequest class.
+ ///
+ public BackupRequest()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the BackupRequest class.
+ ///
+ /// Azure File Share.
+ public BackupRequest(string azureFileShare = default(string))
+ {
+ AzureFileShare = azureFileShare;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets azure File Share.
+ ///
+ [JsonProperty(PropertyName = "azureFileShare")]
+ public string AzureFileShare { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CheckNameAvailabilityParameters.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CheckNameAvailabilityParameters.cs
new file mode 100644
index 000000000000..6894a7099412
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CheckNameAvailabilityParameters.cs
@@ -0,0 +1,81 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Parameters for a check name availability request.
+ ///
+ public partial class CheckNameAvailabilityParameters
+ {
+ ///
+ /// Initializes a new instance of the CheckNameAvailabilityParameters
+ /// class.
+ ///
+ public CheckNameAvailabilityParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CheckNameAvailabilityParameters
+ /// class.
+ ///
+ /// The name to check for availability
+ public CheckNameAvailabilityParameters(string name)
+ {
+ Name = name;
+ CustomInit();
+ }
+ ///
+ /// Static constructor for CheckNameAvailabilityParameters class.
+ ///
+ static CheckNameAvailabilityParameters()
+ {
+ Type = "Microsoft.StorageSync/storageSyncServices";
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the name to check for availability
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// The resource type. Must be set to
+ /// Microsoft.StorageSync/storageSyncServices
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public static string Type { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Name");
+ }
+ }
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CheckNameAvailabilityResult.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CheckNameAvailabilityResult.cs
new file mode 100644
index 000000000000..064dd2f6cae4
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CheckNameAvailabilityResult.cs
@@ -0,0 +1,80 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The CheckNameAvailability operation response.
+ ///
+ public partial class CheckNameAvailabilityResult
+ {
+ ///
+ /// Initializes a new instance of the CheckNameAvailabilityResult
+ /// class.
+ ///
+ public CheckNameAvailabilityResult()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CheckNameAvailabilityResult
+ /// class.
+ ///
+ /// Gets a boolean value that indicates
+ /// whether the name is available for you to use. If true, the name is
+ /// available. If false, the name has already been taken or invalid and
+ /// cannot be used.
+ /// Gets the reason that a Storage Sync Service
+ /// name could not be used. The Reason element is only returned if
+ /// NameAvailable is false. Possible values include: 'Invalid',
+ /// 'AlreadyExists'
+ /// Gets an error message explaining the Reason
+ /// value in more detail.
+ public CheckNameAvailabilityResult(bool? nameAvailable = default(bool?), NameAvailabilityReason? reason = default(NameAvailabilityReason?), string message = default(string))
+ {
+ NameAvailable = nameAvailable;
+ Reason = reason;
+ Message = message;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets a boolean value that indicates whether the name is available
+ /// for you to use. If true, the name is available. If false, the name
+ /// has already been taken or invalid and cannot be used.
+ ///
+ [JsonProperty(PropertyName = "nameAvailable")]
+ public bool? NameAvailable { get; private set; }
+
+ ///
+ /// Gets the reason that a Storage Sync Service name could not be used.
+ /// The Reason element is only returned if NameAvailable is false.
+ /// Possible values include: 'Invalid', 'AlreadyExists'
+ ///
+ [JsonProperty(PropertyName = "reason")]
+ public NameAvailabilityReason? Reason { get; private set; }
+
+ ///
+ /// Gets an error message explaining the Reason value in more detail.
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; private set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpoint.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpoint.cs
new file mode 100644
index 000000000000..503995690137
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpoint.cs
@@ -0,0 +1,130 @@
+//
+// 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 Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Cloud Endpoint object.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class CloudEndpoint : Resource
+ {
+ ///
+ /// Initializes a new instance of the CloudEndpoint class.
+ ///
+ public CloudEndpoint()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CloudEndpoint class.
+ ///
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
+ /// Storage Account Resource
+ /// Id
+ /// Storage Account Share
+ /// name
+ /// Storage Account Tenant
+ /// Id
+ /// Partnership Id
+ /// Friendly Name
+ /// Backup Enabled
+ /// CloudEndpoint Provisioning
+ /// State
+ /// CloudEndpoint lastWorkflowId
+ /// Resource Last Operation
+ /// Name
+ public CloudEndpoint(string id = default(string), string name = default(string), string type = default(string), string storageAccountResourceId = default(string), string storageAccountShareName = default(string), string storageAccountTenantId = default(string), string partnershipId = default(string), string friendlyName = default(string), bool? backupEnabled = default(bool?), string provisioningState = default(string), string lastWorkflowId = default(string), string lastOperationName = default(string))
+ : base(id, name, type)
+ {
+ StorageAccountResourceId = storageAccountResourceId;
+ StorageAccountShareName = storageAccountShareName;
+ StorageAccountTenantId = storageAccountTenantId;
+ PartnershipId = partnershipId;
+ FriendlyName = friendlyName;
+ BackupEnabled = backupEnabled;
+ ProvisioningState = provisioningState;
+ LastWorkflowId = lastWorkflowId;
+ LastOperationName = lastOperationName;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets storage Account Resource Id
+ ///
+ [JsonProperty(PropertyName = "properties.storageAccountResourceId")]
+ public string StorageAccountResourceId { get; set; }
+
+ ///
+ /// Gets or sets storage Account Share name
+ ///
+ [JsonProperty(PropertyName = "properties.storageAccountShareName")]
+ public string StorageAccountShareName { get; set; }
+
+ ///
+ /// Gets or sets storage Account Tenant Id
+ ///
+ [JsonProperty(PropertyName = "properties.storageAccountTenantId")]
+ public string StorageAccountTenantId { get; set; }
+
+ ///
+ /// Gets or sets partnership Id
+ ///
+ [JsonProperty(PropertyName = "properties.partnershipId")]
+ public string PartnershipId { get; set; }
+
+ ///
+ /// Gets or sets friendly Name
+ ///
+ [JsonProperty(PropertyName = "properties.friendlyName")]
+ public string FriendlyName { get; set; }
+
+ ///
+ /// Gets backup Enabled
+ ///
+ [JsonProperty(PropertyName = "properties.backupEnabled")]
+ public bool? BackupEnabled { get; private set; }
+
+ ///
+ /// Gets or sets cloudEndpoint Provisioning State
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; set; }
+
+ ///
+ /// Gets or sets cloudEndpoint lastWorkflowId
+ ///
+ [JsonProperty(PropertyName = "properties.lastWorkflowId")]
+ public string LastWorkflowId { get; set; }
+
+ ///
+ /// Gets or sets resource Last Operation Name
+ ///
+ [JsonProperty(PropertyName = "properties.lastOperationName")]
+ public string LastOperationName { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointCreateParameters.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointCreateParameters.cs
new file mode 100644
index 000000000000..d140e646e019
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointCreateParameters.cs
@@ -0,0 +1,112 @@
+//
+// 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 Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The parameters used when creating a storage sync service.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class CloudEndpointCreateParameters
+ {
+ ///
+ /// Initializes a new instance of the CloudEndpointCreateParameters
+ /// class.
+ ///
+ public CloudEndpointCreateParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CloudEndpointCreateParameters
+ /// class.
+ ///
+ /// Required. Gets or sets the location of the
+ /// resource. This will be one of the supported and registered Azure
+ /// Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo
+ /// region of a resource cannot be changed once it is created, but if
+ /// an identical geo region is specified on update, the request will
+ /// succeed.
+ /// Gets or sets a list of key value pairs that
+ /// describe the resource. These tags can be used for viewing and
+ /// grouping this resource (across resource groups). A maximum of 15
+ /// tags can be provided for a resource. Each tag must have a key with
+ /// a length no greater than 128 characters and a value with a length
+ /// no greater than 256 characters.
+ /// Storage Account Resource
+ /// Id
+ /// Storage Account Share
+ /// name
+ /// Storage Account Tenant
+ /// Id
+ public CloudEndpointCreateParameters(string location = default(string), IDictionary tags = default(IDictionary), string storageAccountResourceId = default(string), string storageAccountShareName = default(string), string storageAccountTenantId = default(string))
+ {
+ Location = location;
+ Tags = tags;
+ StorageAccountResourceId = storageAccountResourceId;
+ StorageAccountShareName = storageAccountShareName;
+ StorageAccountTenantId = storageAccountTenantId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets required. Gets or sets the location of the resource.
+ /// This will be one of the supported and registered Azure Geo Regions
+ /// (e.g. West US, East US, Southeast Asia, etc.). The geo region of a
+ /// resource cannot be changed once it is created, but if an identical
+ /// geo region is specified on update, the request will succeed.
+ ///
+ [JsonProperty(PropertyName = "location")]
+ public string Location { get; set; }
+
+ ///
+ /// Gets or sets a list of key value pairs that describe the resource.
+ /// These tags can be used for viewing and grouping this resource
+ /// (across resource groups). A maximum of 15 tags can be provided for
+ /// a resource. Each tag must have a key with a length no greater than
+ /// 128 characters and a value with a length no greater than 256
+ /// characters.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ ///
+ /// Gets or sets storage Account Resource Id
+ ///
+ [JsonProperty(PropertyName = "properties.storageAccountResourceId")]
+ public string StorageAccountResourceId { get; set; }
+
+ ///
+ /// Gets or sets storage Account Share name
+ ///
+ [JsonProperty(PropertyName = "properties.storageAccountShareName")]
+ public string StorageAccountShareName { get; set; }
+
+ ///
+ /// Gets or sets storage Account Tenant Id
+ ///
+ [JsonProperty(PropertyName = "properties.storageAccountTenantId")]
+ public string StorageAccountTenantId { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsCreateHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsCreateHeaders.cs
new file mode 100644
index 000000000000..68b72ba55601
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsCreateHeaders.cs
@@ -0,0 +1,87 @@
+//
+// 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 Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for Create operation.
+ ///
+ public partial class CloudEndpointsCreateHeaders
+ {
+ ///
+ /// Initializes a new instance of the CloudEndpointsCreateHeaders
+ /// class.
+ ///
+ public CloudEndpointsCreateHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CloudEndpointsCreateHeaders
+ /// class.
+ ///
+ /// Request id
+ /// correlation request
+ /// id
+ /// Operation Status Location
+ /// URI
+ /// Operation Status Location URI
+ /// Retry After
+ public CloudEndpointsCreateHeaders(string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string), string azureAsyncOperation = default(string), string location = default(string), string retryAfter = default(string))
+ {
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ AzureAsyncOperation = azureAsyncOperation;
+ Location = location;
+ RetryAfter = retryAfter;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets request id
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ ///
+ /// Gets or sets operation Status Location URI
+ ///
+ [JsonProperty(PropertyName = "Azure-AsyncOperation")]
+ public string AzureAsyncOperation { get; set; }
+
+ ///
+ /// Gets or sets operation Status Location URI
+ ///
+ [JsonProperty(PropertyName = "Location")]
+ public string Location { get; set; }
+
+ ///
+ /// Gets or sets retry After
+ ///
+ [JsonProperty(PropertyName = "Retry-After")]
+ public string RetryAfter { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsDeleteHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsDeleteHeaders.cs
new file mode 100644
index 000000000000..7c44fd16dda0
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsDeleteHeaders.cs
@@ -0,0 +1,87 @@
+//
+// 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 Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for Delete operation.
+ ///
+ public partial class CloudEndpointsDeleteHeaders
+ {
+ ///
+ /// Initializes a new instance of the CloudEndpointsDeleteHeaders
+ /// class.
+ ///
+ public CloudEndpointsDeleteHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CloudEndpointsDeleteHeaders
+ /// class.
+ ///
+ /// Request id
+ /// correlation request
+ /// id
+ /// Operation Status Location
+ /// URI
+ /// Operation Status Location URI
+ /// Retry After
+ public CloudEndpointsDeleteHeaders(string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string), string azureAsyncOperation = default(string), string location = default(string), string retryAfter = default(string))
+ {
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ AzureAsyncOperation = azureAsyncOperation;
+ Location = location;
+ RetryAfter = retryAfter;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets request id
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ ///
+ /// Gets or sets operation Status Location URI
+ ///
+ [JsonProperty(PropertyName = "Azure-AsyncOperation")]
+ public string AzureAsyncOperation { get; set; }
+
+ ///
+ /// Gets or sets operation Status Location URI
+ ///
+ [JsonProperty(PropertyName = "Location")]
+ public string Location { get; set; }
+
+ ///
+ /// Gets or sets retry After
+ ///
+ [JsonProperty(PropertyName = "Retry-After")]
+ public string RetryAfter { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsGetHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsGetHeaders.cs
new file mode 100644
index 000000000000..7754917e9eb5
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsGetHeaders.cs
@@ -0,0 +1,60 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for Get operation.
+ ///
+ public partial class CloudEndpointsGetHeaders
+ {
+ ///
+ /// Initializes a new instance of the CloudEndpointsGetHeaders class.
+ ///
+ public CloudEndpointsGetHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CloudEndpointsGetHeaders class.
+ ///
+ /// request id.
+ /// correlation request
+ /// id.
+ public CloudEndpointsGetHeaders(string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string))
+ {
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsListBySyncGroupHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsListBySyncGroupHeaders.cs
new file mode 100644
index 000000000000..379f0ef7947c
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsListBySyncGroupHeaders.cs
@@ -0,0 +1,62 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for ListBySyncGroup operation.
+ ///
+ public partial class CloudEndpointsListBySyncGroupHeaders
+ {
+ ///
+ /// Initializes a new instance of the
+ /// CloudEndpointsListBySyncGroupHeaders class.
+ ///
+ public CloudEndpointsListBySyncGroupHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// CloudEndpointsListBySyncGroupHeaders class.
+ ///
+ /// request id.
+ /// correlation request
+ /// id.
+ public CloudEndpointsListBySyncGroupHeaders(string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string))
+ {
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsPostBackupHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsPostBackupHeaders.cs
new file mode 100644
index 000000000000..e42c263ea894
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsPostBackupHeaders.cs
@@ -0,0 +1,70 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for PostBackup operation.
+ ///
+ public partial class CloudEndpointsPostBackupHeaders
+ {
+ ///
+ /// Initializes a new instance of the CloudEndpointsPostBackupHeaders
+ /// class.
+ ///
+ public CloudEndpointsPostBackupHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CloudEndpointsPostBackupHeaders
+ /// class.
+ ///
+ /// Operation Status Location URI
+ /// request id.
+ /// correlation request
+ /// id.
+ public CloudEndpointsPostBackupHeaders(string location = default(string), string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string))
+ {
+ Location = location;
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets operation Status Location URI
+ ///
+ [JsonProperty(PropertyName = "Location")]
+ public string Location { get; set; }
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsPostRestoreHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsPostRestoreHeaders.cs
new file mode 100644
index 000000000000..66054a0eb4b6
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsPostRestoreHeaders.cs
@@ -0,0 +1,70 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for PostRestore operation.
+ ///
+ public partial class CloudEndpointsPostRestoreHeaders
+ {
+ ///
+ /// Initializes a new instance of the CloudEndpointsPostRestoreHeaders
+ /// class.
+ ///
+ public CloudEndpointsPostRestoreHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CloudEndpointsPostRestoreHeaders
+ /// class.
+ ///
+ /// Operation Status Location URI
+ /// request id.
+ /// correlation request
+ /// id.
+ public CloudEndpointsPostRestoreHeaders(string location = default(string), string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string))
+ {
+ Location = location;
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets operation Status Location URI
+ ///
+ [JsonProperty(PropertyName = "Location")]
+ public string Location { get; set; }
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsPreBackupHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsPreBackupHeaders.cs
new file mode 100644
index 000000000000..adfad0f23ea2
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsPreBackupHeaders.cs
@@ -0,0 +1,70 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for PreBackup operation.
+ ///
+ public partial class CloudEndpointsPreBackupHeaders
+ {
+ ///
+ /// Initializes a new instance of the CloudEndpointsPreBackupHeaders
+ /// class.
+ ///
+ public CloudEndpointsPreBackupHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CloudEndpointsPreBackupHeaders
+ /// class.
+ ///
+ /// Operation Status Location URI
+ /// request id.
+ /// correlation request
+ /// id.
+ public CloudEndpointsPreBackupHeaders(string location = default(string), string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string))
+ {
+ Location = location;
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets operation Status Location URI
+ ///
+ [JsonProperty(PropertyName = "Location")]
+ public string Location { get; set; }
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsPreRestoreHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsPreRestoreHeaders.cs
new file mode 100644
index 000000000000..aafa91c4b3db
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsPreRestoreHeaders.cs
@@ -0,0 +1,70 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for PreRestore operation.
+ ///
+ public partial class CloudEndpointsPreRestoreHeaders
+ {
+ ///
+ /// Initializes a new instance of the CloudEndpointsPreRestoreHeaders
+ /// class.
+ ///
+ public CloudEndpointsPreRestoreHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CloudEndpointsPreRestoreHeaders
+ /// class.
+ ///
+ /// Operation Status Location URI
+ /// request id.
+ /// correlation request
+ /// id.
+ public CloudEndpointsPreRestoreHeaders(string location = default(string), string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string))
+ {
+ Location = location;
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets operation Status Location URI
+ ///
+ [JsonProperty(PropertyName = "Location")]
+ public string Location { get; set; }
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsRestoreheartbeatHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsRestoreheartbeatHeaders.cs
new file mode 100644
index 000000000000..e1f9851e906c
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointsRestoreheartbeatHeaders.cs
@@ -0,0 +1,62 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for restoreheartbeat operation.
+ ///
+ public partial class CloudEndpointsRestoreheartbeatHeaders
+ {
+ ///
+ /// Initializes a new instance of the
+ /// CloudEndpointsRestoreheartbeatHeaders class.
+ ///
+ public CloudEndpointsRestoreheartbeatHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// CloudEndpointsRestoreheartbeatHeaders class.
+ ///
+ /// request id.
+ /// correlation request
+ /// id.
+ public CloudEndpointsRestoreheartbeatHeaders(string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string))
+ {
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/NameAvailabilityReason.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/NameAvailabilityReason.cs
new file mode 100644
index 000000000000..c757246d7ebf
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/NameAvailabilityReason.cs
@@ -0,0 +1,60 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using Newtonsoft.Json.Converters;
+ using System.Runtime;
+ using System.Runtime.Serialization;
+
+ ///
+ /// Defines values for NameAvailabilityReason.
+ ///
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum NameAvailabilityReason
+ {
+ [EnumMember(Value = "Invalid")]
+ Invalid,
+ [EnumMember(Value = "AlreadyExists")]
+ AlreadyExists
+ }
+ internal static class NameAvailabilityReasonEnumExtension
+ {
+ internal static string ToSerializedValue(this NameAvailabilityReason? value)
+ {
+ return value == null ? null : ((NameAvailabilityReason)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this NameAvailabilityReason value)
+ {
+ switch( value )
+ {
+ case NameAvailabilityReason.Invalid:
+ return "Invalid";
+ case NameAvailabilityReason.AlreadyExists:
+ return "AlreadyExists";
+ }
+ return null;
+ }
+
+ internal static NameAvailabilityReason? ParseNameAvailabilityReason(this string value)
+ {
+ switch( value )
+ {
+ case "Invalid":
+ return NameAvailabilityReason.Invalid;
+ case "AlreadyExists":
+ return NameAvailabilityReason.AlreadyExists;
+ }
+ return null;
+ }
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/OperationDisplayInfo.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/OperationDisplayInfo.cs
new file mode 100644
index 000000000000..acd6c970c58c
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/OperationDisplayInfo.cs
@@ -0,0 +1,79 @@
+//
+// 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 Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The operation supported by storage sync.
+ ///
+ public partial class OperationDisplayInfo
+ {
+ ///
+ /// Initializes a new instance of the OperationDisplayInfo class.
+ ///
+ public OperationDisplayInfo()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the OperationDisplayInfo class.
+ ///
+ /// The description of the operation.
+ /// The action that users can perform, based on
+ /// their permission level.
+ /// Service provider: Microsoft
+ /// StorageSync.
+ /// Resource on which the operation is
+ /// performed.
+ public OperationDisplayInfo(string description = default(string), string operation = default(string), string provider = default(string), string resource = default(string))
+ {
+ Description = description;
+ Operation = operation;
+ Provider = provider;
+ Resource = resource;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the description of the operation.
+ ///
+ [JsonProperty(PropertyName = "description")]
+ public string Description { get; set; }
+
+ ///
+ /// Gets or sets the action that users can perform, based on their
+ /// permission level.
+ ///
+ [JsonProperty(PropertyName = "operation")]
+ public string Operation { get; set; }
+
+ ///
+ /// Gets or sets service provider: Microsoft StorageSync.
+ ///
+ [JsonProperty(PropertyName = "provider")]
+ public string Provider { get; set; }
+
+ ///
+ /// Gets or sets resource on which the operation is performed.
+ ///
+ [JsonProperty(PropertyName = "resource")]
+ public string Resource { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/OperationDisplayResource.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/OperationDisplayResource.cs
new file mode 100644
index 000000000000..450055830430
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/OperationDisplayResource.cs
@@ -0,0 +1,77 @@
+//
+// 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 Newtonsoft.Json;
+ 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))
+ {
+ Provider = provider;
+ Resource = resource;
+ Operation = operation;
+ Description = description;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets operation Display Resource Provider.
+ ///
+ [JsonProperty(PropertyName = "provider")]
+ public string Provider { get; set; }
+
+ ///
+ /// Gets or sets operation Display Resource.
+ ///
+ [JsonProperty(PropertyName = "resource")]
+ public string Resource { get; set; }
+
+ ///
+ /// Gets or sets operation Display Resource Operation.
+ ///
+ [JsonProperty(PropertyName = "operation")]
+ public string Operation { get; set; }
+
+ ///
+ /// Gets or sets operation Display Resource Description.
+ ///
+ [JsonProperty(PropertyName = "description")]
+ public string Description { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/OperationEntity.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/OperationEntity.cs
new file mode 100644
index 000000000000..9d4237608285
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/OperationEntity.cs
@@ -0,0 +1,69 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The operation supported by storage sync.
+ ///
+ public partial class OperationEntity
+ {
+ ///
+ /// Initializes a new instance of the OperationEntity class.
+ ///
+ public OperationEntity()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the OperationEntity class.
+ ///
+ /// Operation name:
+ /// {provider}/{resource}/{operation}.
+ /// The operation supported by storage
+ /// sync.
+ /// The origin.
+ public OperationEntity(string name = default(string), OperationDisplayInfo display = default(OperationDisplayInfo), string origin = default(string))
+ {
+ Name = name;
+ Display = display;
+ Origin = origin;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets operation name: {provider}/{resource}/{operation}.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets the operation supported by storage sync.
+ ///
+ [JsonProperty(PropertyName = "display")]
+ public OperationDisplayInfo Display { get; set; }
+
+ ///
+ /// Gets or sets the origin.
+ ///
+ [JsonProperty(PropertyName = "origin")]
+ public string Origin { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/OperationsListHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/OperationsListHeaders.cs
new file mode 100644
index 000000000000..c8e7d77dfd06
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/OperationsListHeaders.cs
@@ -0,0 +1,60 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for List operation.
+ ///
+ public partial class OperationsListHeaders
+ {
+ ///
+ /// Initializes a new instance of the OperationsListHeaders class.
+ ///
+ public OperationsListHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the OperationsListHeaders class.
+ ///
+ /// request id.
+ /// correlation request
+ /// id.
+ public OperationsListHeaders(string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string))
+ {
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/Page.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/Page.cs
new file mode 100644
index 000000000000..715c9b50409a
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/Page.cs
@@ -0,0 +1,53 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+
+ ///
+ /// Defines a page in Azure responses.
+ ///
+ /// Type of the page content items
+ [JsonObject]
+ public class Page : IPage
+ {
+ ///
+ /// Gets the link to the next page.
+ ///
+ [JsonProperty("nextLink")]
+ public string NextPageLink { get; private set; }
+
+ [JsonProperty("value")]
+ private IList Items{ get; set; }
+
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ /// A an enumerator that can be used to iterate through the collection.
+ public IEnumerator GetEnumerator()
+ {
+ return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator();
+ }
+
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ /// A an enumerator that can be used to iterate through the collection.
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/Page1.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/Page1.cs
new file mode 100644
index 000000000000..ff5764eff5e7
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/Page1.cs
@@ -0,0 +1,53 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+
+ ///
+ /// Defines a page in Azure responses.
+ ///
+ /// Type of the page content items
+ [JsonObject]
+ public class Page1 : IPage
+ {
+ ///
+ /// Gets the link to the next page.
+ ///
+ [JsonProperty("")]
+ public string NextPageLink { get; private set; }
+
+ [JsonProperty("value")]
+ private IList Items{ get; set; }
+
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ /// A an enumerator that can be used to iterate through the collection.
+ public IEnumerator GetEnumerator()
+ {
+ return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator();
+ }
+
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ /// A an enumerator that can be used to iterate through the collection.
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/PostBackupResponse.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/PostBackupResponse.cs
new file mode 100644
index 000000000000..387f2193add3
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/PostBackupResponse.cs
@@ -0,0 +1,54 @@
+//
+// 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 Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Post Backup Response
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class PostBackupResponse
+ {
+ ///
+ /// Initializes a new instance of the PostBackupResponse class.
+ ///
+ public PostBackupResponse()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PostBackupResponse class.
+ ///
+ /// cloud endpoint Name.
+ public PostBackupResponse(string cloudEndpointName = default(string))
+ {
+ CloudEndpointName = cloudEndpointName;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets cloud endpoint Name.
+ ///
+ [JsonProperty(PropertyName = "backupMetadata.cloudEndpointName")]
+ public string CloudEndpointName { get; private set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/PostRestoreRequest.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/PostRestoreRequest.cs
new file mode 100644
index 000000000000..d11895dd3065
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/PostRestoreRequest.cs
@@ -0,0 +1,113 @@
+//
+// 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 Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Post Restore Request
+ ///
+ public partial class PostRestoreRequest
+ {
+ ///
+ /// Initializes a new instance of the PostRestoreRequest class.
+ ///
+ public PostRestoreRequest()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PostRestoreRequest class.
+ ///
+ /// Post Restore partition.
+ /// Post Restore replica group.
+ /// Post Restore request id.
+ /// Post Restore Azure file share
+ /// uri.
+ /// Post Restore Azure status.
+ /// Post Restore Azure source
+ /// azure file share uri.
+ /// Post Restore Azure failed file
+ /// list.
+ /// Post Restore restore file spec
+ /// array.
+ public PostRestoreRequest(string partition = default(string), string replicaGroup = default(string), string requestId = default(string), string azureFileShareUri = default(string), string status = default(string), string sourceAzureFileShareUri = default(string), string failedFileList = default(string), IList restoreFileSpec = default(IList))
+ {
+ Partition = partition;
+ ReplicaGroup = replicaGroup;
+ RequestId = requestId;
+ AzureFileShareUri = azureFileShareUri;
+ Status = status;
+ SourceAzureFileShareUri = sourceAzureFileShareUri;
+ FailedFileList = failedFileList;
+ RestoreFileSpec = restoreFileSpec;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets post Restore partition.
+ ///
+ [JsonProperty(PropertyName = "partition")]
+ public string Partition { get; set; }
+
+ ///
+ /// Gets or sets post Restore replica group.
+ ///
+ [JsonProperty(PropertyName = "replicaGroup")]
+ public string ReplicaGroup { get; set; }
+
+ ///
+ /// Gets or sets post Restore request id.
+ ///
+ [JsonProperty(PropertyName = "requestId")]
+ public string RequestId { get; set; }
+
+ ///
+ /// Gets or sets post Restore Azure file share uri.
+ ///
+ [JsonProperty(PropertyName = "azureFileShareUri")]
+ public string AzureFileShareUri { get; set; }
+
+ ///
+ /// Gets or sets post Restore Azure status.
+ ///
+ [JsonProperty(PropertyName = "status")]
+ public string Status { get; set; }
+
+ ///
+ /// Gets or sets post Restore Azure source azure file share uri.
+ ///
+ [JsonProperty(PropertyName = "sourceAzureFileShareUri")]
+ public string SourceAzureFileShareUri { get; set; }
+
+ ///
+ /// Gets or sets post Restore Azure failed file list.
+ ///
+ [JsonProperty(PropertyName = "failedFileList")]
+ public string FailedFileList { get; set; }
+
+ ///
+ /// Gets or sets post Restore restore file spec array.
+ ///
+ [JsonProperty(PropertyName = "restoreFileSpec")]
+ public IList RestoreFileSpec { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/PreRestoreRequest.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/PreRestoreRequest.cs
new file mode 100644
index 000000000000..ec679911b72f
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/PreRestoreRequest.cs
@@ -0,0 +1,123 @@
+//
+// 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 Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Pre Restore request object.
+ ///
+ public partial class PreRestoreRequest
+ {
+ ///
+ /// Initializes a new instance of the PreRestoreRequest class.
+ ///
+ public PreRestoreRequest()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PreRestoreRequest class.
+ ///
+ /// Pre Restore partition.
+ /// Pre Restore replica group.
+ /// Pre Restore request id.
+ /// Pre Restore Azure file share
+ /// uri.
+ /// Pre Restore Azure status.
+ /// Pre Restore Azure source
+ /// azure file share uri.
+ /// Pre Restore backup metadata
+ /// property bag.
+ /// Pre Restore restore file spec
+ /// array.
+ /// Pre Restore
+ /// pause wait for sync drain time period in seconds.
+ public PreRestoreRequest(string partition = default(string), string replicaGroup = default(string), string requestId = default(string), string azureFileShareUri = default(string), string status = default(string), string sourceAzureFileShareUri = default(string), string backupMetadataPropertyBag = default(string), IList restoreFileSpec = default(IList), int? pauseWaitForSyncDrainTimePeriodInSeconds = default(int?))
+ {
+ Partition = partition;
+ ReplicaGroup = replicaGroup;
+ RequestId = requestId;
+ AzureFileShareUri = azureFileShareUri;
+ Status = status;
+ SourceAzureFileShareUri = sourceAzureFileShareUri;
+ BackupMetadataPropertyBag = backupMetadataPropertyBag;
+ RestoreFileSpec = restoreFileSpec;
+ PauseWaitForSyncDrainTimePeriodInSeconds = pauseWaitForSyncDrainTimePeriodInSeconds;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets pre Restore partition.
+ ///
+ [JsonProperty(PropertyName = "partition")]
+ public string Partition { get; set; }
+
+ ///
+ /// Gets or sets pre Restore replica group.
+ ///
+ [JsonProperty(PropertyName = "replicaGroup")]
+ public string ReplicaGroup { get; set; }
+
+ ///
+ /// Gets or sets pre Restore request id.
+ ///
+ [JsonProperty(PropertyName = "requestId")]
+ public string RequestId { get; set; }
+
+ ///
+ /// Gets or sets pre Restore Azure file share uri.
+ ///
+ [JsonProperty(PropertyName = "azureFileShareUri")]
+ public string AzureFileShareUri { get; set; }
+
+ ///
+ /// Gets or sets pre Restore Azure status.
+ ///
+ [JsonProperty(PropertyName = "status")]
+ public string Status { get; set; }
+
+ ///
+ /// Gets or sets pre Restore Azure source azure file share uri.
+ ///
+ [JsonProperty(PropertyName = "sourceAzureFileShareUri")]
+ public string SourceAzureFileShareUri { get; set; }
+
+ ///
+ /// Gets or sets pre Restore backup metadata property bag.
+ ///
+ [JsonProperty(PropertyName = "backupMetadataPropertyBag")]
+ public string BackupMetadataPropertyBag { get; set; }
+
+ ///
+ /// Gets or sets pre Restore restore file spec array.
+ ///
+ [JsonProperty(PropertyName = "restoreFileSpec")]
+ public IList RestoreFileSpec { get; set; }
+
+ ///
+ /// Gets or sets pre Restore pause wait for sync drain time period in
+ /// seconds.
+ ///
+ [JsonProperty(PropertyName = "pauseWaitForSyncDrainTimePeriodInSeconds")]
+ public int? PauseWaitForSyncDrainTimePeriodInSeconds { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ProxyResource.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ProxyResource.cs
new file mode 100644
index 000000000000..58a9ed0f4ddc
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ProxyResource.cs
@@ -0,0 +1,50 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using System.Linq;
+
+ ///
+ /// The resource model definition for a ARM proxy resource. It will have
+ /// everything other than required location and tags
+ ///
+ public partial class ProxyResource : Resource
+ {
+ ///
+ /// Initializes a new instance of the ProxyResource class.
+ ///
+ public ProxyResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ProxyResource class.
+ ///
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
+ public ProxyResource(string id = default(string), string name = default(string), string type = default(string))
+ : base(id, name, type)
+ {
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/Reason.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/Reason.cs
new file mode 100644
index 000000000000..d73d5510f296
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/Reason.cs
@@ -0,0 +1,25 @@
+//
+// 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";
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RecallActionParameters.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RecallActionParameters.cs
new file mode 100644
index 000000000000..601b8e80d052
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RecallActionParameters.cs
@@ -0,0 +1,59 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// 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 Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The parameters used when calling recall action on server endpoint.
+ ///
+ public partial class RecallActionParameters
+ {
+ ///
+ /// Initializes a new instance of the RecallActionParameters class.
+ ///
+ public RecallActionParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RecallActionParameters class.
+ ///
+ /// Pattern of the files.
+ /// Recall path.
+ public RecallActionParameters(string pattern = default(string), string recallPath = default(string))
+ {
+ Pattern = pattern;
+ RecallPath = recallPath;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets pattern of the files.
+ ///
+ [JsonProperty(PropertyName = "pattern")]
+ public string Pattern { get; set; }
+
+ ///
+ /// Gets or sets recall path.
+ ///
+ [JsonProperty(PropertyName = "recallPath")]
+ public string RecallPath { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RegisteredServer.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RegisteredServer.cs
new file mode 100644
index 000000000000..573e2520d745
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RegisteredServer.cs
@@ -0,0 +1,205 @@
+//
+// 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 Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Registered Server resource.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class RegisteredServer : Resource
+ {
+ ///
+ /// Initializes a new instance of the RegisteredServer class.
+ ///
+ public RegisteredServer()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RegisteredServer class.
+ ///
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
+ /// Registered Server
+ /// Certificate
+ /// Registered Server Agent Version
+ /// Registered Server OS Version
+ /// Registered Server
+ /// Management Error Code
+ /// Registered Server last heart
+ /// beat
+ /// Registered Server Provisioning
+ /// State
+ /// Registered Server serverRole
+ /// Registered Server clusterId
+ /// Registered Server clusterName
+ /// Registered Server serverId
+ /// Registered Server
+ /// storageSyncServiceUid
+ /// Registered Server
+ /// lastWorkflowId
+ /// Resource Last Operation
+ /// Name
+ /// Resource
+ /// discoveryEndpointUri
+ /// Resource Location
+ /// Service Location
+ /// Friendly Name
+ /// Management Endpoint Uri
+ public RegisteredServer(string id = default(string), string name = default(string), string type = default(string), string serverCertificate = default(string), string agentVersion = default(string), string serverOSVersion = default(string), int? serverManagementtErrorCode = default(int?), string lastHeartBeat = default(string), string provisioningState = default(string), string serverRole = default(string), string clusterId = default(string), string clusterName = default(string), string serverId = default(string), string storageSyncServiceUid = default(string), string lastWorkflowId = default(string), string lastOperationName = default(string), string discoveryEndpointUri = default(string), string resourceLocation = default(string), string serviceLocation = default(string), string friendlyName = default(string), string managementEndpointUri = default(string))
+ : base(id, name, type)
+ {
+ ServerCertificate = serverCertificate;
+ AgentVersion = agentVersion;
+ ServerOSVersion = serverOSVersion;
+ ServerManagementtErrorCode = serverManagementtErrorCode;
+ LastHeartBeat = lastHeartBeat;
+ ProvisioningState = provisioningState;
+ ServerRole = serverRole;
+ ClusterId = clusterId;
+ ClusterName = clusterName;
+ ServerId = serverId;
+ StorageSyncServiceUid = storageSyncServiceUid;
+ LastWorkflowId = lastWorkflowId;
+ LastOperationName = lastOperationName;
+ DiscoveryEndpointUri = discoveryEndpointUri;
+ ResourceLocation = resourceLocation;
+ ServiceLocation = serviceLocation;
+ FriendlyName = friendlyName;
+ ManagementEndpointUri = managementEndpointUri;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets registered Server Certificate
+ ///
+ [JsonProperty(PropertyName = "properties.serverCertificate")]
+ public string ServerCertificate { get; set; }
+
+ ///
+ /// Gets or sets registered Server Agent Version
+ ///
+ [JsonProperty(PropertyName = "properties.agentVersion")]
+ public string AgentVersion { get; set; }
+
+ ///
+ /// Gets or sets registered Server OS Version
+ ///
+ [JsonProperty(PropertyName = "properties.serverOSVersion")]
+ public string ServerOSVersion { get; set; }
+
+ ///
+ /// Gets or sets registered Server Management Error Code
+ ///
+ [JsonProperty(PropertyName = "properties.serverManagementtErrorCode")]
+ public int? ServerManagementtErrorCode { get; set; }
+
+ ///
+ /// Gets or sets registered Server last heart beat
+ ///
+ [JsonProperty(PropertyName = "properties.lastHeartBeat")]
+ public string LastHeartBeat { get; set; }
+
+ ///
+ /// Gets or sets registered Server Provisioning State
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; set; }
+
+ ///
+ /// Gets or sets registered Server serverRole
+ ///
+ [JsonProperty(PropertyName = "properties.serverRole")]
+ public string ServerRole { get; set; }
+
+ ///
+ /// Gets or sets registered Server clusterId
+ ///
+ [JsonProperty(PropertyName = "properties.clusterId")]
+ public string ClusterId { get; set; }
+
+ ///
+ /// Gets or sets registered Server clusterName
+ ///
+ [JsonProperty(PropertyName = "properties.clusterName")]
+ public string ClusterName { get; set; }
+
+ ///
+ /// Gets or sets registered Server serverId
+ ///
+ [JsonProperty(PropertyName = "properties.serverId")]
+ public string ServerId { get; set; }
+
+ ///
+ /// Gets or sets registered Server storageSyncServiceUid
+ ///
+ [JsonProperty(PropertyName = "properties.storageSyncServiceUid")]
+ public string StorageSyncServiceUid { get; set; }
+
+ ///
+ /// Gets or sets registered Server lastWorkflowId
+ ///
+ [JsonProperty(PropertyName = "properties.lastWorkflowId")]
+ public string LastWorkflowId { get; set; }
+
+ ///
+ /// Gets or sets resource Last Operation Name
+ ///
+ [JsonProperty(PropertyName = "properties.lastOperationName")]
+ public string LastOperationName { get; set; }
+
+ ///
+ /// Gets or sets resource discoveryEndpointUri
+ ///
+ [JsonProperty(PropertyName = "properties.discoveryEndpointUri")]
+ public string DiscoveryEndpointUri { get; set; }
+
+ ///
+ /// Gets or sets resource Location
+ ///
+ [JsonProperty(PropertyName = "properties.resourceLocation")]
+ public string ResourceLocation { get; set; }
+
+ ///
+ /// Gets or sets service Location
+ ///
+ [JsonProperty(PropertyName = "properties.serviceLocation")]
+ public string ServiceLocation { get; set; }
+
+ ///
+ /// Gets or sets friendly Name
+ ///
+ [JsonProperty(PropertyName = "properties.friendlyName")]
+ public string FriendlyName { get; set; }
+
+ ///
+ /// Gets or sets management Endpoint Uri
+ ///
+ [JsonProperty(PropertyName = "properties.managementEndpointUri")]
+ public string ManagementEndpointUri { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RegisteredServerCreateParameters.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RegisteredServerCreateParameters.cs
new file mode 100644
index 000000000000..dc7a7503b36c
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RegisteredServerCreateParameters.cs
@@ -0,0 +1,159 @@
+//
+// 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 Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The parameters used when creating a storage sync service.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class RegisteredServerCreateParameters
+ {
+ ///
+ /// Initializes a new instance of the RegisteredServerCreateParameters
+ /// class.
+ ///
+ public RegisteredServerCreateParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RegisteredServerCreateParameters
+ /// class.
+ ///
+ /// Required. Gets or sets the location of the
+ /// resource. This will be one of the supported and registered Azure
+ /// Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo
+ /// region of a resource cannot be changed once it is created, but if
+ /// an identical geo region is specified on update, the request will
+ /// succeed.
+ /// Gets or sets a list of key value pairs that
+ /// describe the resource. These tags can be used for viewing and
+ /// grouping this resource (across resource groups). A maximum of 15
+ /// tags can be provided for a resource. Each tag must have a key with
+ /// a length no greater than 128 characters and a value with a length
+ /// no greater than 256 characters.
+ /// Registered Server
+ /// Certificate
+ /// Registered Server Agent Version
+ /// Registered Server OS Version
+ /// Registered Server last heart
+ /// beat
+ /// Registered Server serverRole
+ /// Registered Server clusterId
+ /// Registered Server clusterName
+ /// Registered Server serverId
+ /// Friendly Name
+ public RegisteredServerCreateParameters(string location = default(string), IDictionary tags = default(IDictionary), string serverCertificate = default(string), string agentVersion = default(string), string serverOSVersion = default(string), string lastHeartBeat = default(string), string serverRole = default(string), string clusterId = default(string), string clusterName = default(string), string serverId = default(string), string friendlyName = default(string))
+ {
+ Location = location;
+ Tags = tags;
+ ServerCertificate = serverCertificate;
+ AgentVersion = agentVersion;
+ ServerOSVersion = serverOSVersion;
+ LastHeartBeat = lastHeartBeat;
+ ServerRole = serverRole;
+ ClusterId = clusterId;
+ ClusterName = clusterName;
+ ServerId = serverId;
+ FriendlyName = friendlyName;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets required. Gets or sets the location of the resource.
+ /// This will be one of the supported and registered Azure Geo Regions
+ /// (e.g. West US, East US, Southeast Asia, etc.). The geo region of a
+ /// resource cannot be changed once it is created, but if an identical
+ /// geo region is specified on update, the request will succeed.
+ ///
+ [JsonProperty(PropertyName = "location")]
+ public string Location { get; set; }
+
+ ///
+ /// Gets or sets a list of key value pairs that describe the resource.
+ /// These tags can be used for viewing and grouping this resource
+ /// (across resource groups). A maximum of 15 tags can be provided for
+ /// a resource. Each tag must have a key with a length no greater than
+ /// 128 characters and a value with a length no greater than 256
+ /// characters.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ ///
+ /// Gets or sets registered Server Certificate
+ ///
+ [JsonProperty(PropertyName = "properties.serverCertificate")]
+ public string ServerCertificate { get; set; }
+
+ ///
+ /// Gets or sets registered Server Agent Version
+ ///
+ [JsonProperty(PropertyName = "properties.agentVersion")]
+ public string AgentVersion { get; set; }
+
+ ///
+ /// Gets or sets registered Server OS Version
+ ///
+ [JsonProperty(PropertyName = "properties.serverOSVersion")]
+ public string ServerOSVersion { get; set; }
+
+ ///
+ /// Gets or sets registered Server last heart beat
+ ///
+ [JsonProperty(PropertyName = "properties.lastHeartBeat")]
+ public string LastHeartBeat { get; set; }
+
+ ///
+ /// Gets or sets registered Server serverRole
+ ///
+ [JsonProperty(PropertyName = "properties.serverRole")]
+ public string ServerRole { get; set; }
+
+ ///
+ /// Gets or sets registered Server clusterId
+ ///
+ [JsonProperty(PropertyName = "properties.clusterId")]
+ public string ClusterId { get; set; }
+
+ ///
+ /// Gets or sets registered Server clusterName
+ ///
+ [JsonProperty(PropertyName = "properties.clusterName")]
+ public string ClusterName { get; set; }
+
+ ///
+ /// Gets or sets registered Server serverId
+ ///
+ [JsonProperty(PropertyName = "properties.serverId")]
+ public string ServerId { get; set; }
+
+ ///
+ /// Gets or sets friendly Name
+ ///
+ [JsonProperty(PropertyName = "properties.friendlyName")]
+ public string FriendlyName { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RegisteredServersCreateHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RegisteredServersCreateHeaders.cs
new file mode 100644
index 000000000000..722b8a14ed41
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RegisteredServersCreateHeaders.cs
@@ -0,0 +1,79 @@
+//
+// 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 Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for Create operation.
+ ///
+ public partial class RegisteredServersCreateHeaders
+ {
+ ///
+ /// Initializes a new instance of the RegisteredServersCreateHeaders
+ /// class.
+ ///
+ public RegisteredServersCreateHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RegisteredServersCreateHeaders
+ /// class.
+ ///
+ /// request id.
+ /// correlation request
+ /// id.
+ /// Operation Status Location
+ /// URI
+ /// Operation Status Location URI
+ public RegisteredServersCreateHeaders(string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string), string azureAsyncOperation = default(string), string location = default(string))
+ {
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ AzureAsyncOperation = azureAsyncOperation;
+ Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ ///
+ /// Gets or sets operation Status Location URI
+ ///
+ [JsonProperty(PropertyName = "Azure-AsyncOperation")]
+ public string AzureAsyncOperation { get; set; }
+
+ ///
+ /// Gets or sets operation Status Location URI
+ ///
+ [JsonProperty(PropertyName = "Location")]
+ public string Location { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RegisteredServersDeleteHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RegisteredServersDeleteHeaders.cs
new file mode 100644
index 000000000000..5dcd959e971c
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RegisteredServersDeleteHeaders.cs
@@ -0,0 +1,70 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for Delete operation.
+ ///
+ public partial class RegisteredServersDeleteHeaders
+ {
+ ///
+ /// Initializes a new instance of the RegisteredServersDeleteHeaders
+ /// class.
+ ///
+ public RegisteredServersDeleteHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RegisteredServersDeleteHeaders
+ /// class.
+ ///
+ /// request id.
+ /// correlation request
+ /// id.
+ /// Operation Status Location URI
+ public RegisteredServersDeleteHeaders(string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string), string location = default(string))
+ {
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ ///
+ /// Gets or sets operation Status Location URI
+ ///
+ [JsonProperty(PropertyName = "Location")]
+ public string Location { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RegisteredServersGetHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RegisteredServersGetHeaders.cs
new file mode 100644
index 000000000000..86eb5ca7f714
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RegisteredServersGetHeaders.cs
@@ -0,0 +1,62 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for Get operation.
+ ///
+ public partial class RegisteredServersGetHeaders
+ {
+ ///
+ /// Initializes a new instance of the RegisteredServersGetHeaders
+ /// class.
+ ///
+ public RegisteredServersGetHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RegisteredServersGetHeaders
+ /// class.
+ ///
+ /// request id.
+ /// correlation request
+ /// id.
+ public RegisteredServersGetHeaders(string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string))
+ {
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RegisteredServersListByStorageSyncServiceHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RegisteredServersListByStorageSyncServiceHeaders.cs
new file mode 100644
index 000000000000..f6c6bdd4a80f
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RegisteredServersListByStorageSyncServiceHeaders.cs
@@ -0,0 +1,62 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for ListByStorageSyncService operation.
+ ///
+ public partial class RegisteredServersListByStorageSyncServiceHeaders
+ {
+ ///
+ /// Initializes a new instance of the
+ /// RegisteredServersListByStorageSyncServiceHeaders class.
+ ///
+ public RegisteredServersListByStorageSyncServiceHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// RegisteredServersListByStorageSyncServiceHeaders class.
+ ///
+ /// request id.
+ /// correlation request
+ /// id.
+ public RegisteredServersListByStorageSyncServiceHeaders(string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string))
+ {
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/Resource.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/Resource.cs
new file mode 100644
index 000000000000..1e0f81fa9f68
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/Resource.cs
@@ -0,0 +1,72 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class Resource : IResource
+ {
+ ///
+ /// Initializes a new instance of the Resource class.
+ ///
+ public Resource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Resource class.
+ ///
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
+ public Resource(string id = default(string), string name = default(string), string type = default(string))
+ {
+ Id = id;
+ Name = name;
+ Type = type;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ ///
+ /// Gets the name of the resource
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets the type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ResourcesMoveInfo.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ResourcesMoveInfo.cs
new file mode 100644
index 000000000000..758953c9fc2c
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ResourcesMoveInfo.cs
@@ -0,0 +1,61 @@
+//
+// 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 Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ 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), IList resources = default(IList))
+ {
+ TargetResourceGroup = targetResourceGroup;
+ Resources = resources;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets target resource group.
+ ///
+ [JsonProperty(PropertyName = "targetResourceGroup")]
+ public string TargetResourceGroup { get; set; }
+
+ ///
+ /// Gets or sets collection of Resources.
+ ///
+ [JsonProperty(PropertyName = "resources")]
+ public IList Resources { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RestoreFileSpec.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RestoreFileSpec.cs
new file mode 100644
index 000000000000..d39143781541
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/RestoreFileSpec.cs
@@ -0,0 +1,59 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// 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 Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Restore file spec.
+ ///
+ public partial class RestoreFileSpec
+ {
+ ///
+ /// Initializes a new instance of the RestoreFileSpec class.
+ ///
+ public RestoreFileSpec()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RestoreFileSpec class.
+ ///
+ /// Restore file spec path
+ /// Restore file spec isdir
+ public RestoreFileSpec(string path = default(string), bool? isdir = default(bool?))
+ {
+ Path = path;
+ Isdir = isdir;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets restore file spec path
+ ///
+ [JsonProperty(PropertyName = "path")]
+ public string Path { get; set; }
+
+ ///
+ /// Gets restore file spec isdir
+ ///
+ [JsonProperty(PropertyName = "isdir")]
+ public bool? Isdir { get; private set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpoint.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpoint.cs
new file mode 100644
index 000000000000..f473516645a2
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpoint.cs
@@ -0,0 +1,147 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Server Endpoint object.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class ServerEndpoint : Resource
+ {
+ ///
+ /// Initializes a new instance of the ServerEndpoint class.
+ ///
+ public ServerEndpoint()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ServerEndpoint class.
+ ///
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
+ /// Server Local path.
+ /// Cloud Tiering. Possible values include:
+ /// 'on', 'off'
+ /// Level of free space to be
+ /// maintained by Cloud Tiering if it is enabled.
+ /// Friendly Name
+ /// Server Resource Id.
+ /// ServerEndpoint Provisioning
+ /// State
+ /// ServerEndpoint lastWorkflowId
+ /// Resource Last Operation
+ /// Name
+ /// Sync Health Status
+ public ServerEndpoint(string id = default(string), string name = default(string), string type = default(string), string serverLocalPath = default(string), string cloudTiering = default(string), int? volumeFreeSpacePercent = default(int?), string friendlyName = default(string), string serverResourceId = default(string), string provisioningState = default(string), string lastWorkflowId = default(string), string lastOperationName = default(string), object syncStatus = default(object))
+ : base(id, name, type)
+ {
+ ServerLocalPath = serverLocalPath;
+ CloudTiering = cloudTiering;
+ VolumeFreeSpacePercent = volumeFreeSpacePercent;
+ FriendlyName = friendlyName;
+ ServerResourceId = serverResourceId;
+ ProvisioningState = provisioningState;
+ LastWorkflowId = lastWorkflowId;
+ LastOperationName = lastOperationName;
+ SyncStatus = syncStatus;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets server Local path.
+ ///
+ [JsonProperty(PropertyName = "properties.serverLocalPath")]
+ public string ServerLocalPath { get; set; }
+
+ ///
+ /// Gets or sets cloud Tiering. Possible values include: 'on', 'off'
+ ///
+ [JsonProperty(PropertyName = "properties.cloudTiering")]
+ public string CloudTiering { get; set; }
+
+ ///
+ /// Gets or sets level of free space to be maintained by Cloud Tiering
+ /// if it is enabled.
+ ///
+ [JsonProperty(PropertyName = "properties.volumeFreeSpacePercent")]
+ public int? VolumeFreeSpacePercent { get; set; }
+
+ ///
+ /// Gets or sets friendly Name
+ ///
+ [JsonProperty(PropertyName = "properties.friendlyName")]
+ public string FriendlyName { get; set; }
+
+ ///
+ /// Gets or sets server Resource Id.
+ ///
+ [JsonProperty(PropertyName = "properties.serverResourceId")]
+ public string ServerResourceId { get; set; }
+
+ ///
+ /// Gets or sets serverEndpoint Provisioning State
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; set; }
+
+ ///
+ /// Gets or sets serverEndpoint lastWorkflowId
+ ///
+ [JsonProperty(PropertyName = "properties.lastWorkflowId")]
+ public string LastWorkflowId { get; set; }
+
+ ///
+ /// Gets or sets resource Last Operation Name
+ ///
+ [JsonProperty(PropertyName = "properties.lastOperationName")]
+ public string LastOperationName { get; set; }
+
+ ///
+ /// Gets or sets sync Health Status
+ ///
+ [JsonProperty(PropertyName = "properties.syncStatus")]
+ public object SyncStatus { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (VolumeFreeSpacePercent > 100)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMaximum, "VolumeFreeSpacePercent", 100);
+ }
+ if (VolumeFreeSpacePercent < 0)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "VolumeFreeSpacePercent", 0);
+ }
+ }
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointCreateParameters.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointCreateParameters.cs
new file mode 100644
index 000000000000..eea1a7faa8f1
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointCreateParameters.cs
@@ -0,0 +1,145 @@
+//
+// 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 Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The parameters used when creating a storage sync service.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class ServerEndpointCreateParameters
+ {
+ ///
+ /// Initializes a new instance of the ServerEndpointCreateParameters
+ /// class.
+ ///
+ public ServerEndpointCreateParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ServerEndpointCreateParameters
+ /// class.
+ ///
+ /// Required. Gets or sets the location of the
+ /// resource. This will be one of the supported and registered Azure
+ /// Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo
+ /// region of a resource cannot be changed once it is created, but if
+ /// an identical geo region is specified on update, the request will
+ /// succeed.
+ /// Gets or sets a list of key value pairs that
+ /// describe the resource. These tags can be used for viewing and
+ /// grouping this resource (across resource groups). A maximum of 15
+ /// tags can be provided for a resource. Each tag must have a key with
+ /// a length no greater than 128 characters and a value with a length
+ /// no greater than 256 characters.
+ /// Server Local path.
+ /// Cloud Tiering. Possible values include:
+ /// 'on', 'off'
+ /// Level of free space to be
+ /// maintained by Cloud Tiering if it is enabled.
+ /// Friendly Name
+ /// Server Resource Id.
+ public ServerEndpointCreateParameters(string location = default(string), IDictionary tags = default(IDictionary), string serverLocalPath = default(string), string cloudTiering = default(string), int? volumeFreeSpacePercent = default(int?), string friendlyName = default(string), string serverResourceId = default(string))
+ {
+ Location = location;
+ Tags = tags;
+ ServerLocalPath = serverLocalPath;
+ CloudTiering = cloudTiering;
+ VolumeFreeSpacePercent = volumeFreeSpacePercent;
+ FriendlyName = friendlyName;
+ ServerResourceId = serverResourceId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets required. Gets or sets the location of the resource.
+ /// This will be one of the supported and registered Azure Geo Regions
+ /// (e.g. West US, East US, Southeast Asia, etc.). The geo region of a
+ /// resource cannot be changed once it is created, but if an identical
+ /// geo region is specified on update, the request will succeed.
+ ///
+ [JsonProperty(PropertyName = "location")]
+ public string Location { get; set; }
+
+ ///
+ /// Gets or sets a list of key value pairs that describe the resource.
+ /// These tags can be used for viewing and grouping this resource
+ /// (across resource groups). A maximum of 15 tags can be provided for
+ /// a resource. Each tag must have a key with a length no greater than
+ /// 128 characters and a value with a length no greater than 256
+ /// characters.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ ///
+ /// Gets or sets server Local path.
+ ///
+ [JsonProperty(PropertyName = "properties.serverLocalPath")]
+ public string ServerLocalPath { get; set; }
+
+ ///
+ /// Gets or sets cloud Tiering. Possible values include: 'on', 'off'
+ ///
+ [JsonProperty(PropertyName = "properties.cloudTiering")]
+ public string CloudTiering { get; set; }
+
+ ///
+ /// Gets or sets level of free space to be maintained by Cloud Tiering
+ /// if it is enabled.
+ ///
+ [JsonProperty(PropertyName = "properties.volumeFreeSpacePercent")]
+ public int? VolumeFreeSpacePercent { get; set; }
+
+ ///
+ /// Gets or sets friendly Name
+ ///
+ [JsonProperty(PropertyName = "properties.friendlyName")]
+ public string FriendlyName { get; set; }
+
+ ///
+ /// Gets or sets server Resource Id.
+ ///
+ [JsonProperty(PropertyName = "properties.serverResourceId")]
+ public string ServerResourceId { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (VolumeFreeSpacePercent > 100)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMaximum, "VolumeFreeSpacePercent", 100);
+ }
+ if (VolumeFreeSpacePercent < 0)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "VolumeFreeSpacePercent", 0);
+ }
+ }
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointUpdateParameters.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointUpdateParameters.cs
new file mode 100644
index 000000000000..2c6c9d1498ec
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointUpdateParameters.cs
@@ -0,0 +1,96 @@
+//
+// 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 Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Parameters for updating an Server Endpoint.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class ServerEndpointUpdateParameters
+ {
+ ///
+ /// Initializes a new instance of the ServerEndpointUpdateParameters
+ /// class.
+ ///
+ public ServerEndpointUpdateParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ServerEndpointUpdateParameters
+ /// class.
+ ///
+ /// The user-specified tags associated with the
+ /// server endpoint.
+ /// Cloud Tiering. Possible values include:
+ /// 'on', 'off'
+ /// Level of free space to be
+ /// maintained by Cloud Tiering if it is enabled.
+ public ServerEndpointUpdateParameters(IDictionary tags = default(IDictionary), string cloudTiering = default(string), int? volumeFreeSpacePercent = default(int?))
+ {
+ Tags = tags;
+ CloudTiering = cloudTiering;
+ VolumeFreeSpacePercent = volumeFreeSpacePercent;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the user-specified tags associated with the server
+ /// endpoint.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ ///
+ /// Gets or sets cloud Tiering. Possible values include: 'on', 'off'
+ ///
+ [JsonProperty(PropertyName = "properties.cloudTiering")]
+ public string CloudTiering { get; set; }
+
+ ///
+ /// Gets or sets level of free space to be maintained by Cloud Tiering
+ /// if it is enabled.
+ ///
+ [JsonProperty(PropertyName = "properties.volumeFreeSpacePercent")]
+ public int? VolumeFreeSpacePercent { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (VolumeFreeSpacePercent > 100)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMaximum, "VolumeFreeSpacePercent", 100);
+ }
+ if (VolumeFreeSpacePercent < 0)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "VolumeFreeSpacePercent", 0);
+ }
+ }
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointsCreateHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointsCreateHeaders.cs
new file mode 100644
index 000000000000..629c0d253159
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointsCreateHeaders.cs
@@ -0,0 +1,79 @@
+//
+// 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 Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for Create operation.
+ ///
+ public partial class ServerEndpointsCreateHeaders
+ {
+ ///
+ /// Initializes a new instance of the ServerEndpointsCreateHeaders
+ /// class.
+ ///
+ public ServerEndpointsCreateHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ServerEndpointsCreateHeaders
+ /// class.
+ ///
+ /// request id.
+ /// correlation request
+ /// id.
+ /// Operation Status Location
+ /// URI
+ /// Operation Status Location URI
+ public ServerEndpointsCreateHeaders(string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string), string azureAsyncOperation = default(string), string location = default(string))
+ {
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ AzureAsyncOperation = azureAsyncOperation;
+ Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ ///
+ /// Gets or sets operation Status Location URI
+ ///
+ [JsonProperty(PropertyName = "Azure-AsyncOperation")]
+ public string AzureAsyncOperation { get; set; }
+
+ ///
+ /// Gets or sets operation Status Location URI
+ ///
+ [JsonProperty(PropertyName = "Location")]
+ public string Location { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointsDeleteHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointsDeleteHeaders.cs
new file mode 100644
index 000000000000..b0117b9f9edb
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointsDeleteHeaders.cs
@@ -0,0 +1,70 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for Delete operation.
+ ///
+ public partial class ServerEndpointsDeleteHeaders
+ {
+ ///
+ /// Initializes a new instance of the ServerEndpointsDeleteHeaders
+ /// class.
+ ///
+ public ServerEndpointsDeleteHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ServerEndpointsDeleteHeaders
+ /// class.
+ ///
+ /// request id.
+ /// correlation request
+ /// id.
+ /// Operation Status Location URI
+ public ServerEndpointsDeleteHeaders(string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string), string location = default(string))
+ {
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ ///
+ /// Gets or sets operation Status Location URI
+ ///
+ [JsonProperty(PropertyName = "Location")]
+ public string Location { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointsGetHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointsGetHeaders.cs
new file mode 100644
index 000000000000..b7d92848dff1
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointsGetHeaders.cs
@@ -0,0 +1,60 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for Get operation.
+ ///
+ public partial class ServerEndpointsGetHeaders
+ {
+ ///
+ /// Initializes a new instance of the ServerEndpointsGetHeaders class.
+ ///
+ public ServerEndpointsGetHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ServerEndpointsGetHeaders class.
+ ///
+ /// request id.
+ /// correlation request
+ /// id.
+ public ServerEndpointsGetHeaders(string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string))
+ {
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointsListBySyncGroupHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointsListBySyncGroupHeaders.cs
new file mode 100644
index 000000000000..0285a8ba6551
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointsListBySyncGroupHeaders.cs
@@ -0,0 +1,70 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for ListBySyncGroup operation.
+ ///
+ public partial class ServerEndpointsListBySyncGroupHeaders
+ {
+ ///
+ /// Initializes a new instance of the
+ /// ServerEndpointsListBySyncGroupHeaders class.
+ ///
+ public ServerEndpointsListBySyncGroupHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// ServerEndpointsListBySyncGroupHeaders class.
+ ///
+ /// Operation Status Location URI
+ /// request id.
+ /// correlation request
+ /// id.
+ public ServerEndpointsListBySyncGroupHeaders(string location = default(string), string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string))
+ {
+ Location = location;
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets operation Status Location URI
+ ///
+ [JsonProperty(PropertyName = "Location")]
+ public string Location { get; set; }
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointsRecallActionHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointsRecallActionHeaders.cs
new file mode 100644
index 000000000000..2e6e3cb2f88f
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointsRecallActionHeaders.cs
@@ -0,0 +1,70 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for recallAction operation.
+ ///
+ public partial class ServerEndpointsRecallActionHeaders
+ {
+ ///
+ /// Initializes a new instance of the
+ /// ServerEndpointsRecallActionHeaders class.
+ ///
+ public ServerEndpointsRecallActionHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// ServerEndpointsRecallActionHeaders class.
+ ///
+ /// request id.
+ /// correlation request
+ /// id.
+ /// Operation Status Location URI
+ public ServerEndpointsRecallActionHeaders(string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string), string location = default(string))
+ {
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ ///
+ /// Gets or sets operation Status Location URI
+ ///
+ [JsonProperty(PropertyName = "Location")]
+ public string Location { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointsUpdateHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointsUpdateHeaders.cs
new file mode 100644
index 000000000000..8a14610392a1
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointsUpdateHeaders.cs
@@ -0,0 +1,79 @@
+//
+// 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 Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for Update operation.
+ ///
+ public partial class ServerEndpointsUpdateHeaders
+ {
+ ///
+ /// Initializes a new instance of the ServerEndpointsUpdateHeaders
+ /// class.
+ ///
+ public ServerEndpointsUpdateHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ServerEndpointsUpdateHeaders
+ /// class.
+ ///
+ /// request id.
+ /// correlation request
+ /// id.
+ /// Operation Status Location
+ /// URI
+ /// Operation Status Location URI
+ public ServerEndpointsUpdateHeaders(string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string), string azureAsyncOperation = default(string), string location = default(string))
+ {
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ AzureAsyncOperation = azureAsyncOperation;
+ Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ ///
+ /// Gets or sets operation Status Location URI
+ ///
+ [JsonProperty(PropertyName = "Azure-AsyncOperation")]
+ public string AzureAsyncOperation { get; set; }
+
+ ///
+ /// Gets or sets operation Status Location URI
+ ///
+ [JsonProperty(PropertyName = "Location")]
+ public string Location { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncApiError.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncApiError.cs
new file mode 100644
index 000000000000..e5324e0e7cb0
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncApiError.cs
@@ -0,0 +1,75 @@
+//
+// 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 Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Error type
+ ///
+ public partial class StorageSyncApiError
+ {
+ ///
+ /// Initializes a new instance of the StorageSyncApiError class.
+ ///
+ public StorageSyncApiError()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the StorageSyncApiError class.
+ ///
+ /// Error code of the given entry.
+ /// Error message of the given entry.
+ /// Target of the given error entry.
+ /// Error details of the given entry.
+ public StorageSyncApiError(string code = default(string), string message = default(string), string target = default(string), StorageSyncErrorDetails details = default(StorageSyncErrorDetails))
+ {
+ Code = code;
+ Message = message;
+ Target = target;
+ Details = details;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets error code of the given entry.
+ ///
+ [JsonProperty(PropertyName = "code")]
+ public string Code { get; set; }
+
+ ///
+ /// Gets or sets error message of the given entry.
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; set; }
+
+ ///
+ /// Gets or sets target of the given error entry.
+ ///
+ [JsonProperty(PropertyName = "target")]
+ public string Target { get; set; }
+
+ ///
+ /// Gets or sets error details of the given entry.
+ ///
+ [JsonProperty(PropertyName = "details")]
+ public StorageSyncErrorDetails Details { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncError.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncError.cs
new file mode 100644
index 000000000000..5c83eac9c0cb
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncError.cs
@@ -0,0 +1,59 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// 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 Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Error type
+ ///
+ public partial class StorageSyncError
+ {
+ ///
+ /// Initializes a new instance of the StorageSyncError class.
+ ///
+ public StorageSyncError()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the StorageSyncError class.
+ ///
+ /// Error details of the given entry.
+ /// Error details of the given entry.
+ public StorageSyncError(StorageSyncApiError error = default(StorageSyncApiError), StorageSyncApiError innererror = default(StorageSyncApiError))
+ {
+ Error = error;
+ Innererror = innererror;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets error details of the given entry.
+ ///
+ [JsonProperty(PropertyName = "error")]
+ public StorageSyncApiError Error { get; set; }
+
+ ///
+ /// Gets or sets error details of the given entry.
+ ///
+ [JsonProperty(PropertyName = "innererror")]
+ public StorageSyncApiError Innererror { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncErrorDetails.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncErrorDetails.cs
new file mode 100644
index 000000000000..857e2a2e7610
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncErrorDetails.cs
@@ -0,0 +1,67 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Error Details object.
+ ///
+ public partial class StorageSyncErrorDetails
+ {
+ ///
+ /// Initializes a new instance of the StorageSyncErrorDetails class.
+ ///
+ public StorageSyncErrorDetails()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the StorageSyncErrorDetails class.
+ ///
+ /// Error code of the given entry.
+ /// Error message of the given entry.
+ /// Target of the given entry.
+ public StorageSyncErrorDetails(string code = default(string), string message = default(string), string target = default(string))
+ {
+ Code = code;
+ Message = message;
+ Target = target;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets error code of the given entry.
+ ///
+ [JsonProperty(PropertyName = "code")]
+ public string Code { get; set; }
+
+ ///
+ /// Gets or sets error message of the given entry.
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; set; }
+
+ ///
+ /// Gets or sets target of the given entry.
+ ///
+ [JsonProperty(PropertyName = "target")]
+ public string Target { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncErrorException.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncErrorException.cs
new file mode 100644
index 000000000000..28e9687d6b2e
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncErrorException.cs
@@ -0,0 +1,62 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Microsoft.Rest;
+
+ ///
+ /// Exception thrown for an invalid response with StorageSyncError
+ /// information.
+ ///
+ public partial class StorageSyncErrorException : RestException
+ {
+ ///
+ /// Gets information about the associated HTTP request.
+ ///
+ public HttpRequestMessageWrapper Request { get; set; }
+
+ ///
+ /// Gets information about the associated HTTP response.
+ ///
+ public HttpResponseMessageWrapper Response { get; set; }
+
+ ///
+ /// Gets or sets the body object.
+ ///
+ public StorageSyncError Body { get; set; }
+
+ ///
+ /// Initializes a new instance of the StorageSyncErrorException class.
+ ///
+ public StorageSyncErrorException()
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the StorageSyncErrorException class.
+ ///
+ /// The exception message.
+ public StorageSyncErrorException(string message)
+ : this(message, null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the StorageSyncErrorException class.
+ ///
+ /// The exception message.
+ /// Inner exception.
+ public StorageSyncErrorException(string message, System.Exception innerException)
+ : base(message, innerException)
+ {
+ }
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncService.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncService.cs
new file mode 100644
index 000000000000..af1221cdd4ca
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncService.cs
@@ -0,0 +1,86 @@
+//
+// 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 Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Storage Sync Service object.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class StorageSyncService : TrackedResource
+ {
+ ///
+ /// Initializes a new instance of the StorageSyncService class.
+ ///
+ public StorageSyncService()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the StorageSyncService class.
+ ///
+ /// The geo-location where the resource
+ /// lives
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
+ /// Resource tags.
+ /// Storage Sync service
+ /// status.
+ /// Storage Sync service
+ /// Uid
+ public StorageSyncService(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), int? storageSyncServiceStatus = default(int?), string storageSyncServiceUid = default(string))
+ : base(location, id, name, type, tags)
+ {
+ StorageSyncServiceStatus = storageSyncServiceStatus;
+ StorageSyncServiceUid = storageSyncServiceUid;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets storage Sync service status.
+ ///
+ [JsonProperty(PropertyName = "properties.storageSyncServiceStatus")]
+ public int? StorageSyncServiceStatus { get; private set; }
+
+ ///
+ /// Gets storage Sync service Uid
+ ///
+ [JsonProperty(PropertyName = "properties.storageSyncServiceUid")]
+ public string StorageSyncServiceUid { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public override void Validate()
+ {
+ base.Validate();
+ }
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncServiceCreateParameters.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncServiceCreateParameters.cs
new file mode 100644
index 000000000000..d9c348ef86c8
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncServiceCreateParameters.cs
@@ -0,0 +1,82 @@
+//
+// 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 Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The parameters used when creating a storage sync service.
+ ///
+ public partial class StorageSyncServiceCreateParameters
+ {
+ ///
+ /// Initializes a new instance of the
+ /// StorageSyncServiceCreateParameters class.
+ ///
+ public StorageSyncServiceCreateParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// StorageSyncServiceCreateParameters class.
+ ///
+ /// Required. Gets or sets the location of the
+ /// resource. This will be one of the supported and registered Azure
+ /// Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo
+ /// region of a resource cannot be changed once it is created, but if
+ /// an identical geo region is specified on update, the request will
+ /// succeed.
+ /// Gets or sets a list of key value pairs that
+ /// describe the resource. These tags can be used for viewing and
+ /// grouping this resource (across resource groups). A maximum of 15
+ /// tags can be provided for a resource. Each tag must have a key with
+ /// a length no greater than 128 characters and a value with a length
+ /// no greater than 256 characters.
+ public StorageSyncServiceCreateParameters(string location = default(string), IDictionary tags = default(IDictionary))
+ {
+ Location = location;
+ Tags = tags;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets required. Gets or sets the location of the resource.
+ /// This will be one of the supported and registered Azure Geo Regions
+ /// (e.g. West US, East US, Southeast Asia, etc.). The geo region of a
+ /// resource cannot be changed once it is created, but if an identical
+ /// geo region is specified on update, the request will succeed.
+ ///
+ [JsonProperty(PropertyName = "location")]
+ public string Location { get; set; }
+
+ ///
+ /// Gets or sets a list of key value pairs that describe the resource.
+ /// These tags can be used for viewing and grouping this resource
+ /// (across resource groups). A maximum of 15 tags can be provided for
+ /// a resource. Each tag must have a key with a length no greater than
+ /// 128 characters and a value with a length no greater than 256
+ /// characters.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncServiceUpdateParameters.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncServiceUpdateParameters.cs
new file mode 100644
index 000000000000..80705ebddee1
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncServiceUpdateParameters.cs
@@ -0,0 +1,66 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Parameters for updating an Storage sync service.
+ ///
+ public partial class StorageSyncServiceUpdateParameters
+ {
+ ///
+ /// Initializes a new instance of the
+ /// StorageSyncServiceUpdateParameters class.
+ ///
+ public StorageSyncServiceUpdateParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// StorageSyncServiceUpdateParameters class.
+ ///
+ /// The user-specified tags associated with the
+ /// storage sync service.
+ /// The properties of the storage sync
+ /// service.
+ public StorageSyncServiceUpdateParameters(IDictionary tags = default(IDictionary), object properties = default(object))
+ {
+ Tags = tags;
+ Properties = properties;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the user-specified tags associated with the storage
+ /// sync service.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ ///
+ /// Gets or sets the properties of the storage sync service.
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public object Properties { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncServicesDeleteHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncServicesDeleteHeaders.cs
new file mode 100644
index 000000000000..f667bd4c719b
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncServicesDeleteHeaders.cs
@@ -0,0 +1,62 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for Delete operation.
+ ///
+ public partial class StorageSyncServicesDeleteHeaders
+ {
+ ///
+ /// Initializes a new instance of the StorageSyncServicesDeleteHeaders
+ /// class.
+ ///
+ public StorageSyncServicesDeleteHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the StorageSyncServicesDeleteHeaders
+ /// class.
+ ///
+ /// request id.
+ /// correlation request
+ /// id.
+ public StorageSyncServicesDeleteHeaders(string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string))
+ {
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncServicesGetHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncServicesGetHeaders.cs
new file mode 100644
index 000000000000..83cf882811f7
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncServicesGetHeaders.cs
@@ -0,0 +1,62 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for Get operation.
+ ///
+ public partial class StorageSyncServicesGetHeaders
+ {
+ ///
+ /// Initializes a new instance of the StorageSyncServicesGetHeaders
+ /// class.
+ ///
+ public StorageSyncServicesGetHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the StorageSyncServicesGetHeaders
+ /// class.
+ ///
+ /// request id.
+ /// correlation request
+ /// id.
+ public StorageSyncServicesGetHeaders(string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string))
+ {
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncServicesListByResourceGroupHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncServicesListByResourceGroupHeaders.cs
new file mode 100644
index 000000000000..3c1691fd16ba
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncServicesListByResourceGroupHeaders.cs
@@ -0,0 +1,62 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for ListByResourceGroup operation.
+ ///
+ public partial class StorageSyncServicesListByResourceGroupHeaders
+ {
+ ///
+ /// Initializes a new instance of the
+ /// StorageSyncServicesListByResourceGroupHeaders class.
+ ///
+ public StorageSyncServicesListByResourceGroupHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// StorageSyncServicesListByResourceGroupHeaders class.
+ ///
+ /// request id.
+ /// correlation request
+ /// id.
+ public StorageSyncServicesListByResourceGroupHeaders(string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string))
+ {
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncServicesListBySubscriptionHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncServicesListBySubscriptionHeaders.cs
new file mode 100644
index 000000000000..20d788211f98
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncServicesListBySubscriptionHeaders.cs
@@ -0,0 +1,62 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for ListBySubscription operation.
+ ///
+ public partial class StorageSyncServicesListBySubscriptionHeaders
+ {
+ ///
+ /// Initializes a new instance of the
+ /// StorageSyncServicesListBySubscriptionHeaders class.
+ ///
+ public StorageSyncServicesListBySubscriptionHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// StorageSyncServicesListBySubscriptionHeaders class.
+ ///
+ /// request id.
+ /// correlation request
+ /// id.
+ public StorageSyncServicesListBySubscriptionHeaders(string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string))
+ {
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncServicesUpdateHeaders.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncServicesUpdateHeaders.cs
new file mode 100644
index 000000000000..8f3f7f78a5fc
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/StorageSyncServicesUpdateHeaders.cs
@@ -0,0 +1,62 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Defines headers for Update operation.
+ ///
+ public partial class StorageSyncServicesUpdateHeaders
+ {
+ ///
+ /// Initializes a new instance of the StorageSyncServicesUpdateHeaders
+ /// class.
+ ///
+ public StorageSyncServicesUpdateHeaders()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the StorageSyncServicesUpdateHeaders
+ /// class.
+ ///
+ /// request id.
+ /// correlation request
+ /// id.
+ public StorageSyncServicesUpdateHeaders(string xMsRequestId = default(string), string xMsCorrelationRequestId = default(string))
+ {
+ XMsRequestId = xMsRequestId;
+ XMsCorrelationRequestId = xMsCorrelationRequestId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-request-id")]
+ public string XMsRequestId { get; set; }
+
+ ///
+ /// Gets or sets correlation request id.
+ ///
+ [JsonProperty(PropertyName = "x-ms-correlation-request-id")]
+ public string XMsCorrelationRequestId { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/SubscriptionState.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/SubscriptionState.cs
new file mode 100644
index 000000000000..fce80beb32f6
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/SubscriptionState.cs
@@ -0,0 +1,70 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Subscription State object.
+ ///
+ 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))
+ {
+ State = state;
+ Istransitioning = istransitioning;
+ 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'
+ ///
+ [JsonProperty(PropertyName = "state")]
+ public string State { get; set; }
+
+ ///
+ /// Gets is Transitioning
+ ///
+ [JsonProperty(PropertyName = "istransitioning")]
+ public bool? Istransitioning { get; private set; }
+
+ ///
+ /// Gets or sets subscription state properties.
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public object Properties { get; set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/SyncGroup.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/SyncGroup.cs
new file mode 100644
index 000000000000..2e88b7016dfd
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/SyncGroup.cs
@@ -0,0 +1,69 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.StorageSync.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Sync Group object.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class SyncGroup : Resource
+ {
+ ///
+ /// Initializes a new instance of the SyncGroup class.
+ ///
+ public SyncGroup()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncGroup class.
+ ///
+ /// Fully qualified resource Id for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. Ex-
+ /// Microsoft.Compute/virtualMachines or
+ /// Microsoft.Storage/storageAccounts.
+ /// Unique Id
+ /// Sync group status
+ public SyncGroup(string id = default(string), string name = default(string), string type = default(string), string uniqueId = default(string), string syncGroupStatus = default(string))
+ : base(id, name, type)
+ {
+ UniqueId = uniqueId;
+ SyncGroupStatus = syncGroupStatus;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets unique Id
+ ///
+ [JsonProperty(PropertyName = "properties.uniqueId")]
+ public string UniqueId { get; set; }
+
+ ///
+ /// Gets sync group status
+ ///
+ [JsonProperty(PropertyName = "properties.syncGroupStatus")]
+ public string SyncGroupStatus { get; private set; }
+
+ }
+}
diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/SyncGroupCreateParameters.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/SyncGroupCreateParameters.cs
new file mode 100644
index 000000000000..a9883f0ece14
--- /dev/null
+++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/SyncGroupCreateParameters.cs
@@ -0,0 +1,89 @@
+//
+// 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 Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The parameters used when creating a sync group.
+ ///
+ public partial class SyncGroupCreateParameters
+ {
+ ///
+ /// Initializes a new instance of the SyncGroupCreateParameters class.
+ ///
+ public SyncGroupCreateParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SyncGroupCreateParameters class.
+ ///
+ /// Required. Gets or sets the location of the
+ /// resource. This will be one of the supported and registered Azure
+ /// Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo
+ /// region of a resource cannot be changed once it is created, but if
+ /// an identical geo region is specified on update, the request will
+ /// succeed.
+ /// Gets or sets a list of key value pairs that
+ /// describe the resource. These tags can be used for viewing and
+ /// grouping this resource (across resource groups). A maximum of 15
+ /// tags can be provided for a resource. Each tag must have a key with
+ /// a length no greater than 128 characters and a value with a length
+ /// no greater than 256 characters.
+ /// The parameters used to create the sync
+ /// group
+ public SyncGroupCreateParameters(string location = default(string), IDictionary tags = default(IDictionary), object properties = default(object))
+ {
+ Location = location;
+ Tags = tags;
+ Properties = properties;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets required. Gets or sets the location of the resource.
+ /// This will be one of the supported and registered Azure Geo Regions
+ /// (e.g. West US, East US, Southeast Asia, etc.). The geo region of a
+ /// resource cannot be changed once it is created, but if an identical
+ /// geo region is specified on update, the request will succeed.
+ ///
+ [JsonProperty(PropertyName = "location")]
+ public string Location { get; set; }
+
+ ///
+ /// Gets or sets a list of key value pairs that describe the resource.
+ /// These tags can be used for viewing and grouping this resource
+ /// (across resource groups). A maximum of 15 tags can be provided for
+ /// a resource. Each tag must have a key with a length no greater than
+ /// 128 characters and a value with a length no greater than 256
+ /// characters.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ ///