diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/AzureDataManagementClient.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/AzureDataManagementClient.cs
new file mode 100644
index 000000000000..6c501df3ffca
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/AzureDataManagementClient.cs
@@ -0,0 +1,401 @@
+//
+// 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.AzureData
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Serialization;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+
+ ///
+ /// The AzureData management API provides a RESTful set of web APIs to
+ /// manage Azure Data Resources.
+ ///
+ public partial class AzureDataManagementClient : ServiceClient, IAzureDataManagementClient, IAzureClient
+ {
+ ///
+ /// The base URI of the service.
+ ///
+ public System.Uri BaseUri { get; set; }
+
+ ///
+ /// Gets or sets json serialization settings.
+ ///
+ public JsonSerializerSettings SerializationSettings { get; private set; }
+
+ ///
+ /// Gets or sets json deserialization settings.
+ ///
+ public JsonSerializerSettings DeserializationSettings { get; private set; }
+
+ ///
+ /// Credentials needed for the client to connect to Azure.
+ ///
+ public ServiceClientCredentials Credentials { get; private set; }
+
+ ///
+ /// The ID of the Azure subscription
+ ///
+ public string SubscriptionId { get; set; }
+
+ ///
+ /// The API version to use for the request
+ ///
+ public string ApiVersion { get; private set; }
+
+ ///
+ /// Subscription ID that identifies an Azure subscription.
+ ///
+ public string SubscriptionId1 { get; set; }
+
+ ///
+ /// API version to use for the request.
+ ///
+ public string ApiVersion1 { get; set; }
+
+ ///
+ /// The preferred language for the response.
+ ///
+ public string AcceptLanguage { get; set; }
+
+ ///
+ /// The retry timeout in seconds for Long Running Operations. Default value is
+ /// 30.
+ ///
+ public int? LongRunningOperationRetryTimeout { get; set; }
+
+ ///
+ /// Whether a unique x-ms-client-request-id should be generated. When set to
+ /// true a unique x-ms-client-request-id value is generated and included in
+ /// each request. Default is true.
+ ///
+ public bool? GenerateClientRequestId { get; set; }
+
+ ///
+ /// Gets the IOperations.
+ ///
+ public virtual IOperations Operations { get; private set; }
+
+ ///
+ /// Gets the ISqlServerRegistrationsOperations.
+ ///
+ public virtual ISqlServerRegistrationsOperations SqlServerRegistrations { get; private set; }
+
+ ///
+ /// Gets the ISqlServersOperations.
+ ///
+ public virtual ISqlServersOperations SqlServers { get; private set; }
+
+ ///
+ /// Gets the ISqlInstancesOperations.
+ ///
+ public virtual ISqlInstancesOperations SqlInstances { get; private set; }
+
+ ///
+ /// Gets the IPostgresInstancesOperations.
+ ///
+ public virtual IPostgresInstancesOperations PostgresInstances { get; private set; }
+
+ ///
+ /// Gets the IHybridDataManagersOperations.
+ ///
+ public virtual IHybridDataManagersOperations HybridDataManagers { get; private set; }
+
+ ///
+ /// Initializes a new instance of the AzureDataManagementClient class.
+ ///
+ ///
+ /// HttpClient to be used
+ ///
+ ///
+ /// True: will dispose the provided httpClient on calling AzureDataManagementClient.Dispose(). False: will not dispose provided httpClient
+ protected AzureDataManagementClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)
+ {
+ Initialize();
+ }
+
+ ///
+ /// Initializes a new instance of the AzureDataManagementClient class.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ protected AzureDataManagementClient(params DelegatingHandler[] handlers) : base(handlers)
+ {
+ Initialize();
+ }
+
+ ///
+ /// Initializes a new instance of the AzureDataManagementClient class.
+ ///
+ ///
+ /// Optional. The http client handler used to handle http transport.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ protected AzureDataManagementClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers)
+ {
+ Initialize();
+ }
+
+ ///
+ /// Initializes a new instance of the AzureDataManagementClient class.
+ ///
+ ///
+ /// Optional. The base URI of the service.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ protected AzureDataManagementClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ BaseUri = baseUri;
+ }
+
+ ///
+ /// Initializes a new instance of the AzureDataManagementClient class.
+ ///
+ ///
+ /// Optional. The base URI of the service.
+ ///
+ ///
+ /// Optional. The http client handler used to handle http transport.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ protected AzureDataManagementClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ BaseUri = baseUri;
+ }
+
+ ///
+ /// Initializes a new instance of the AzureDataManagementClient class.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public AzureDataManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
+ ///
+ /// Initializes a new instance of the AzureDataManagementClient class.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// HttpClient to be used
+ ///
+ ///
+ /// True: will dispose the provided httpClient on calling AzureDataManagementClient.Dispose(). False: will not dispose provided httpClient
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public AzureDataManagementClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
+ ///
+ /// Initializes a new instance of the AzureDataManagementClient class.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// Optional. The http client handler used to handle http transport.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public AzureDataManagementClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
+ ///
+ /// Initializes a new instance of the AzureDataManagementClient class.
+ ///
+ ///
+ /// Optional. The base URI of the service.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public AzureDataManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ BaseUri = baseUri;
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
+ ///
+ /// Initializes a new instance of the AzureDataManagementClient class.
+ ///
+ ///
+ /// Optional. The base URI of the service.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// Optional. The http client handler used to handle http transport.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public AzureDataManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ BaseUri = baseUri;
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
+ ///
+ /// An optional partial-method to perform custom initialization.
+ ///
+ partial void CustomInitialize();
+ ///
+ /// Initializes client properties.
+ ///
+ private void Initialize()
+ {
+ Operations = new Operations(this);
+ SqlServerRegistrations = new SqlServerRegistrationsOperations(this);
+ SqlServers = new SqlServersOperations(this);
+ SqlInstances = new SqlInstancesOperations(this);
+ PostgresInstances = new PostgresInstancesOperations(this);
+ HybridDataManagers = new HybridDataManagersOperations(this);
+ BaseUri = new System.Uri("https://management.azure.com");
+ ApiVersion = "2019-07-24-preview";
+ AcceptLanguage = "en-US";
+ LongRunningOperationRetryTimeout = 30;
+ GenerateClientRequestId = true;
+ SerializationSettings = new JsonSerializerSettings
+ {
+ Formatting = Newtonsoft.Json.Formatting.Indented,
+ DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
+ DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
+ NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
+ ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
+ ContractResolver = new ReadOnlyJsonContractResolver(),
+ Converters = new List
+ {
+ new Iso8601TimeSpanConverter()
+ }
+ };
+ SerializationSettings.Converters.Add(new TransformationJsonConverter());
+ DeserializationSettings = new JsonSerializerSettings
+ {
+ DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
+ DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
+ NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
+ ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
+ ContractResolver = new ReadOnlyJsonContractResolver(),
+ Converters = new List
+ {
+ new Iso8601TimeSpanConverter()
+ }
+ };
+ CustomInitialize();
+ DeserializationSettings.Converters.Add(new TransformationJsonConverter());
+ DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
+ }
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/HybridDataManagersOperations.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/HybridDataManagersOperations.cs
new file mode 100644
index 000000000000..1cbb439ec511
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/HybridDataManagersOperations.cs
@@ -0,0 +1,1567 @@
+//
+// 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.AzureData
+{
+ 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;
+
+ ///
+ /// HybridDataManagersOperations operations.
+ ///
+ internal partial class HybridDataManagersOperations : IServiceOperations, IHybridDataManagersOperations
+ {
+ ///
+ /// Initializes a new instance of the HybridDataManagersOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal HybridDataManagersOperations(AzureDataManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the AzureDataManagementClient
+ ///
+ public AzureDataManagementClient Client { get; private set; }
+
+ ///
+ /// List hybridDataManager resources in the subscription
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.AzureData/hybridDataManagers").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// List hybridDataManager resources in the resource group
+ ///
+ ///
+ /// Get a hybridDataManager list by Resource group name.
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// 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>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", 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.AzureData/hybridDataManagers").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Creates or replaces a hybridDataManager resource
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// Name of HybridDataManagerName
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string hybridDataManagerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (hybridDataManagerName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "hybridDataManagerName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("hybridDataManagerName", hybridDataManagerName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureData/hybridDataManagers/{hybridDataManagerName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{hybridDataManagerName}", System.Uri.EscapeDataString(hybridDataManagerName));
+ 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;
+ // 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 != 201)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 201)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Deletes a hybridDataManager resource
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// Name of HybridDataManager
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string hybridDataManagerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (hybridDataManagerName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "hybridDataManagerName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("hybridDataManagerName", hybridDataManagerName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureData/hybridDataManagers/{hybridDataManagerName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{hybridDataManagerName}", System.Uri.EscapeDataString(hybridDataManagerName));
+ 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 != 204)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Retrieves a hybridDataManager resource
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// Name of HybridDataManager
+ ///
+ ///
+ /// 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 hybridDataManagerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (hybridDataManagerName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "hybridDataManagerName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("hybridDataManagerName", hybridDataManagerName);
+ 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.AzureData/hybridDataManagers/{hybridDataManagerName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{hybridDataManagerName}", System.Uri.EscapeDataString(hybridDataManagerName));
+ 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Updates a hybridDataManager resource
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// Name of HybridDataManager
+ ///
+ ///
+ /// Resource tags.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string hybridDataManagerName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (hybridDataManagerName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "hybridDataManagerName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ HybridDataManagerUpdate parameters = new HybridDataManagerUpdate();
+ if (tags != null)
+ {
+ parameters.Tags = tags;
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("hybridDataManagerName", hybridDataManagerName);
+ tracingParameters.Add("parameters", parameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureData/hybridDataManagers/{hybridDataManagerName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{hybridDataManagerName}", System.Uri.EscapeDataString(hybridDataManagerName));
+ 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("PATCH");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(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)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// List hybridDataManager resources in the subscription
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// List hybridDataManager resources in the resource group
+ ///
+ ///
+ /// Get a hybridDataManager list by Resource group name.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/HybridDataManagersOperationsExtensions.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/HybridDataManagersOperationsExtensions.cs
new file mode 100644
index 000000000000..17b4fefe3a44
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/HybridDataManagersOperationsExtensions.cs
@@ -0,0 +1,332 @@
+//
+// 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.AzureData
+{
+ 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 HybridDataManagersOperations.
+ ///
+ public static partial class HybridDataManagersOperationsExtensions
+ {
+ ///
+ /// List hybridDataManager resources in the subscription
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ public static IPage List(this IHybridDataManagersOperations operations)
+ {
+ return operations.ListAsync().GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List hybridDataManager resources in the subscription
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this IHybridDataManagersOperations operations, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// List hybridDataManager resources in the resource group
+ ///
+ ///
+ /// Get a hybridDataManager list by Resource group name.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ public static IPage ListByResourceGroup(this IHybridDataManagersOperations operations, string resourceGroupName)
+ {
+ return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List hybridDataManager resources in the resource group
+ ///
+ ///
+ /// Get a hybridDataManager list by Resource group name.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListByResourceGroupAsync(this IHybridDataManagersOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Creates or replaces a hybridDataManager resource
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// Name of HybridDataManagerName
+ ///
+ public static HybridDataManager Create(this IHybridDataManagersOperations operations, string resourceGroupName, string hybridDataManagerName)
+ {
+ return operations.CreateAsync(resourceGroupName, hybridDataManagerName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Creates or replaces a hybridDataManager resource
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// Name of HybridDataManagerName
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateAsync(this IHybridDataManagersOperations operations, string resourceGroupName, string hybridDataManagerName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, hybridDataManagerName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Deletes a hybridDataManager resource
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// Name of HybridDataManager
+ ///
+ public static void Delete(this IHybridDataManagersOperations operations, string resourceGroupName, string hybridDataManagerName)
+ {
+ operations.DeleteAsync(resourceGroupName, hybridDataManagerName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Deletes a hybridDataManager resource
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// Name of HybridDataManager
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DeleteAsync(this IHybridDataManagersOperations operations, string resourceGroupName, string hybridDataManagerName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, hybridDataManagerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Retrieves a hybridDataManager resource
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// Name of HybridDataManager
+ ///
+ public static HybridDataManager Get(this IHybridDataManagersOperations operations, string resourceGroupName, string hybridDataManagerName)
+ {
+ return operations.GetAsync(resourceGroupName, hybridDataManagerName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Retrieves a hybridDataManager resource
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// Name of HybridDataManager
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IHybridDataManagersOperations operations, string resourceGroupName, string hybridDataManagerName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, hybridDataManagerName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Updates a hybridDataManager resource
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// Name of HybridDataManager
+ ///
+ ///
+ /// Resource tags.
+ ///
+ public static HybridDataManager Update(this IHybridDataManagersOperations operations, string resourceGroupName, string hybridDataManagerName, IDictionary tags = default(IDictionary))
+ {
+ return operations.UpdateAsync(resourceGroupName, hybridDataManagerName, tags).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Updates a hybridDataManager resource
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// Name of HybridDataManager
+ ///
+ ///
+ /// Resource tags.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task UpdateAsync(this IHybridDataManagersOperations operations, string resourceGroupName, string hybridDataManagerName, IDictionary tags = default(IDictionary), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, hybridDataManagerName, tags, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// List hybridDataManager resources in the subscription
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this IHybridDataManagersOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List hybridDataManager resources in the subscription
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListNextAsync(this IHybridDataManagersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// List hybridDataManager resources in the resource group
+ ///
+ ///
+ /// Get a hybridDataManager list by Resource group name.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListByResourceGroupNext(this IHybridDataManagersOperations operations, string nextPageLink)
+ {
+ return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List hybridDataManager resources in the resource group
+ ///
+ ///
+ /// Get a hybridDataManager list by Resource group name.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListByResourceGroupNextAsync(this IHybridDataManagersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/IAzureDataManagementClient.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/IAzureDataManagementClient.cs
new file mode 100644
index 000000000000..da221116457f
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/IAzureDataManagementClient.cs
@@ -0,0 +1,114 @@
+//
+// 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.AzureData
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+
+ ///
+ /// The AzureData management API provides a RESTful set of web APIs to
+ /// manage Azure Data Resources.
+ ///
+ public partial interface IAzureDataManagementClient : 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 ID of the Azure subscription
+ ///
+ string SubscriptionId { get; set; }
+
+ ///
+ /// The API version to use for the request
+ ///
+ string ApiVersion { get; }
+
+ ///
+ /// Subscription ID that identifies an Azure subscription.
+ ///
+ string SubscriptionId1 { get; set; }
+
+ ///
+ /// API version to use for the request.
+ ///
+ string ApiVersion1 { 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 ISqlServerRegistrationsOperations.
+ ///
+ ISqlServerRegistrationsOperations SqlServerRegistrations { get; }
+
+ ///
+ /// Gets the ISqlServersOperations.
+ ///
+ ISqlServersOperations SqlServers { get; }
+
+ ///
+ /// Gets the ISqlInstancesOperations.
+ ///
+ ISqlInstancesOperations SqlInstances { get; }
+
+ ///
+ /// Gets the IPostgresInstancesOperations.
+ ///
+ IPostgresInstancesOperations PostgresInstances { get; }
+
+ ///
+ /// Gets the IHybridDataManagersOperations.
+ ///
+ IHybridDataManagersOperations HybridDataManagers { get; }
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/IHybridDataManagersOperations.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/IHybridDataManagersOperations.cs
new file mode 100644
index 000000000000..9de42752b030
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/IHybridDataManagersOperations.cs
@@ -0,0 +1,218 @@
+//
+// 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.AzureData
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// HybridDataManagersOperations operations.
+ ///
+ public partial interface IHybridDataManagersOperations
+ {
+ ///
+ /// List hybridDataManager resources in the 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>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List hybridDataManager resources in the resource group
+ ///
+ ///
+ /// Get a hybridDataManager list by Resource group name.
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// 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>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates or replaces a hybridDataManager resource
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// Name of HybridDataManagerName
+ ///
+ ///
+ /// 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 hybridDataManagerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a hybridDataManager resource
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// Name of HybridDataManager
+ ///
+ ///
+ /// 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 hybridDataManagerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Retrieves a hybridDataManager resource
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// Name of HybridDataManager
+ ///
+ ///
+ /// 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 hybridDataManagerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates a hybridDataManager resource
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// Name of HybridDataManager
+ ///
+ ///
+ /// Resource tags.
+ ///
+ ///
+ /// 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 hybridDataManagerName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List hybridDataManager resources in the subscription
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List hybridDataManager resources in the resource group
+ ///
+ ///
+ /// Get a hybridDataManager list by Resource group name.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/IOperations.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/IOperations.cs
new file mode 100644
index 000000000000..acdae74b1442
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/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.AzureData
+{
+ 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 SQL Server Registration 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>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all of the available SQL Server Registration 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>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/IPostgresInstancesOperations.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/IPostgresInstancesOperations.cs
new file mode 100644
index 000000000000..fa8944cd1867
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/IPostgresInstancesOperations.cs
@@ -0,0 +1,218 @@
+//
+// 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.AzureData
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// PostgresInstancesOperations operations.
+ ///
+ public partial interface IPostgresInstancesOperations
+ {
+ ///
+ /// List postgres Instance resources in the 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>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List postgres Instance resources in the resource group
+ ///
+ ///
+ /// Get a postgres Instances list by Resource group name.
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// 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>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Retrieves a postgres Instance resource
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// Name of Postgres Instance
+ ///
+ ///
+ /// 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 postgresInstanceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates or replaces a postgres Instance resource
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// Name of PostgresInstance
+ ///
+ ///
+ /// 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 postgresInstanceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a postgres Instance resource
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// Name of Postgres Instance
+ ///
+ ///
+ /// 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 postgresInstanceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates a postgres Instance resource
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// Name of Postgres Instance
+ ///
+ ///
+ /// The Postgres Instance.
+ ///
+ ///
+ /// 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 postgresInstanceName, PostgresInstanceUpdate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List postgres Instance resources in the subscription
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List postgres Instance resources in the resource group
+ ///
+ ///
+ /// Get a postgres Instances list by Resource group name.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/ISqlInstancesOperations.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/ISqlInstancesOperations.cs
new file mode 100644
index 000000000000..ad8501df498a
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/ISqlInstancesOperations.cs
@@ -0,0 +1,221 @@
+//
+// 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.AzureData
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// SqlInstancesOperations operations.
+ ///
+ public partial interface ISqlInstancesOperations
+ {
+ ///
+ /// List sqlInstance resources in the 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>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List sqlInstance resources in the resource group
+ ///
+ ///
+ /// Gets all sqlInstances in a resource group.
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// 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>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Retrieves a SQL Instance resource
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// Name of SQL Instance
+ ///
+ ///
+ /// 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 sqlInstanceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates or replaces a SQL Instance resource
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// The name of SQL Instances
+ ///
+ ///
+ /// The SQL Instance to be created or updated.
+ ///
+ ///
+ /// 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 sqlInstanceName, SqlInstance parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a SQL Instance resource
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// The name of Sql Instances
+ ///
+ ///
+ /// 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 sqlInstanceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates a SQL Instance resource
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// Name of sqlInstance
+ ///
+ ///
+ /// Resource tags.
+ ///
+ ///
+ /// 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 sqlInstanceName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List sqlInstance resources in the subscription
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List sqlInstance resources in the resource group
+ ///
+ ///
+ /// Gets all sqlInstances in a resource group.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/ISqlServerRegistrationsOperations.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/ISqlServerRegistrationsOperations.cs
new file mode 100644
index 000000000000..e68c7818e987
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/ISqlServerRegistrationsOperations.cs
@@ -0,0 +1,225 @@
+//
+// 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.AzureData
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// SqlServerRegistrationsOperations operations.
+ ///
+ public partial interface ISqlServerRegistrationsOperations
+ {
+ ///
+ /// Gets a SQL Server registration.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// Name of the SQL Server registration.
+ ///
+ ///
+ /// 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 sqlServerRegistrationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates or updates a SQL Server registration.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// Name of the SQL Server registration.
+ ///
+ ///
+ /// The SQL Server registration to be created or updated.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string sqlServerRegistrationName, SqlServerRegistration parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a SQL Server registration.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// Name of the SQL Server registration.
+ ///
+ ///
+ /// 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 sqlServerRegistrationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Updates SQL Server Registration tags.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// Name of the SQL Server registration.
+ ///
+ ///
+ /// Resource tags.
+ ///
+ ///
+ /// 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 sqlServerRegistrationName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets all SQL Server registrations in a resource group.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// 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>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets all SQL Server registrations in a 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>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets all SQL Server registrations in a resource group.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets all SQL Server registrations in a subscription.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/ISqlServersOperations.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/ISqlServersOperations.cs
new file mode 100644
index 000000000000..03f4b273b912
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/ISqlServersOperations.cs
@@ -0,0 +1,172 @@
+//
+// 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.AzureData
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// SqlServersOperations operations.
+ ///
+ public partial interface ISqlServersOperations
+ {
+ ///
+ /// Gets a SQL Server.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// Name of the SQL Server registration.
+ ///
+ ///
+ /// Name of the SQL Server.
+ ///
+ ///
+ /// The child resources to include in the response.
+ ///
+ ///
+ /// 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 sqlServerRegistrationName, string sqlServerName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Creates or updates a SQL Server.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// Name of the SQL Server registration.
+ ///
+ ///
+ /// Name of the SQL Server.
+ ///
+ ///
+ /// The SQL Server to be created or updated.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string sqlServerRegistrationName, string sqlServerName, SqlServer parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a SQL Server.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// Name of the SQL Server registration.
+ ///
+ ///
+ /// Name of the SQL 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 sqlServerRegistrationName, string sqlServerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets all SQL Servers in a SQL Server Registration.
+ ///
+ ///
+ /// Name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// Name of the SQL Server registration.
+ ///
+ ///
+ /// The child resources to include in the response.
+ ///
+ ///
+ /// 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>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string sqlServerRegistrationName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets all SQL Servers in a SQL Server Registration.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/HybridDataManager.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/HybridDataManager.cs
new file mode 100644
index 000000000000..e52cfbede952
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/HybridDataManager.cs
@@ -0,0 +1,63 @@
+//
+// 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.AzureData.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Hybrid data manager resource
+ ///
+ public partial class HybridDataManager : TrackedResource
+ {
+ ///
+ /// Initializes a new instance of the HybridDataManager class.
+ ///
+ public HybridDataManager()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the HybridDataManager 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.
+ /// null
+ public HybridDataManager(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), object properties = default(object))
+ : base(location, id, name, type, tags)
+ {
+ Properties = properties;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets null
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public object Properties { get; set; }
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/HybridDataManagerUpdate.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/HybridDataManagerUpdate.cs
new file mode 100644
index 000000000000..5c55f013bfa9
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/HybridDataManagerUpdate.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.AzureData.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// An update to a HybridDataManager.
+ ///
+ public partial class HybridDataManagerUpdate
+ {
+ ///
+ /// Initializes a new instance of the HybridDataManagerUpdate class.
+ ///
+ public HybridDataManagerUpdate()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the HybridDataManagerUpdate class.
+ ///
+ /// Resource tags.
+ public HybridDataManagerUpdate(IDictionary tags = default(IDictionary))
+ {
+ Tags = tags;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets resource tags.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/Identity.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/Identity.cs
new file mode 100644
index 000000000000..82bce23f30e7
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/Identity.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.AzureData.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Identity for the resource.
+ ///
+ public partial class Identity
+ {
+ ///
+ /// Initializes a new instance of the Identity class.
+ ///
+ public Identity()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Identity class.
+ ///
+ /// The principal ID of resource
+ /// identity.
+ /// The tenant ID of resource.
+ /// The identity type. Possible values include:
+ /// 'SystemAssigned'
+ public Identity(string principalId = default(string), string tenantId = default(string), ResourceIdentityType? type = default(ResourceIdentityType?))
+ {
+ PrincipalId = principalId;
+ TenantId = tenantId;
+ Type = type;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the principal ID of resource identity.
+ ///
+ [JsonProperty(PropertyName = "principalId")]
+ public string PrincipalId { get; private set; }
+
+ ///
+ /// Gets the tenant ID of resource.
+ ///
+ [JsonProperty(PropertyName = "tenantId")]
+ public string TenantId { get; private set; }
+
+ ///
+ /// Gets or sets the identity type. Possible values include:
+ /// 'SystemAssigned'
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public ResourceIdentityType? Type { get; set; }
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/ODataError.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/ODataError.cs
new file mode 100644
index 000000000000..4a9985a7a9d8
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/ODataError.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.AzureData.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Information about an error.
+ ///
+ public partial class ODataError
+ {
+ ///
+ /// Initializes a new instance of the ODataError class.
+ ///
+ public ODataError()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ODataError class.
+ ///
+ /// A language-independent error name.
+ /// The error message.
+ /// The target of the error (for example, the name
+ /// of the property in error).
+ /// The error details.
+ public ODataError(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList))
+ {
+ 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 a language-independent error name.
+ ///
+ [JsonProperty(PropertyName = "code")]
+ public string Code { get; set; }
+
+ ///
+ /// Gets or sets the error message.
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; set; }
+
+ ///
+ /// Gets or sets the target of the error (for example, the name of the
+ /// property in error).
+ ///
+ [JsonProperty(PropertyName = "target")]
+ public string Target { get; set; }
+
+ ///
+ /// Gets or sets the error details.
+ ///
+ [JsonProperty(PropertyName = "details")]
+ public IList Details { get; set; }
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/Operation.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/Operation.cs
new file mode 100644
index 000000000000..621d5a1aa2c1
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/Operation.cs
@@ -0,0 +1,84 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.AzureData.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// SQL REST API operation definition.
+ ///
+ public partial class Operation
+ {
+ ///
+ /// Initializes a new instance of the Operation class.
+ ///
+ public Operation()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Operation class.
+ ///
+ /// The name of the operation being performed on
+ /// this particular object.
+ /// The localized display information for this
+ /// particular operation / action.
+ /// The intended executor of the operation.
+ /// Possible values include: 'user', 'system'
+ /// Additional descriptions for the
+ /// operation.
+ public Operation(string name = default(string), OperationDisplay display = default(OperationDisplay), string origin = default(string), IDictionary properties = default(IDictionary))
+ {
+ Name = name;
+ Display = display;
+ Origin = origin;
+ Properties = properties;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the name of the operation being performed on this particular
+ /// object.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets the localized display information for this particular
+ /// operation / action.
+ ///
+ [JsonProperty(PropertyName = "display")]
+ public OperationDisplay Display { get; private set; }
+
+ ///
+ /// Gets the intended executor of the operation. Possible values
+ /// include: 'user', 'system'
+ ///
+ [JsonProperty(PropertyName = "origin")]
+ public string Origin { get; private set; }
+
+ ///
+ /// Gets additional descriptions for the operation.
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public IDictionary Properties { get; private set; }
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/OperationDisplay.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/OperationDisplay.cs
new file mode 100644
index 000000000000..15aef72d3617
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/OperationDisplay.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.AzureData.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Display metadata associated with the operation.
+ ///
+ public partial class OperationDisplay
+ {
+ ///
+ /// Initializes a new instance of the OperationDisplay class.
+ ///
+ public OperationDisplay()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the OperationDisplay class.
+ ///
+ /// The localized friendly form of the resource
+ /// provider name.
+ /// The localized friendly form of the resource
+ /// type related to this action/operation.
+ /// The localized friendly name for the
+ /// operation.
+ /// The localized friendly description for
+ /// the operation.
+ public OperationDisplay(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 the localized friendly form of the resource provider name.
+ ///
+ [JsonProperty(PropertyName = "provider")]
+ public string Provider { get; private set; }
+
+ ///
+ /// Gets the localized friendly form of the resource type related to
+ /// this action/operation.
+ ///
+ [JsonProperty(PropertyName = "resource")]
+ public string Resource { get; private set; }
+
+ ///
+ /// Gets the localized friendly name for the operation.
+ ///
+ [JsonProperty(PropertyName = "operation")]
+ public string Operation { get; private set; }
+
+ ///
+ /// Gets the localized friendly description for the operation.
+ ///
+ [JsonProperty(PropertyName = "description")]
+ public string Description { get; private set; }
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/OperationOrigin.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/OperationOrigin.cs
new file mode 100644
index 000000000000..9f10c0e7c149
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/OperationOrigin.cs
@@ -0,0 +1,22 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.AzureData.Models
+{
+
+ ///
+ /// Defines values for OperationOrigin.
+ ///
+ public static class OperationOrigin
+ {
+ public const string User = "user";
+ public const string System = "system";
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/Page.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/Page.cs
new file mode 100644
index 000000000000..f3705970910c
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/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.AzureData.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/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/Plan.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/Plan.cs
new file mode 100644
index 000000000000..679c591801ca
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/Plan.cs
@@ -0,0 +1,94 @@
+//
+// 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.AzureData.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Plan for the resource.
+ ///
+ public partial class Plan
+ {
+ ///
+ /// Initializes a new instance of the Plan class.
+ ///
+ public Plan()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Plan class.
+ ///
+ /// A user defined name of the 3rd Party Artifact
+ /// that is being procured.
+ /// The publisher of the 3rd Party Artifact
+ /// that is being bought. E.g. NewRelic
+ /// The 3rd Party artifact that is being
+ /// procured. E.g. NewRelic. Product maps to the OfferID specified for
+ /// the artifact at the time of Data Market onboarding.
+ /// A publisher provided promotion code as
+ /// provisioned in Data Market for the said product/artifact.
+ /// The version of the desired
+ /// product/artifact.
+ public Plan(string name, string publisher, string product, string promotionCode = default(string), string version = default(string))
+ {
+ Name = name;
+ Publisher = publisher;
+ Product = product;
+ PromotionCode = promotionCode;
+ Version = version;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets a user defined name of the 3rd Party Artifact that is
+ /// being procured.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets the publisher of the 3rd Party Artifact that is being
+ /// bought. E.g. NewRelic
+ ///
+ [JsonProperty(PropertyName = "publisher")]
+ public string Publisher { get; set; }
+
+ ///
+ /// Gets or sets the 3rd Party artifact that is being procured. E.g.
+ /// NewRelic. Product maps to the OfferID specified for the artifact at
+ /// the time of Data Market onboarding.
+ ///
+ [JsonProperty(PropertyName = "product")]
+ public string Product { get; set; }
+
+ ///
+ /// Gets or sets a publisher provided promotion code as provisioned in
+ /// Data Market for the said product/artifact.
+ ///
+ [JsonProperty(PropertyName = "promotionCode")]
+ public string PromotionCode { get; set; }
+
+ ///
+ /// Gets or sets the version of the desired product/artifact.
+ ///
+ [JsonProperty(PropertyName = "version")]
+ public string Version { get; set; }
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/PostgresInstance.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/PostgresInstance.cs
new file mode 100644
index 000000000000..bbe16a8bcd83
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/PostgresInstance.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.AzureData.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// A Postgres Instance.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class PostgresInstance : TrackedResource
+ {
+ ///
+ /// Initializes a new instance of the PostgresInstance class.
+ ///
+ public PostgresInstance()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PostgresInstance 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.
+ /// null
+ public PostgresInstance(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string hybridDataManagerId = default(string))
+ : base(location, id, name, type, tags)
+ {
+ HybridDataManagerId = hybridDataManagerId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets null
+ ///
+ [JsonProperty(PropertyName = "properties.hybridDataManagerId")]
+ public string HybridDataManagerId { get; set; }
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/PostgresInstanceUpdate.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/PostgresInstanceUpdate.cs
new file mode 100644
index 000000000000..7684cb680f07
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/PostgresInstanceUpdate.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.AzureData.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// An update to a Postgres Instance.
+ ///
+ public partial class PostgresInstanceUpdate
+ {
+ ///
+ /// Initializes a new instance of the PostgresInstanceUpdate class.
+ ///
+ public PostgresInstanceUpdate()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PostgresInstanceUpdate class.
+ ///
+ /// Resource tags.
+ /// null
+ public PostgresInstanceUpdate(IDictionary tags = default(IDictionary), string hybridDataManagerId = default(string))
+ {
+ Tags = tags;
+ HybridDataManagerId = hybridDataManagerId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets resource tags.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ ///
+ /// Gets or sets null
+ ///
+ [JsonProperty(PropertyName = "hybridDataManagerId")]
+ public string HybridDataManagerId { get; set; }
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/ProxyResource.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/ProxyResource.cs
new file mode 100644
index 000000000000..d5dbe01db26e
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/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.AzureData.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/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/Resource.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/Resource.cs
new file mode 100644
index 000000000000..4f6ec1f7d8aa
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/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.AzureData.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/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/ResourceIdentityType.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/ResourceIdentityType.cs
new file mode 100644
index 000000000000..5e00a959d044
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/ResourceIdentityType.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.AzureData.Models
+{
+ using Newtonsoft.Json;
+ using Newtonsoft.Json.Converters;
+ using System.Runtime;
+ using System.Runtime.Serialization;
+
+ ///
+ /// Defines values for ResourceIdentityType.
+ ///
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum ResourceIdentityType
+ {
+ [EnumMember(Value = "SystemAssigned")]
+ SystemAssigned
+ }
+ internal static class ResourceIdentityTypeEnumExtension
+ {
+ internal static string ToSerializedValue(this ResourceIdentityType? value)
+ {
+ return value == null ? null : ((ResourceIdentityType)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this ResourceIdentityType value)
+ {
+ switch( value )
+ {
+ case ResourceIdentityType.SystemAssigned:
+ return "SystemAssigned";
+ }
+ return null;
+ }
+
+ internal static ResourceIdentityType? ParseResourceIdentityType(this string value)
+ {
+ switch( value )
+ {
+ case "SystemAssigned":
+ return ResourceIdentityType.SystemAssigned;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/ResourceModelWithAllowedPropertySet.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/ResourceModelWithAllowedPropertySet.cs
new file mode 100644
index 000000000000..d5f06cb6a520
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/ResourceModelWithAllowedPropertySet.cs
@@ -0,0 +1,166 @@
+//
+// 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.AzureData.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The resource model definition containing the full set of allowed
+ /// properties for a resource. Except properties bag, there cannot be a top
+ /// level property outside of this set.
+ ///
+ public partial class ResourceModelWithAllowedPropertySet : IResource
+ {
+ ///
+ /// Initializes a new instance of the
+ /// ResourceModelWithAllowedPropertySet class.
+ ///
+ public ResourceModelWithAllowedPropertySet()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// ResourceModelWithAllowedPropertySet 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..
+ /// The geo-location where the resource
+ /// lives
+ /// The fully qualified resource ID of the
+ /// resource that manages this resource. Indicates if this resource is
+ /// managed by another azure resource. If this is present, complete
+ /// mode deployment will not delete the resource if it is removed from
+ /// the template since it is managed by another resource.
+ /// Metadata used by portal/tooling/etc to render
+ /// different UX experiences for resources of the same type; e.g.
+ /// ApiApps are a kind of Microsoft.Web/sites type. If supported, the
+ /// resource provider must validate and persist this value.
+ /// The etag field is *not* required. If it is
+ /// provided in the response body, it must also be provided as a header
+ /// per the normal etag convention. Entity tags are used for comparing
+ /// two or more entities from the same requested resource. HTTP/1.1
+ /// uses entity tags in the etag (section 14.19), If-Match (section
+ /// 14.24), If-None-Match (section 14.26), and If-Range (section 14.27)
+ /// header fields.
+ /// Resource tags.
+ public ResourceModelWithAllowedPropertySet(string id = default(string), string name = default(string), string type = default(string), string location = default(string), string managedBy = default(string), string kind = default(string), string etag = default(string), IDictionary tags = default(IDictionary), ResourceModelWithAllowedPropertySetIdentity identity = default(ResourceModelWithAllowedPropertySetIdentity), ResourceModelWithAllowedPropertySetSku sku = default(ResourceModelWithAllowedPropertySetSku), ResourceModelWithAllowedPropertySetPlan plan = default(ResourceModelWithAllowedPropertySetPlan))
+ {
+ Id = id;
+ Name = name;
+ Type = type;
+ Location = location;
+ ManagedBy = managedBy;
+ Kind = kind;
+ Etag = etag;
+ Tags = tags;
+ Identity = identity;
+ Sku = sku;
+ Plan = plan;
+ 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; }
+
+ ///
+ /// Gets or sets the geo-location where the resource lives
+ ///
+ [JsonProperty(PropertyName = "location")]
+ public string Location { get; set; }
+
+ ///
+ /// Gets or sets the fully qualified resource ID of the resource that
+ /// manages this resource. Indicates if this resource is managed by
+ /// another azure resource. If this is present, complete mode
+ /// deployment will not delete the resource if it is removed from the
+ /// template since it is managed by another resource.
+ ///
+ [JsonProperty(PropertyName = "managedBy")]
+ public string ManagedBy { get; set; }
+
+ ///
+ /// Gets or sets metadata used by portal/tooling/etc to render
+ /// different UX experiences for resources of the same type; e.g.
+ /// ApiApps are a kind of Microsoft.Web/sites type. If supported, the
+ /// resource provider must validate and persist this value.
+ ///
+ [JsonProperty(PropertyName = "kind")]
+ public string Kind { get; set; }
+
+ ///
+ /// Gets the etag field is *not* required. If it is provided in the
+ /// response body, it must also be provided as a header per the normal
+ /// etag convention. Entity tags are used for comparing two or more
+ /// entities from the same requested resource. HTTP/1.1 uses entity
+ /// tags in the etag (section 14.19), If-Match (section 14.24),
+ /// If-None-Match (section 14.26), and If-Range (section 14.27) header
+ /// fields.
+ ///
+ [JsonProperty(PropertyName = "etag")]
+ public string Etag { get; private set; }
+
+ ///
+ /// Gets or sets resource tags.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "identity")]
+ public ResourceModelWithAllowedPropertySetIdentity Identity { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "sku")]
+ public ResourceModelWithAllowedPropertySetSku Sku { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "plan")]
+ public ResourceModelWithAllowedPropertySetPlan Plan { get; set; }
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/ResourceModelWithAllowedPropertySetIdentity.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/ResourceModelWithAllowedPropertySetIdentity.cs
new file mode 100644
index 000000000000..908a7cb8497e
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/ResourceModelWithAllowedPropertySetIdentity.cs
@@ -0,0 +1,47 @@
+//
+// 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.AzureData.Models
+{
+ using System.Linq;
+
+ public partial class ResourceModelWithAllowedPropertySetIdentity : Identity
+ {
+ ///
+ /// Initializes a new instance of the
+ /// ResourceModelWithAllowedPropertySetIdentity class.
+ ///
+ public ResourceModelWithAllowedPropertySetIdentity()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// ResourceModelWithAllowedPropertySetIdentity class.
+ ///
+ /// The principal ID of resource
+ /// identity.
+ /// The tenant ID of resource.
+ /// The identity type. Possible values include:
+ /// 'SystemAssigned'
+ public ResourceModelWithAllowedPropertySetIdentity(string principalId = default(string), string tenantId = default(string), ResourceIdentityType? type = default(ResourceIdentityType?))
+ : base(principalId, tenantId, type)
+ {
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/ResourceModelWithAllowedPropertySetPlan.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/ResourceModelWithAllowedPropertySetPlan.cs
new file mode 100644
index 000000000000..7e5d3fff8640
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/ResourceModelWithAllowedPropertySetPlan.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.AzureData.Models
+{
+ using System.Linq;
+
+ public partial class ResourceModelWithAllowedPropertySetPlan : Plan
+ {
+ ///
+ /// Initializes a new instance of the
+ /// ResourceModelWithAllowedPropertySetPlan class.
+ ///
+ public ResourceModelWithAllowedPropertySetPlan()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// ResourceModelWithAllowedPropertySetPlan class.
+ ///
+ /// A user defined name of the 3rd Party Artifact
+ /// that is being procured.
+ /// The publisher of the 3rd Party Artifact
+ /// that is being bought. E.g. NewRelic
+ /// The 3rd Party artifact that is being
+ /// procured. E.g. NewRelic. Product maps to the OfferID specified for
+ /// the artifact at the time of Data Market onboarding.
+ /// A publisher provided promotion code as
+ /// provisioned in Data Market for the said product/artifact.
+ /// The version of the desired
+ /// product/artifact.
+ public ResourceModelWithAllowedPropertySetPlan(string name, string publisher, string product, string promotionCode = default(string), string version = default(string))
+ : base(name, publisher, product, promotionCode, version)
+ {
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/ResourceModelWithAllowedPropertySetSku.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/ResourceModelWithAllowedPropertySetSku.cs
new file mode 100644
index 000000000000..1a8855debd97
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/ResourceModelWithAllowedPropertySetSku.cs
@@ -0,0 +1,56 @@
+//
+// 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.AzureData.Models
+{
+ using System.Linq;
+
+ public partial class ResourceModelWithAllowedPropertySetSku : Sku
+ {
+ ///
+ /// Initializes a new instance of the
+ /// ResourceModelWithAllowedPropertySetSku class.
+ ///
+ public ResourceModelWithAllowedPropertySetSku()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// ResourceModelWithAllowedPropertySetSku class.
+ ///
+ /// The name of the SKU. Ex - P3. It is typically a
+ /// letter+number code
+ /// This field is required to be implemented by the
+ /// Resource Provider if the service has more than one tier, but is not
+ /// required on a PUT. Possible values include: 'Free', 'Basic',
+ /// 'Standard', 'Premium'
+ /// The SKU size. When the name field is the
+ /// combination of tier and some other value, this would be the
+ /// standalone code.
+ /// If the service has different generations of
+ /// hardware, for the same SKU, then that can be captured here.
+ /// If the SKU supports scale out/in then the
+ /// capacity integer should be included. If scale out/in is not
+ /// possible for the resource this may be omitted.
+ public ResourceModelWithAllowedPropertySetSku(string name, SkuTier? tier = default(SkuTier?), string size = default(string), string family = default(string), int? capacity = default(int?))
+ : base(name, tier, size, family, capacity)
+ {
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/Sku.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/Sku.cs
new file mode 100644
index 000000000000..827349d047a7
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/Sku.cs
@@ -0,0 +1,100 @@
+//
+// 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.AzureData.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The resource model definition representing SKU
+ ///
+ public partial class Sku
+ {
+ ///
+ /// Initializes a new instance of the Sku class.
+ ///
+ public Sku()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Sku class.
+ ///
+ /// The name of the SKU. Ex - P3. It is typically a
+ /// letter+number code
+ /// This field is required to be implemented by the
+ /// Resource Provider if the service has more than one tier, but is not
+ /// required on a PUT. Possible values include: 'Free', 'Basic',
+ /// 'Standard', 'Premium'
+ /// The SKU size. When the name field is the
+ /// combination of tier and some other value, this would be the
+ /// standalone code.
+ /// If the service has different generations of
+ /// hardware, for the same SKU, then that can be captured here.
+ /// If the SKU supports scale out/in then the
+ /// capacity integer should be included. If scale out/in is not
+ /// possible for the resource this may be omitted.
+ public Sku(string name, SkuTier? tier = default(SkuTier?), string size = default(string), string family = default(string), int? capacity = default(int?))
+ {
+ Name = name;
+ Tier = tier;
+ Size = size;
+ Family = family;
+ Capacity = capacity;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the name of the SKU. Ex - P3. It is typically a
+ /// letter+number code
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets this field is required to be implemented by the
+ /// Resource Provider if the service has more than one tier, but is not
+ /// required on a PUT. Possible values include: 'Free', 'Basic',
+ /// 'Standard', 'Premium'
+ ///
+ [JsonProperty(PropertyName = "tier")]
+ public SkuTier? Tier { get; set; }
+
+ ///
+ /// Gets or sets the SKU size. When the name field is the combination
+ /// of tier and some other value, this would be the standalone code.
+ ///
+ [JsonProperty(PropertyName = "size")]
+ public string Size { get; set; }
+
+ ///
+ /// Gets or sets if the service has different generations of hardware,
+ /// for the same SKU, then that can be captured here.
+ ///
+ [JsonProperty(PropertyName = "family")]
+ public string Family { get; set; }
+
+ ///
+ /// Gets or sets if the SKU supports scale out/in then the capacity
+ /// integer should be included. If scale out/in is not possible for the
+ /// resource this may be omitted.
+ ///
+ [JsonProperty(PropertyName = "capacity")]
+ public int? Capacity { get; set; }
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/SkuTier.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/SkuTier.cs
new file mode 100644
index 000000000000..fe289bef0914
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/SkuTier.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.AzureData.Models
+{
+ using Newtonsoft.Json;
+ using Newtonsoft.Json.Converters;
+ using System.Runtime;
+ using System.Runtime.Serialization;
+
+ ///
+ /// Defines values for SkuTier.
+ ///
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum SkuTier
+ {
+ [EnumMember(Value = "Free")]
+ Free,
+ [EnumMember(Value = "Basic")]
+ Basic,
+ [EnumMember(Value = "Standard")]
+ Standard,
+ [EnumMember(Value = "Premium")]
+ Premium
+ }
+ internal static class SkuTierEnumExtension
+ {
+ internal static string ToSerializedValue(this SkuTier? value)
+ {
+ return value == null ? null : ((SkuTier)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this SkuTier value)
+ {
+ switch( value )
+ {
+ case SkuTier.Free:
+ return "Free";
+ case SkuTier.Basic:
+ return "Basic";
+ case SkuTier.Standard:
+ return "Standard";
+ case SkuTier.Premium:
+ return "Premium";
+ }
+ return null;
+ }
+
+ internal static SkuTier? ParseSkuTier(this string value)
+ {
+ switch( value )
+ {
+ case "Free":
+ return SkuTier.Free;
+ case "Basic":
+ return SkuTier.Basic;
+ case "Standard":
+ return SkuTier.Standard;
+ case "Premium":
+ return SkuTier.Premium;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/SqlInstance.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/SqlInstance.cs
new file mode 100644
index 000000000000..b0030f493764
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/SqlInstance.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.AzureData.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// A SqlInstance.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class SqlInstance : TrackedResource
+ {
+ ///
+ /// Initializes a new instance of the SqlInstance class.
+ ///
+ public SqlInstance()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SqlInstance 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.
+ /// null
+ public SqlInstance(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string hybridDataManagerId = default(string))
+ : base(location, id, name, type, tags)
+ {
+ HybridDataManagerId = hybridDataManagerId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets null
+ ///
+ [JsonProperty(PropertyName = "properties.hybridDataManagerId")]
+ public string HybridDataManagerId { get; set; }
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/SqlInstanceUpdate.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/SqlInstanceUpdate.cs
new file mode 100644
index 000000000000..5fbf10f5a1d8
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/SqlInstanceUpdate.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.AzureData.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// An update to a SQL Instance.
+ ///
+ public partial class SqlInstanceUpdate
+ {
+ ///
+ /// Initializes a new instance of the SqlInstanceUpdate class.
+ ///
+ public SqlInstanceUpdate()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SqlInstanceUpdate class.
+ ///
+ /// Resource tags.
+ public SqlInstanceUpdate(IDictionary tags = default(IDictionary))
+ {
+ Tags = tags;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets resource tags.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/SqlServer.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/SqlServer.cs
new file mode 100644
index 000000000000..5b22ef10e79c
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/SqlServer.cs
@@ -0,0 +1,94 @@
+//
+// 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.AzureData.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// A SQL server.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class SqlServer : ProxyResource
+ {
+ ///
+ /// Initializes a new instance of the SqlServer class.
+ ///
+ public SqlServer()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SqlServer 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.
+ /// Cores of the Sql Server.
+ /// Version of the Sql Server.
+ /// Sql Server Edition.
+ /// ID for Parent Sql Server
+ /// Registration.
+ /// Sql Server Json Property Bag.
+ public SqlServer(string id = default(string), string name = default(string), string type = default(string), int? cores = default(int?), string version = default(string), string edition = default(string), string registrationID = default(string), string propertyBag = default(string))
+ : base(id, name, type)
+ {
+ Cores = cores;
+ Version = version;
+ Edition = edition;
+ RegistrationID = registrationID;
+ PropertyBag = propertyBag;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets cores of the Sql Server.
+ ///
+ [JsonProperty(PropertyName = "properties.cores")]
+ public int? Cores { get; set; }
+
+ ///
+ /// Gets or sets version of the Sql Server.
+ ///
+ [JsonProperty(PropertyName = "properties.version")]
+ public string Version { get; set; }
+
+ ///
+ /// Gets or sets sql Server Edition.
+ ///
+ [JsonProperty(PropertyName = "properties.edition")]
+ public string Edition { get; set; }
+
+ ///
+ /// Gets or sets ID for Parent Sql Server Registration.
+ ///
+ [JsonProperty(PropertyName = "properties.registrationID")]
+ public string RegistrationID { get; set; }
+
+ ///
+ /// Gets or sets sql Server Json Property Bag.
+ ///
+ [JsonProperty(PropertyName = "properties.propertyBag")]
+ public string PropertyBag { get; set; }
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/SqlServerRegistration.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/SqlServerRegistration.cs
new file mode 100644
index 000000000000..37b1e0888899
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/SqlServerRegistration.cs
@@ -0,0 +1,83 @@
+//
+// 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.AzureData.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// A SQL server registration.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class SqlServerRegistration : TrackedResource
+ {
+ ///
+ /// Initializes a new instance of the SqlServerRegistration class.
+ ///
+ public SqlServerRegistration()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SqlServerRegistration 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.
+ /// Subscription Id
+ /// Resource Group Name
+ /// Optional Properties as JSON
+ /// string
+ public SqlServerRegistration(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string subscriptionId = default(string), string resourceGroup = default(string), string propertyBag = default(string))
+ : base(location, id, name, type, tags)
+ {
+ SubscriptionId = subscriptionId;
+ ResourceGroup = resourceGroup;
+ PropertyBag = propertyBag;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets subscription Id
+ ///
+ [JsonProperty(PropertyName = "properties.subscriptionId")]
+ public string SubscriptionId { get; set; }
+
+ ///
+ /// Gets or sets resource Group Name
+ ///
+ [JsonProperty(PropertyName = "properties.resourceGroup")]
+ public string ResourceGroup { get; set; }
+
+ ///
+ /// Gets or sets optional Properties as JSON string
+ ///
+ [JsonProperty(PropertyName = "properties.propertyBag")]
+ public string PropertyBag { get; set; }
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/SqlServerRegistrationUpdate.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/SqlServerRegistrationUpdate.cs
new file mode 100644
index 000000000000..933acf3b0b61
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/SqlServerRegistrationUpdate.cs
@@ -0,0 +1,55 @@
+//
+// 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.AzureData.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// An update to a SQL Server Registration.
+ ///
+ public partial class SqlServerRegistrationUpdate
+ {
+ ///
+ /// Initializes a new instance of the SqlServerRegistrationUpdate
+ /// class.
+ ///
+ public SqlServerRegistrationUpdate()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SqlServerRegistrationUpdate
+ /// class.
+ ///
+ /// Resource tags.
+ public SqlServerRegistrationUpdate(IDictionary tags = default(IDictionary))
+ {
+ Tags = tags;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets resource tags.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/TrackedResource.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/TrackedResource.cs
new file mode 100644
index 000000000000..7c6d4df25063
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Models/TrackedResource.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.AzureData.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The resource model definition for a ARM tracked top level resource
+ ///
+ public partial class TrackedResource : Resource
+ {
+ ///
+ /// Initializes a new instance of the TrackedResource class.
+ ///
+ public TrackedResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the TrackedResource 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.
+ public TrackedResource(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary))
+ : base(id, name, type)
+ {
+ Tags = tags;
+ Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets resource tags.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ ///
+ /// Gets or sets the geo-location where the resource lives
+ ///
+ [JsonProperty(PropertyName = "location")]
+ public string Location { get; set; }
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Operations.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Operations.cs
new file mode 100644
index 000000000000..658eb37f204f
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/Operations.cs
@@ -0,0 +1,400 @@
+//
+// 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.AzureData
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Operations operations.
+ ///
+ internal partial class Operations : IServiceOperations, IOperations
+ {
+ ///
+ /// Initializes a new instance of the Operations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal Operations(AzureDataManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the AzureDataManagementClient
+ ///
+ public AzureDataManagementClient Client { get; private set; }
+
+ ///
+ /// Lists all of the available SQL Server Registration API operations.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.AzureData/operations").ToString();
+ 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Lists all of the available SQL Server Registration API operations.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/OperationsExtensions.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/OperationsExtensions.cs
new file mode 100644
index 000000000000..56567bfd729c
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/OperationsExtensions.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.AzureData
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for Operations.
+ ///
+ public static partial class OperationsExtensions
+ {
+ ///
+ /// Lists all of the available SQL Server Registration API operations.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ public static IPage List(this IOperations operations)
+ {
+ return operations.ListAsync().GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists all of the available SQL Server Registration API operations.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Lists all of the available SQL Server Registration API operations.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this IOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists all of the available SQL Server Registration API operations.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListNextAsync(this IOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/PostgresInstancesOperations.cs b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/PostgresInstancesOperations.cs
new file mode 100644
index 000000000000..220c0a438b28
--- /dev/null
+++ b/sdk/azuredata/Microsoft.Azure.Management.AzureData/src/Generated/PostgresInstancesOperations.cs
@@ -0,0 +1,1566 @@
+//
+// 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.AzureData
+{
+ 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;
+
+ ///
+ /// PostgresInstancesOperations operations.
+ ///
+ internal partial class PostgresInstancesOperations : IServiceOperations, IPostgresInstancesOperations
+ {
+ ///
+ /// Initializes a new instance of the PostgresInstancesOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal PostgresInstancesOperations(AzureDataManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the AzureDataManagementClient
+ ///
+ public AzureDataManagementClient Client { get; private set; }
+
+ ///
+ /// List postgres Instance resources in the subscription
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.AzureData/postgresInstances").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// List postgres Instance resources in the resource group
+ ///
+ ///
+ /// Get a postgres Instances list by Resource group name.
+ ///
+ ///
+ /// The name of the Azure resource group
+ ///
+ ///
+ /// 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>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", 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.AzureData/postgresInstances").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex = new CloudException(_errorBody.Message);
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject