diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/FirewallRulesOperations.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/FirewallRulesOperations.cs
new file mode 100644
index 000000000000..21de8b7ae7e9
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/FirewallRulesOperations.cs
@@ -0,0 +1,1028 @@
+//
+// 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.Redis
+{
+ 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;
+
+ ///
+ /// FirewallRulesOperations operations.
+ ///
+ internal partial class FirewallRulesOperations : IServiceOperations, IFirewallRulesOperations
+ {
+ ///
+ /// Initializes a new instance of the FirewallRulesOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal FirewallRulesOperations(RedisManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the RedisManagementClient
+ ///
+ public RedisManagementClient Client { get; private set; }
+
+ ///
+ /// Gets all firewall rules in the specified redis cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// 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(string resourceGroupName, string cacheName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (cacheName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "cacheName");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("cacheName", cacheName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{cacheName}", System.Uri.EscapeDataString(cacheName));
+ 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Create or update a redis cache firewall rule
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the firewall rule.
+ ///
+ ///
+ /// Parameters supplied to the create or update redis firewall rule 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string cacheName, string ruleName, RedisFirewallRule parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (cacheName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "cacheName");
+ }
+ if (ruleName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "ruleName");
+ }
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
+ if (parameters != null)
+ {
+ parameters.Validate();
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("cacheName", cacheName);
+ tracingParameters.Add("ruleName", ruleName);
+ tracingParameters.Add("parameters", parameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", 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.Cache/redis/{cacheName}/firewallRules/{ruleName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{cacheName}", System.Uri.EscapeDataString(cacheName));
+ _url = _url.Replace("{ruleName}", System.Uri.EscapeDataString(ruleName));
+ _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("PUT");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 201)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ // 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;
+ }
+
+ ///
+ /// Gets a single firewall rule in a specified redis cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the firewall rule.
+ ///
+ ///
+ /// 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 cacheName, string ruleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (cacheName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "cacheName");
+ }
+ if (ruleName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "ruleName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("cacheName", cacheName);
+ tracingParameters.Add("ruleName", ruleName);
+ 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.Cache/redis/{cacheName}/firewallRules/{ruleName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{cacheName}", System.Uri.EscapeDataString(cacheName));
+ _url = _url.Replace("{ruleName}", System.Uri.EscapeDataString(ruleName));
+ _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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Deletes a single firewall rule in a specified redis cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the firewall rule.
+ ///
+ ///
+ /// 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 cacheName, string ruleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (cacheName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "cacheName");
+ }
+ if (ruleName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "ruleName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("cacheName", cacheName);
+ tracingParameters.Add("ruleName", ruleName);
+ 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.Cache/redis/{cacheName}/firewallRules/{ruleName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{cacheName}", System.Uri.EscapeDataString(cacheName));
+ _url = _url.Replace("{ruleName}", System.Uri.EscapeDataString(ruleName));
+ _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("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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Gets all firewall rules in the specified redis cache.
+ ///
+ ///
+ /// 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/FirewallRulesOperationsExtensions.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/FirewallRulesOperationsExtensions.cs
new file mode 100644
index 000000000000..16071977e48d
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/FirewallRulesOperationsExtensions.cs
@@ -0,0 +1,240 @@
+//
+// 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.Redis
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for FirewallRulesOperations.
+ ///
+ public static partial class FirewallRulesOperationsExtensions
+ {
+ ///
+ /// Gets all firewall rules in the specified redis cache.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ public static IPage List(this IFirewallRulesOperations operations, string resourceGroupName, string cacheName)
+ {
+ return operations.ListAsync(resourceGroupName, cacheName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets all firewall rules in the specified redis cache.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this IFirewallRulesOperations operations, string resourceGroupName, string cacheName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, cacheName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Create or update a redis cache firewall rule
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the firewall rule.
+ ///
+ ///
+ /// Parameters supplied to the create or update redis firewall rule operation.
+ ///
+ public static RedisFirewallRule CreateOrUpdate(this IFirewallRulesOperations operations, string resourceGroupName, string cacheName, string ruleName, RedisFirewallRule parameters)
+ {
+ return operations.CreateOrUpdateAsync(resourceGroupName, cacheName, ruleName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Create or update a redis cache firewall rule
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the firewall rule.
+ ///
+ ///
+ /// Parameters supplied to the create or update redis firewall rule operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateOrUpdateAsync(this IFirewallRulesOperations operations, string resourceGroupName, string cacheName, string ruleName, RedisFirewallRule parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, cacheName, ruleName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Gets a single firewall rule in a specified redis cache.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the firewall rule.
+ ///
+ public static RedisFirewallRule Get(this IFirewallRulesOperations operations, string resourceGroupName, string cacheName, string ruleName)
+ {
+ return operations.GetAsync(resourceGroupName, cacheName, ruleName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets a single firewall rule in a specified redis cache.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the firewall rule.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IFirewallRulesOperations operations, string resourceGroupName, string cacheName, string ruleName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, cacheName, ruleName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Deletes a single firewall rule in a specified redis cache.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the firewall rule.
+ ///
+ public static void Delete(this IFirewallRulesOperations operations, string resourceGroupName, string cacheName, string ruleName)
+ {
+ operations.DeleteAsync(resourceGroupName, cacheName, ruleName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Deletes a single firewall rule in a specified redis cache.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the firewall rule.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DeleteAsync(this IFirewallRulesOperations operations, string resourceGroupName, string cacheName, string ruleName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, cacheName, ruleName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Gets all firewall rules in the specified redis cache.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this IFirewallRulesOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets all firewall rules in the specified redis cache.
+ ///
+ ///
+ /// 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 IFirewallRulesOperations 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/redis/Microsoft.Azure.Management.Redis/src/Generated/IFirewallRulesOperations.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/IFirewallRulesOperations.cs
new file mode 100644
index 000000000000..51aad069adaa
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/IFirewallRulesOperations.cs
@@ -0,0 +1,159 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Redis
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// FirewallRulesOperations operations.
+ ///
+ public partial interface IFirewallRulesOperations
+ {
+ ///
+ /// Gets all firewall rules in the specified redis cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string resourceGroupName, string cacheName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create or update a redis cache firewall rule
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the firewall rule.
+ ///
+ ///
+ /// Parameters supplied to the create or update redis firewall rule
+ /// 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> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string cacheName, string ruleName, RedisFirewallRule parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a single firewall rule in a specified redis cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the firewall rule.
+ ///
+ ///
+ /// 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 cacheName, string ruleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a single firewall rule in a specified redis cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the firewall rule.
+ ///
+ ///
+ /// 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 cacheName, string ruleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets all firewall rules in the specified redis cache.
+ ///
+ ///
+ /// 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/redis/Microsoft.Azure.Management.Redis/src/Generated/ILinkedServerOperations.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/ILinkedServerOperations.cs
new file mode 100644
index 000000000000..3b542dab3611
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/ILinkedServerOperations.cs
@@ -0,0 +1,196 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Redis
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// LinkedServerOperations operations.
+ ///
+ public partial interface ILinkedServerOperations
+ {
+ ///
+ /// Adds a linked server to the Redis cache (requires Premium SKU).
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the linked server that is being added to the Redis
+ /// cache.
+ ///
+ ///
+ /// Parameters supplied to the Create Linked server 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> CreateWithHttpMessagesAsync(string resourceGroupName, string name, string linkedServerName, RedisLinkedServerCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes the linked server from a redis cache (requires Premium
+ /// SKU).
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the redis cache.
+ ///
+ ///
+ /// The name of the linked server that is being added to the Redis
+ /// cache.
+ ///
+ ///
+ /// 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 name, string linkedServerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the detailed information about a linked server of a redis
+ /// cache (requires Premium SKU).
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the redis cache.
+ ///
+ ///
+ /// The name of the linked server.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string name, string linkedServerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the list of linked servers associated with this redis cache
+ /// (requires Premium SKU).
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the redis cache.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Adds a linked server to the Redis cache (requires Premium SKU).
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the linked server that is being added to the Redis
+ /// cache.
+ ///
+ ///
+ /// Parameters supplied to the Create Linked server 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> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string name, string linkedServerName, RedisLinkedServerCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the list of linked servers associated with this redis cache
+ /// (requires Premium SKU).
+ ///
+ ///
+ /// 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/redis/Microsoft.Azure.Management.Redis/src/Generated/IOperations.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/IOperations.cs
new file mode 100644
index 000000000000..0883d81fc401
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/IOperations.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.Redis
+{
+ 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 REST API operations of the
+ /// Microsoft.Cache provider.
+ ///
+ ///
+ /// 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 REST API operations of the
+ /// Microsoft.Cache provider.
+ ///
+ ///
+ /// 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/redis/Microsoft.Azure.Management.Redis/src/Generated/IPatchSchedulesOperations.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/IPatchSchedulesOperations.cs
new file mode 100644
index 000000000000..11cec22c8904
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/IPatchSchedulesOperations.cs
@@ -0,0 +1,151 @@
+//
+// 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.Redis
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// PatchSchedulesOperations operations.
+ ///
+ public partial interface IPatchSchedulesOperations
+ {
+ ///
+ /// Gets all patch schedules in the specified redis cache (there is
+ /// only one).
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// 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>> ListByRedisResourceWithHttpMessagesAsync(string resourceGroupName, string cacheName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create or replace the patching schedule for Redis cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// Parameters to set the patching schedule for Redis cache.
+ ///
+ ///
+ /// 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 name, RedisPatchSchedule parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes the patching schedule of a redis cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the redis cache.
+ ///
+ ///
+ /// 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 name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the patching schedule of a redis cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the redis cache.
+ ///
+ ///
+ /// 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 name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets all patch schedules in the specified redis cache (there is
+ /// only one).
+ ///
+ ///
+ /// 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>> ListByRedisResourceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/IPrivateEndpointConnectionsOperations.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/IPrivateEndpointConnectionsOperations.cs
new file mode 100644
index 000000000000..38df3db9ef72
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/IPrivateEndpointConnectionsOperations.cs
@@ -0,0 +1,176 @@
+//
+// 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.Redis
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// PrivateEndpointConnectionsOperations operations.
+ ///
+ public partial interface IPrivateEndpointConnectionsOperations
+ {
+ ///
+ /// List all the private endpoint connections associated with the redis
+ /// cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string resourceGroupName, string cacheName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the specified private endpoint connection associated with the
+ /// redis cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the private endpoint connection associated with the
+ /// Azure resource
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string cacheName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Update the state of specified private endpoint connection
+ /// associated with the redis cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the private endpoint connection associated with the
+ /// Azure resource
+ ///
+ ///
+ /// The private endpoint connection properties.
+ ///
+ ///
+ /// 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> PutWithHttpMessagesAsync(string resourceGroupName, string cacheName, string privateEndpointConnectionName, PrivateEndpointConnection properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes the specified private endpoint connection associated with
+ /// the redis cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the private endpoint connection associated with the
+ /// Azure resource
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string cacheName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Update the state of specified private endpoint connection
+ /// associated with the redis cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the private endpoint connection associated with the
+ /// Azure resource
+ ///
+ ///
+ /// The private endpoint connection properties.
+ ///
+ ///
+ /// 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> BeginPutWithHttpMessagesAsync(string resourceGroupName, string cacheName, string privateEndpointConnectionName, PrivateEndpointConnection properties, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/IPrivateLinkResourcesOperations.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/IPrivateLinkResourcesOperations.cs
new file mode 100644
index 000000000000..ba1f45606ca1
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/IPrivateLinkResourcesOperations.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.Redis
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// PrivateLinkResourcesOperations operations.
+ ///
+ public partial interface IPrivateLinkResourcesOperations
+ {
+ ///
+ /// Gets the private link resources that need to be created for a redis
+ /// cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// 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>> ListByRedisCacheWithHttpMessagesAsync(string resourceGroupName, string cacheName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/IRedisManagementClient.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/IRedisManagementClient.cs
new file mode 100644
index 000000000000..46cc3f89e0ff
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/IRedisManagementClient.cs
@@ -0,0 +1,110 @@
+//
+// 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.Redis
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+
+ ///
+ /// REST API for Azure Redis Cache Service.
+ ///
+ public partial interface IRedisManagementClient : 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; }
+
+ ///
+ /// Gets subscription credentials which uniquely identify the Microsoft
+ /// Azure subscription. The subscription ID forms part of the URI for
+ /// every service call.
+ ///
+ string SubscriptionId { get; set; }
+
+ ///
+ /// Client Api Version.
+ ///
+ string ApiVersion { get; }
+
+ ///
+ /// 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 IRedisOperations.
+ ///
+ IRedisOperations Redis { get; }
+
+ ///
+ /// Gets the IFirewallRulesOperations.
+ ///
+ IFirewallRulesOperations FirewallRules { get; }
+
+ ///
+ /// Gets the IPatchSchedulesOperations.
+ ///
+ IPatchSchedulesOperations PatchSchedules { get; }
+
+ ///
+ /// Gets the ILinkedServerOperations.
+ ///
+ ILinkedServerOperations LinkedServer { get; }
+
+ ///
+ /// Gets the IPrivateEndpointConnectionsOperations.
+ ///
+ IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; }
+
+ ///
+ /// Gets the IPrivateLinkResourcesOperations.
+ ///
+ IPrivateLinkResourcesOperations PrivateLinkResources { get; }
+
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/IRedisOperations.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/IRedisOperations.cs
new file mode 100644
index 000000000000..467292283242
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/IRedisOperations.cs
@@ -0,0 +1,522 @@
+//
+// 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.Redis
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// RedisOperations operations.
+ ///
+ public partial interface IRedisOperations
+ {
+ ///
+ /// Checks that the redis cache name is valid and is not already in
+ /// use.
+ ///
+ ///
+ /// Parameters supplied to the CheckNameAvailability Redis operation.
+ /// The only supported resource type is 'Microsoft.Cache/redis'
+ ///
+ ///
+ /// 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 CheckNameAvailabilityWithHttpMessagesAsync(CheckNameAvailabilityParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets any upgrade notifications for a Redis cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// how many minutes in past to look for upgrade notifications
+ ///
+ ///
+ /// 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>> ListUpgradeNotificationsWithHttpMessagesAsync(string resourceGroupName, string name, double history, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create or replace (overwrite/recreate, with potential downtime) an
+ /// existing Redis cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// Parameters supplied to the Create Redis 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> CreateWithHttpMessagesAsync(string resourceGroupName, string name, RedisCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Update an existing Redis cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// Parameters supplied to the Update Redis 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> UpdateWithHttpMessagesAsync(string resourceGroupName, string name, RedisUpdateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a Redis cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// 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 name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a Redis cache (resource description).
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// 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 name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all Redis caches in a resource group.
+ ///
+ ///
+ /// The name of the 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));
+ ///
+ /// Gets all Redis caches in the specified 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>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Retrieve a Redis cache's access keys. This operation requires write
+ /// permission to the cache resource.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// 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> ListKeysWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Regenerate Redis cache's access keys. This operation requires write
+ /// permission to the cache resource.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// Specifies which key to regenerate.
+ ///
+ ///
+ /// 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> RegenerateKeyWithHttpMessagesAsync(string resourceGroupName, string name, RedisRegenerateKeyParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Reboot specified Redis node(s). This operation requires write
+ /// permission to the cache resource. There can be potential data loss.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// Specifies which Redis node(s) to reboot.
+ ///
+ ///
+ /// 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> ForceRebootWithHttpMessagesAsync(string resourceGroupName, string name, RedisRebootParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Import data into Redis cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// Parameters for Redis import operation.
+ ///
+ ///
+ /// 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 ImportDataWithHttpMessagesAsync(string resourceGroupName, string name, ImportRDBParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Export data from the redis cache to blobs in a container.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// Parameters for Redis export operation.
+ ///
+ ///
+ /// 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 ExportDataWithHttpMessagesAsync(string resourceGroupName, string name, ExportRDBParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create or replace (overwrite/recreate, with potential downtime) an
+ /// existing Redis cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// Parameters supplied to the Create Redis 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> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string name, RedisCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a Redis cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Import data into Redis cache.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// Parameters for Redis import operation.
+ ///
+ ///
+ /// 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 BeginImportDataWithHttpMessagesAsync(string resourceGroupName, string name, ImportRDBParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Export data from the redis cache to blobs in a container.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// Parameters for Redis export operation.
+ ///
+ ///
+ /// 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 BeginExportDataWithHttpMessagesAsync(string resourceGroupName, string name, ExportRDBParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets any upgrade notifications for a Redis cache.
+ ///
+ ///
+ /// 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>> ListUpgradeNotificationsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all Redis caches 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 Redis caches in the specified 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>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/LinkedServerOperations.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/LinkedServerOperations.cs
new file mode 100644
index 000000000000..6877fd223c21
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/LinkedServerOperations.cs
@@ -0,0 +1,1059 @@
+//
+// 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.Redis
+{
+ 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;
+
+ ///
+ /// LinkedServerOperations operations.
+ ///
+ internal partial class LinkedServerOperations : IServiceOperations, ILinkedServerOperations
+ {
+ ///
+ /// Initializes a new instance of the LinkedServerOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal LinkedServerOperations(RedisManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the RedisManagementClient
+ ///
+ public RedisManagementClient Client { get; private set; }
+
+ ///
+ /// Adds a linked server to the Redis cache (requires Premium SKU).
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the linked server that is being added to the Redis cache.
+ ///
+ ///
+ /// Parameters supplied to the Create Linked server operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string name, string linkedServerName, RedisLinkedServerCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, name, linkedServerName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Deletes the linked server from a redis cache (requires Premium SKU).
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the redis cache.
+ ///
+ ///
+ /// The name of the linked server that is being added to the Redis cache.
+ ///
+ ///
+ /// 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 name, string linkedServerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "name");
+ }
+ if (linkedServerName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "linkedServerName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("name", name);
+ tracingParameters.Add("linkedServerName", linkedServerName);
+ 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.Cache/redis/{name}/linkedServers/{linkedServerName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
+ _url = _url.Replace("{linkedServerName}", System.Uri.EscapeDataString(linkedServerName));
+ _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("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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Gets the detailed information about a linked server of a redis cache
+ /// (requires Premium SKU).
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the redis cache.
+ ///
+ ///
+ /// The name of the linked server.
+ ///
+ ///
+ /// 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 name, string linkedServerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "name");
+ }
+ if (linkedServerName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "linkedServerName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("name", name);
+ tracingParameters.Add("linkedServerName", linkedServerName);
+ 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.Cache/redis/{name}/linkedServers/{linkedServerName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
+ _url = _url.Replace("{linkedServerName}", System.Uri.EscapeDataString(linkedServerName));
+ _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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Gets the list of linked servers associated with this redis cache (requires
+ /// Premium SKU).
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the redis cache.
+ ///
+ ///
+ /// 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(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "name");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("name", name);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/linkedServers").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
+ _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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Adds a linked server to the Redis cache (requires Premium SKU).
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the linked server that is being added to the Redis cache.
+ ///
+ ///
+ /// Parameters supplied to the Create Linked server 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> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string name, string linkedServerName, RedisLinkedServerCreateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "name");
+ }
+ if (linkedServerName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "linkedServerName");
+ }
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
+ if (parameters != null)
+ {
+ parameters.Validate();
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("name", name);
+ tracingParameters.Add("linkedServerName", linkedServerName);
+ tracingParameters.Add("parameters", parameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/linkedServers/{linkedServerName}").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
+ _url = _url.Replace("{linkedServerName}", System.Uri.EscapeDataString(linkedServerName));
+ _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("PUT");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 201)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ // 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;
+ }
+
+ ///
+ /// Gets the list of linked servers associated with this redis cache (requires
+ /// Premium SKU).
+ ///
+ ///
+ /// 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/LinkedServerOperationsExtensions.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/LinkedServerOperationsExtensions.cs
new file mode 100644
index 000000000000..50b30f2645a1
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/LinkedServerOperationsExtensions.cs
@@ -0,0 +1,298 @@
+//
+// 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.Redis
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for LinkedServerOperations.
+ ///
+ public static partial class LinkedServerOperationsExtensions
+ {
+ ///
+ /// Adds a linked server to the Redis cache (requires Premium SKU).
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the linked server that is being added to the Redis cache.
+ ///
+ ///
+ /// Parameters supplied to the Create Linked server operation.
+ ///
+ public static RedisLinkedServerWithProperties Create(this ILinkedServerOperations operations, string resourceGroupName, string name, string linkedServerName, RedisLinkedServerCreateParameters parameters)
+ {
+ return operations.CreateAsync(resourceGroupName, name, linkedServerName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Adds a linked server to the Redis cache (requires Premium SKU).
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the linked server that is being added to the Redis cache.
+ ///
+ ///
+ /// Parameters supplied to the Create Linked server operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateAsync(this ILinkedServerOperations operations, string resourceGroupName, string name, string linkedServerName, RedisLinkedServerCreateParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, name, linkedServerName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Deletes the linked server from a redis cache (requires Premium SKU).
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the redis cache.
+ ///
+ ///
+ /// The name of the linked server that is being added to the Redis cache.
+ ///
+ public static void Delete(this ILinkedServerOperations operations, string resourceGroupName, string name, string linkedServerName)
+ {
+ operations.DeleteAsync(resourceGroupName, name, linkedServerName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Deletes the linked server from a redis cache (requires Premium SKU).
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the redis cache.
+ ///
+ ///
+ /// The name of the linked server that is being added to the Redis cache.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DeleteAsync(this ILinkedServerOperations operations, string resourceGroupName, string name, string linkedServerName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, name, linkedServerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Gets the detailed information about a linked server of a redis cache
+ /// (requires Premium SKU).
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the redis cache.
+ ///
+ ///
+ /// The name of the linked server.
+ ///
+ public static RedisLinkedServerWithProperties Get(this ILinkedServerOperations operations, string resourceGroupName, string name, string linkedServerName)
+ {
+ return operations.GetAsync(resourceGroupName, name, linkedServerName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets the detailed information about a linked server of a redis cache
+ /// (requires Premium SKU).
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the redis cache.
+ ///
+ ///
+ /// The name of the linked server.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this ILinkedServerOperations operations, string resourceGroupName, string name, string linkedServerName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, name, linkedServerName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Gets the list of linked servers associated with this redis cache (requires
+ /// Premium SKU).
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the redis cache.
+ ///
+ public static IPage List(this ILinkedServerOperations operations, string resourceGroupName, string name)
+ {
+ return operations.ListAsync(resourceGroupName, name).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets the list of linked servers associated with this redis cache (requires
+ /// Premium SKU).
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the redis cache.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this ILinkedServerOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Adds a linked server to the Redis cache (requires Premium SKU).
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the linked server that is being added to the Redis cache.
+ ///
+ ///
+ /// Parameters supplied to the Create Linked server operation.
+ ///
+ public static RedisLinkedServerWithProperties BeginCreate(this ILinkedServerOperations operations, string resourceGroupName, string name, string linkedServerName, RedisLinkedServerCreateParameters parameters)
+ {
+ return operations.BeginCreateAsync(resourceGroupName, name, linkedServerName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Adds a linked server to the Redis cache (requires Premium SKU).
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the Redis cache.
+ ///
+ ///
+ /// The name of the linked server that is being added to the Redis cache.
+ ///
+ ///
+ /// Parameters supplied to the Create Linked server operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginCreateAsync(this ILinkedServerOperations operations, string resourceGroupName, string name, string linkedServerName, RedisLinkedServerCreateParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginCreateWithHttpMessagesAsync(resourceGroupName, name, linkedServerName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Gets the list of linked servers associated with this redis cache (requires
+ /// Premium SKU).
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this ILinkedServerOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets the list of linked servers associated with this redis cache (requires
+ /// Premium SKU).
+ ///
+ ///
+ /// 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 ILinkedServerOperations 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/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/AzureEntityResource.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/AzureEntityResource.cs
new file mode 100644
index 000000000000..16ad2ff23ede
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/AzureEntityResource.cs
@@ -0,0 +1,62 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Redis.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Entity Resource
+ ///
+ ///
+ /// The resource model definition for an Azure Resource Manager resource
+ /// with an etag.
+ ///
+ public partial class AzureEntityResource : Resource
+ {
+ ///
+ /// Initializes a new instance of the AzureEntityResource class.
+ ///
+ public AzureEntityResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AzureEntityResource class.
+ ///
+ /// Fully qualified resource ID for the resource. Ex -
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
+ /// The name of the resource
+ /// The type of the resource. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
+ /// Resource Etag.
+ public AzureEntityResource(string id = default(string), string name = default(string), string type = default(string), string etag = default(string))
+ : base(id, name, type)
+ {
+ Etag = etag;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets resource Etag.
+ ///
+ [JsonProperty(PropertyName = "etag")]
+ public string Etag { get; private set; }
+
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/CheckNameAvailabilityParameters.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/CheckNameAvailabilityParameters.cs
new file mode 100644
index 000000000000..78312629fa61
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/CheckNameAvailabilityParameters.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.Redis.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Parameters body to pass for resource name availability check.
+ ///
+ public partial class CheckNameAvailabilityParameters
+ {
+ ///
+ /// Initializes a new instance of the CheckNameAvailabilityParameters
+ /// class.
+ ///
+ public CheckNameAvailabilityParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CheckNameAvailabilityParameters
+ /// class.
+ ///
+ /// Resource name.
+ /// Resource type. The only legal value of this
+ /// property for checking redis cache name availability is
+ /// 'Microsoft.Cache/redis'.
+ public CheckNameAvailabilityParameters(string name, string type)
+ {
+ Name = name;
+ Type = type;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets resource name.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets resource type. The only legal value of this property
+ /// for checking redis cache name availability is
+ /// 'Microsoft.Cache/redis'.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Name");
+ }
+ if (Type == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Type");
+ }
+ }
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/DayOfWeek.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/DayOfWeek.cs
new file mode 100644
index 000000000000..4d80b3287c59
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/DayOfWeek.cs
@@ -0,0 +1,102 @@
+//
+// 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.Redis.Models
+{
+ using Newtonsoft.Json;
+ using Newtonsoft.Json.Converters;
+ using System.Runtime;
+ using System.Runtime.Serialization;
+
+ ///
+ /// Defines values for DayOfWeek.
+ ///
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum DayOfWeek
+ {
+ [EnumMember(Value = "Monday")]
+ Monday,
+ [EnumMember(Value = "Tuesday")]
+ Tuesday,
+ [EnumMember(Value = "Wednesday")]
+ Wednesday,
+ [EnumMember(Value = "Thursday")]
+ Thursday,
+ [EnumMember(Value = "Friday")]
+ Friday,
+ [EnumMember(Value = "Saturday")]
+ Saturday,
+ [EnumMember(Value = "Sunday")]
+ Sunday,
+ [EnumMember(Value = "Everyday")]
+ Everyday,
+ [EnumMember(Value = "Weekend")]
+ Weekend
+ }
+ internal static class DayOfWeekEnumExtension
+ {
+ internal static string ToSerializedValue(this DayOfWeek? value)
+ {
+ return value == null ? null : ((DayOfWeek)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this DayOfWeek value)
+ {
+ switch( value )
+ {
+ case DayOfWeek.Monday:
+ return "Monday";
+ case DayOfWeek.Tuesday:
+ return "Tuesday";
+ case DayOfWeek.Wednesday:
+ return "Wednesday";
+ case DayOfWeek.Thursday:
+ return "Thursday";
+ case DayOfWeek.Friday:
+ return "Friday";
+ case DayOfWeek.Saturday:
+ return "Saturday";
+ case DayOfWeek.Sunday:
+ return "Sunday";
+ case DayOfWeek.Everyday:
+ return "Everyday";
+ case DayOfWeek.Weekend:
+ return "Weekend";
+ }
+ return null;
+ }
+
+ internal static DayOfWeek? ParseDayOfWeek(this string value)
+ {
+ switch( value )
+ {
+ case "Monday":
+ return DayOfWeek.Monday;
+ case "Tuesday":
+ return DayOfWeek.Tuesday;
+ case "Wednesday":
+ return DayOfWeek.Wednesday;
+ case "Thursday":
+ return DayOfWeek.Thursday;
+ case "Friday":
+ return DayOfWeek.Friday;
+ case "Saturday":
+ return DayOfWeek.Saturday;
+ case "Sunday":
+ return DayOfWeek.Sunday;
+ case "Everyday":
+ return DayOfWeek.Everyday;
+ case "Weekend":
+ return DayOfWeek.Weekend;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ErrorAdditionalInfo.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ErrorAdditionalInfo.cs
new file mode 100644
index 000000000000..8f962c987796
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ErrorAdditionalInfo.cs
@@ -0,0 +1,59 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Redis.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The resource management error additional info.
+ ///
+ public partial class ErrorAdditionalInfo
+ {
+ ///
+ /// Initializes a new instance of the ErrorAdditionalInfo class.
+ ///
+ public ErrorAdditionalInfo()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorAdditionalInfo class.
+ ///
+ /// The additional info type.
+ /// The additional info.
+ public ErrorAdditionalInfo(string type = default(string), object info = default(object))
+ {
+ Type = type;
+ Info = info;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the additional info type.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ ///
+ /// Gets the additional info.
+ ///
+ [JsonProperty(PropertyName = "info")]
+ public object Info { get; private set; }
+
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ErrorDetail.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ErrorDetail.cs
new file mode 100644
index 000000000000..337def18f048
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ErrorDetail.cs
@@ -0,0 +1,85 @@
+//
+// 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.Redis.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The error detail.
+ ///
+ public partial class ErrorDetail
+ {
+ ///
+ /// Initializes a new instance of the ErrorDetail class.
+ ///
+ public ErrorDetail()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorDetail class.
+ ///
+ /// The error code.
+ /// The error message.
+ /// The error target.
+ /// The error details.
+ /// The error additional info.
+ public ErrorDetail(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList), IList additionalInfo = default(IList))
+ {
+ Code = code;
+ Message = message;
+ Target = target;
+ Details = details;
+ AdditionalInfo = additionalInfo;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the error code.
+ ///
+ [JsonProperty(PropertyName = "code")]
+ public string Code { get; private set; }
+
+ ///
+ /// Gets the error message.
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; private set; }
+
+ ///
+ /// Gets the error target.
+ ///
+ [JsonProperty(PropertyName = "target")]
+ public string Target { get; private set; }
+
+ ///
+ /// Gets the error details.
+ ///
+ [JsonProperty(PropertyName = "details")]
+ public IList Details { get; private set; }
+
+ ///
+ /// Gets the error additional info.
+ ///
+ [JsonProperty(PropertyName = "additionalInfo")]
+ public IList AdditionalInfo { get; private set; }
+
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ErrorResponse.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ErrorResponse.cs
new file mode 100644
index 000000000000..31f43e528c5d
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ErrorResponse.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.Redis.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Error response
+ ///
+ ///
+ /// Common error response for all Azure Resource Manager APIs to return
+ /// error details for failed operations. (This also follows the OData error
+ /// response format.).
+ ///
+ public partial class ErrorResponse
+ {
+ ///
+ /// Initializes a new instance of the ErrorResponse class.
+ ///
+ public ErrorResponse()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponse class.
+ ///
+ /// The error object.
+ public ErrorResponse(ErrorDetail error = default(ErrorDetail))
+ {
+ Error = error;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the error object.
+ ///
+ [JsonProperty(PropertyName = "error")]
+ public ErrorDetail Error { get; set; }
+
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ErrorResponseException.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ErrorResponseException.cs
new file mode 100644
index 000000000000..0b87fac25d30
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ErrorResponseException.cs
@@ -0,0 +1,62 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Redis.Models
+{
+ using Microsoft.Rest;
+
+ ///
+ /// Exception thrown for an invalid response with ErrorResponse
+ /// information.
+ ///
+ public partial class ErrorResponseException : RestException
+ {
+ ///
+ /// Gets information about the associated HTTP request.
+ ///
+ public HttpRequestMessageWrapper Request { get; set; }
+
+ ///
+ /// Gets information about the associated HTTP response.
+ ///
+ public HttpResponseMessageWrapper Response { get; set; }
+
+ ///
+ /// Gets or sets the body object.
+ ///
+ public ErrorResponse Body { get; set; }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseException class.
+ ///
+ public ErrorResponseException()
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseException class.
+ ///
+ /// The exception message.
+ public ErrorResponseException(string message)
+ : this(message, null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseException class.
+ ///
+ /// The exception message.
+ /// Inner exception.
+ public ErrorResponseException(string message, System.Exception innerException)
+ : base(message, innerException)
+ {
+ }
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ExportRDBParameters.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ExportRDBParameters.cs
new file mode 100644
index 000000000000..a2f214e8bd2b
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ExportRDBParameters.cs
@@ -0,0 +1,85 @@
+//
+// 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.Redis.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Parameters for Redis export operation.
+ ///
+ public partial class ExportRDBParameters
+ {
+ ///
+ /// Initializes a new instance of the ExportRDBParameters class.
+ ///
+ public ExportRDBParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ExportRDBParameters class.
+ ///
+ /// Prefix to use for exported files.
+ /// Container name to export to.
+ /// File format.
+ public ExportRDBParameters(string prefix, string container, string format = default(string))
+ {
+ Format = format;
+ Prefix = prefix;
+ Container = container;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets file format.
+ ///
+ [JsonProperty(PropertyName = "format")]
+ public string Format { get; set; }
+
+ ///
+ /// Gets or sets prefix to use for exported files.
+ ///
+ [JsonProperty(PropertyName = "prefix")]
+ public string Prefix { get; set; }
+
+ ///
+ /// Gets or sets container name to export to.
+ ///
+ [JsonProperty(PropertyName = "container")]
+ public string Container { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Prefix == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Prefix");
+ }
+ if (Container == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Container");
+ }
+ }
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ImportRDBParameters.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ImportRDBParameters.cs
new file mode 100644
index 000000000000..baa1ca5d0453
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ImportRDBParameters.cs
@@ -0,0 +1,75 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Redis.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Parameters for Redis import operation.
+ ///
+ public partial class ImportRDBParameters
+ {
+ ///
+ /// Initializes a new instance of the ImportRDBParameters class.
+ ///
+ public ImportRDBParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ImportRDBParameters class.
+ ///
+ /// files to import.
+ /// File format.
+ public ImportRDBParameters(IList files, string format = default(string))
+ {
+ Format = format;
+ Files = files;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets file format.
+ ///
+ [JsonProperty(PropertyName = "format")]
+ public string Format { get; set; }
+
+ ///
+ /// Gets or sets files to import.
+ ///
+ [JsonProperty(PropertyName = "files")]
+ public IList Files { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Files == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Files");
+ }
+ }
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/Operation.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/Operation.cs
new file mode 100644
index 000000000000..f3e52b61983f
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/Operation.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.Redis.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// REST API operation
+ ///
+ public partial class Operation
+ {
+ ///
+ /// Initializes a new instance of the Operation class.
+ ///
+ public Operation()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Operation class.
+ ///
+ /// Operation name:
+ /// {provider}/{resource}/{operation}
+ /// The object that describes the
+ /// operation.
+ public Operation(string name = default(string), OperationDisplay display = default(OperationDisplay))
+ {
+ Name = name;
+ Display = display;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets operation name: {provider}/{resource}/{operation}
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets the object that describes the operation.
+ ///
+ [JsonProperty(PropertyName = "display")]
+ public OperationDisplay Display { get; set; }
+
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/OperationDisplay.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/OperationDisplay.cs
new file mode 100644
index 000000000000..65f0a63eca95
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/OperationDisplay.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.Redis.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The object that describes 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.
+ ///
+ /// Friendly name of the resource
+ /// provider
+ /// Operation type: read, write, delete,
+ /// listKeys/action, etc.
+ /// Resource type on which the operation is
+ /// performed.
+ /// Friendly name of the operation
+ public OperationDisplay(string provider = default(string), string operation = default(string), string resource = default(string), string description = default(string))
+ {
+ Provider = provider;
+ Operation = operation;
+ Resource = resource;
+ Description = description;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets friendly name of the resource provider
+ ///
+ [JsonProperty(PropertyName = "provider")]
+ public string Provider { get; set; }
+
+ ///
+ /// Gets or sets operation type: read, write, delete, listKeys/action,
+ /// etc.
+ ///
+ [JsonProperty(PropertyName = "operation")]
+ public string Operation { get; set; }
+
+ ///
+ /// Gets or sets resource type on which the operation is performed.
+ ///
+ [JsonProperty(PropertyName = "resource")]
+ public string Resource { get; set; }
+
+ ///
+ /// Gets or sets friendly name of the operation
+ ///
+ [JsonProperty(PropertyName = "description")]
+ public string Description { get; set; }
+
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/Page.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/Page.cs
new file mode 100644
index 000000000000..d7a62bf052e0
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/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.Redis.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/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/Page1.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/Page1.cs
new file mode 100644
index 000000000000..4008e6e9a2f5
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/Page1.cs
@@ -0,0 +1,53 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Redis.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+
+ ///
+ /// Defines a page in Azure responses.
+ ///
+ /// Type of the page content items
+ [JsonObject]
+ public class Page1 : IPage
+ {
+ ///
+ /// Gets the link to the next page.
+ ///
+ [JsonProperty("")]
+ public string NextPageLink { get; private set; }
+
+ [JsonProperty("value")]
+ private IList Items{ get; set; }
+
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ /// A an enumerator that can be used to iterate through the collection.
+ public IEnumerator GetEnumerator()
+ {
+ return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator();
+ }
+
+ ///
+ /// Returns an enumerator that iterates through the collection.
+ ///
+ /// A an enumerator that can be used to iterate through the collection.
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/PrivateEndpoint.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/PrivateEndpoint.cs
new file mode 100644
index 000000000000..f3ab39497499
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/PrivateEndpoint.cs
@@ -0,0 +1,51 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Redis.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The Private Endpoint resource.
+ ///
+ public partial class PrivateEndpoint
+ {
+ ///
+ /// Initializes a new instance of the PrivateEndpoint class.
+ ///
+ public PrivateEndpoint()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateEndpoint class.
+ ///
+ /// The ARM identifier for Private Endpoint
+ public PrivateEndpoint(string id = default(string))
+ {
+ Id = id;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the ARM identifier for Private Endpoint
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/PrivateEndpointConnection.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/PrivateEndpointConnection.cs
new file mode 100644
index 000000000000..6ba4ed6fd234
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/PrivateEndpointConnection.cs
@@ -0,0 +1,98 @@
+//
+// 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.Redis.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The Private Endpoint Connection resource.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class PrivateEndpointConnection : Resource
+ {
+ ///
+ /// Initializes a new instance of the PrivateEndpointConnection class.
+ ///
+ public PrivateEndpointConnection()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateEndpointConnection class.
+ ///
+ /// A collection of
+ /// information about the state of the connection between service
+ /// consumer and provider.
+ /// 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. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
+ /// The resource of private end
+ /// point.
+ /// The provisioning state of the
+ /// private endpoint connection resource. Possible values include:
+ /// 'Succeeded', 'Creating', 'Deleting', 'Failed'
+ public PrivateEndpointConnection(PrivateLinkServiceConnectionState privateLinkServiceConnectionState, string id = default(string), string name = default(string), string type = default(string), PrivateEndpoint privateEndpoint = default(PrivateEndpoint), string provisioningState = default(string))
+ : base(id, name, type)
+ {
+ PrivateEndpoint = privateEndpoint;
+ PrivateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ ProvisioningState = provisioningState;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the resource of private end point.
+ ///
+ [JsonProperty(PropertyName = "properties.privateEndpoint")]
+ public PrivateEndpoint PrivateEndpoint { get; set; }
+
+ ///
+ /// Gets or sets a collection of information about the state of the
+ /// connection between service consumer and provider.
+ ///
+ [JsonProperty(PropertyName = "properties.privateLinkServiceConnectionState")]
+ public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; }
+
+ ///
+ /// Gets or sets the provisioning state of the private endpoint
+ /// connection resource. Possible values include: 'Succeeded',
+ /// 'Creating', 'Deleting', 'Failed'
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (PrivateLinkServiceConnectionState == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "PrivateLinkServiceConnectionState");
+ }
+ }
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/PrivateEndpointConnectionProvisioningState.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/PrivateEndpointConnectionProvisioningState.cs
new file mode 100644
index 000000000000..496c5fa008ee
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/PrivateEndpointConnectionProvisioningState.cs
@@ -0,0 +1,24 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Redis.Models
+{
+
+ ///
+ /// Defines values for PrivateEndpointConnectionProvisioningState.
+ ///
+ public static class PrivateEndpointConnectionProvisioningState
+ {
+ public const string Succeeded = "Succeeded";
+ public const string Creating = "Creating";
+ public const string Deleting = "Deleting";
+ public const string Failed = "Failed";
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/PrivateEndpointServiceConnectionStatus.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/PrivateEndpointServiceConnectionStatus.cs
new file mode 100644
index 000000000000..d913afb711fe
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/PrivateEndpointServiceConnectionStatus.cs
@@ -0,0 +1,23 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Redis.Models
+{
+
+ ///
+ /// Defines values for PrivateEndpointServiceConnectionStatus.
+ ///
+ public static class PrivateEndpointServiceConnectionStatus
+ {
+ public const string Pending = "Pending";
+ public const string Approved = "Approved";
+ public const string Rejected = "Rejected";
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/PrivateLinkResource.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/PrivateLinkResource.cs
new file mode 100644
index 000000000000..193a9427574b
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/PrivateLinkResource.cs
@@ -0,0 +1,81 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Redis.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// A private link resource
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class PrivateLinkResource : Resource
+ {
+ ///
+ /// Initializes a new instance of the PrivateLinkResource class.
+ ///
+ public PrivateLinkResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateLinkResource 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. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
+ /// The private link resource group id.
+ /// The private link resource required
+ /// member names.
+ /// The private link resource Private
+ /// link DNS zone name.
+ public PrivateLinkResource(string id = default(string), string name = default(string), string type = default(string), string groupId = default(string), IList requiredMembers = default(IList), IList requiredZoneNames = default(IList))
+ : base(id, name, type)
+ {
+ GroupId = groupId;
+ RequiredMembers = requiredMembers;
+ RequiredZoneNames = requiredZoneNames;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the private link resource group id.
+ ///
+ [JsonProperty(PropertyName = "properties.groupId")]
+ public string GroupId { get; private set; }
+
+ ///
+ /// Gets the private link resource required member names.
+ ///
+ [JsonProperty(PropertyName = "properties.requiredMembers")]
+ public IList RequiredMembers { get; private set; }
+
+ ///
+ /// Gets or sets the private link resource Private link DNS zone name.
+ ///
+ [JsonProperty(PropertyName = "properties.requiredZoneNames")]
+ public IList RequiredZoneNames { get; set; }
+
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/PrivateLinkServiceConnectionState.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/PrivateLinkServiceConnectionState.cs
new file mode 100644
index 000000000000..72575987eeaa
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/PrivateLinkServiceConnectionState.cs
@@ -0,0 +1,77 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Redis.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// A collection of information about the state of the connection between
+ /// service consumer and provider.
+ ///
+ public partial class PrivateLinkServiceConnectionState
+ {
+ ///
+ /// Initializes a new instance of the PrivateLinkServiceConnectionState
+ /// class.
+ ///
+ public PrivateLinkServiceConnectionState()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the PrivateLinkServiceConnectionState
+ /// class.
+ ///
+ /// Indicates whether the connection has been
+ /// Approved/Rejected/Removed by the owner of the service. Possible
+ /// values include: 'Pending', 'Approved', 'Rejected'
+ /// The reason for approval/rejection of the
+ /// connection.
+ /// A message indicating if changes on
+ /// the service provider require any updates on the consumer.
+ public PrivateLinkServiceConnectionState(string status = default(string), string description = default(string), string actionsRequired = default(string))
+ {
+ Status = status;
+ Description = description;
+ ActionsRequired = actionsRequired;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets indicates whether the connection has been
+ /// Approved/Rejected/Removed by the owner of the service. Possible
+ /// values include: 'Pending', 'Approved', 'Rejected'
+ ///
+ [JsonProperty(PropertyName = "status")]
+ public string Status { get; set; }
+
+ ///
+ /// Gets or sets the reason for approval/rejection of the connection.
+ ///
+ [JsonProperty(PropertyName = "description")]
+ public string Description { get; set; }
+
+ ///
+ /// Gets or sets a message indicating if changes on the service
+ /// provider require any updates on the consumer.
+ ///
+ [JsonProperty(PropertyName = "actionsRequired")]
+ public string ActionsRequired { get; set; }
+
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ProvisioningState.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ProvisioningState.cs
new file mode 100644
index 000000000000..923de3145990
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ProvisioningState.cs
@@ -0,0 +1,32 @@
+//
+// 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.Redis.Models
+{
+
+ ///
+ /// Defines values for ProvisioningState.
+ ///
+ public static class ProvisioningState
+ {
+ public const string Creating = "Creating";
+ public const string Deleting = "Deleting";
+ public const string Disabled = "Disabled";
+ public const string Failed = "Failed";
+ public const string Linking = "Linking";
+ public const string Provisioning = "Provisioning";
+ public const string RecoveringScaleFailure = "RecoveringScaleFailure";
+ public const string Scaling = "Scaling";
+ public const string Succeeded = "Succeeded";
+ public const string Unlinking = "Unlinking";
+ public const string Unprovisioning = "Unprovisioning";
+ public const string Updating = "Updating";
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ProxyResource.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ProxyResource.cs
new file mode 100644
index 000000000000..df9901f3c158
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/ProxyResource.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.Redis.Models
+{
+ using System.Linq;
+
+ ///
+ /// Proxy Resource
+ ///
+ ///
+ /// The resource model definition for a Azure Resource Manager proxy
+ /// resource. It will not have tags and a location
+ ///
+ 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. E.g.
+ /// "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/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/PublicNetworkAccess.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/PublicNetworkAccess.cs
new file mode 100644
index 000000000000..b28af0727655
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/PublicNetworkAccess.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.Redis.Models
+{
+
+ ///
+ /// Defines values for PublicNetworkAccess.
+ ///
+ public static class PublicNetworkAccess
+ {
+ public const string Enabled = "Enabled";
+ public const string Disabled = "Disabled";
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RebootType.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RebootType.cs
new file mode 100644
index 000000000000..97952aff2ad5
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RebootType.cs
@@ -0,0 +1,23 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Redis.Models
+{
+
+ ///
+ /// Defines values for RebootType.
+ ///
+ public static class RebootType
+ {
+ public const string PrimaryNode = "PrimaryNode";
+ public const string SecondaryNode = "SecondaryNode";
+ public const string AllNodes = "AllNodes";
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisAccessKeys.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisAccessKeys.cs
new file mode 100644
index 000000000000..21039d0c6be0
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisAccessKeys.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.Redis.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Redis cache access keys.
+ ///
+ public partial class RedisAccessKeys
+ {
+ ///
+ /// Initializes a new instance of the RedisAccessKeys class.
+ ///
+ public RedisAccessKeys()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RedisAccessKeys class.
+ ///
+ /// The current primary key that clients can
+ /// use to authenticate with Redis cache.
+ /// The current secondary key that clients
+ /// can use to authenticate with Redis cache.
+ public RedisAccessKeys(string primaryKey = default(string), string secondaryKey = default(string))
+ {
+ PrimaryKey = primaryKey;
+ SecondaryKey = secondaryKey;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the current primary key that clients can use to authenticate
+ /// with Redis cache.
+ ///
+ [JsonProperty(PropertyName = "primaryKey")]
+ public string PrimaryKey { get; private set; }
+
+ ///
+ /// Gets the current secondary key that clients can use to authenticate
+ /// with Redis cache.
+ ///
+ [JsonProperty(PropertyName = "secondaryKey")]
+ public string SecondaryKey { get; private set; }
+
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisCreateParameters.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisCreateParameters.cs
new file mode 100644
index 000000000000..20c350367569
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisCreateParameters.cs
@@ -0,0 +1,239 @@
+//
+// 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.Redis.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Parameters supplied to the Create Redis operation.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class RedisCreateParameters
+ {
+ ///
+ /// Initializes a new instance of the RedisCreateParameters class.
+ ///
+ public RedisCreateParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RedisCreateParameters class.
+ ///
+ /// The SKU of the Redis cache to deploy.
+ /// The geo-location where the resource
+ /// lives
+ /// All Redis Settings. Few possible
+ /// keys:
+ /// rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value
+ /// etc.
+ /// Redis version. Only major version will
+ /// be used in PUT/PATCH request with current valid values: (4,
+ /// 6)
+ /// Specifies whether the non-ssl Redis
+ /// server port (6379) is enabled.
+ /// The number of replicas to be
+ /// created per primary.
+ /// The number of replicas to be
+ /// created per primary.
+ /// A dictionary of tenant
+ /// settings
+ /// The number of shards to be created on a
+ /// Premium Cluster Cache.
+ /// Optional: requires clients to use a
+ /// specified TLS version (or higher) to connect (e,g, '1.0', '1.1',
+ /// '1.2'). Possible values include: '1.0', '1.1', '1.2'
+ /// Whether or not public endpoint
+ /// access is allowed for this cache. Value is optional but if passed
+ /// in, must be 'Enabled' or 'Disabled'. If 'Disabled', private
+ /// endpoints are the exclusive access method. Default value is
+ /// 'Enabled'. Possible values include: 'Enabled', 'Disabled'
+ /// The full resource ID of a subnet in a
+ /// virtual network to deploy the Redis cache in. Example format:
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1
+ /// Static IP address. Required when deploying a
+ /// Redis cache inside an existing Azure Virtual Network.
+ /// A list of availability zones denoting where the
+ /// resource needs to come from.
+ /// Resource tags.
+ public RedisCreateParameters(Sku sku, string location, IDictionary redisConfiguration = default(IDictionary), string redisVersion = default(string), bool? enableNonSslPort = default(bool?), int? replicasPerMaster = default(int?), int? replicasPerPrimary = default(int?), IDictionary tenantSettings = default(IDictionary), int? shardCount = default(int?), string minimumTlsVersion = default(string), string publicNetworkAccess = default(string), string subnetId = default(string), string staticIP = default(string), IList zones = default(IList), IDictionary tags = default(IDictionary))
+ {
+ RedisConfiguration = redisConfiguration;
+ RedisVersion = redisVersion;
+ EnableNonSslPort = enableNonSslPort;
+ ReplicasPerMaster = replicasPerMaster;
+ ReplicasPerPrimary = replicasPerPrimary;
+ TenantSettings = tenantSettings;
+ ShardCount = shardCount;
+ MinimumTlsVersion = minimumTlsVersion;
+ PublicNetworkAccess = publicNetworkAccess;
+ Sku = sku;
+ SubnetId = subnetId;
+ StaticIP = staticIP;
+ Zones = zones;
+ Location = location;
+ Tags = tags;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets all Redis Settings. Few possible keys:
+ /// rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value
+ /// etc.
+ ///
+ [JsonProperty(PropertyName = "properties.redisConfiguration")]
+ public IDictionary RedisConfiguration { get; set; }
+
+ ///
+ /// Gets or sets redis version. Only major version will be used in
+ /// PUT/PATCH request with current valid values: (4, 6)
+ ///
+ [JsonProperty(PropertyName = "properties.redisVersion")]
+ public string RedisVersion { get; set; }
+
+ ///
+ /// Gets or sets specifies whether the non-ssl Redis server port (6379)
+ /// is enabled.
+ ///
+ [JsonProperty(PropertyName = "properties.enableNonSslPort")]
+ public bool? EnableNonSslPort { get; set; }
+
+ ///
+ /// Gets or sets the number of replicas to be created per primary.
+ ///
+ [JsonProperty(PropertyName = "properties.replicasPerMaster")]
+ public int? ReplicasPerMaster { get; set; }
+
+ ///
+ /// Gets or sets the number of replicas to be created per primary.
+ ///
+ [JsonProperty(PropertyName = "properties.replicasPerPrimary")]
+ public int? ReplicasPerPrimary { get; set; }
+
+ ///
+ /// Gets or sets a dictionary of tenant settings
+ ///
+ [JsonProperty(PropertyName = "properties.tenantSettings")]
+ public IDictionary TenantSettings { get; set; }
+
+ ///
+ /// Gets or sets the number of shards to be created on a Premium
+ /// Cluster Cache.
+ ///
+ [JsonProperty(PropertyName = "properties.shardCount")]
+ public int? ShardCount { get; set; }
+
+ ///
+ /// Gets or sets optional: requires clients to use a specified TLS
+ /// version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible
+ /// values include: '1.0', '1.1', '1.2'
+ ///
+ [JsonProperty(PropertyName = "properties.minimumTlsVersion")]
+ public string MinimumTlsVersion { get; set; }
+
+ ///
+ /// Gets or sets whether or not public endpoint access is allowed for
+ /// this cache. Value is optional but if passed in, must be 'Enabled'
+ /// or 'Disabled'. If 'Disabled', private endpoints are the exclusive
+ /// access method. Default value is 'Enabled'. Possible values include:
+ /// 'Enabled', 'Disabled'
+ ///
+ [JsonProperty(PropertyName = "properties.publicNetworkAccess")]
+ public string PublicNetworkAccess { get; set; }
+
+ ///
+ /// Gets or sets the SKU of the Redis cache to deploy.
+ ///
+ [JsonProperty(PropertyName = "properties.sku")]
+ public Sku Sku { get; set; }
+
+ ///
+ /// Gets or sets the full resource ID of a subnet in a virtual network
+ /// to deploy the Redis cache in. Example format:
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1
+ ///
+ [JsonProperty(PropertyName = "properties.subnetId")]
+ public string SubnetId { get; set; }
+
+ ///
+ /// Gets or sets static IP address. Required when deploying a Redis
+ /// cache inside an existing Azure Virtual Network.
+ ///
+ [JsonProperty(PropertyName = "properties.staticIP")]
+ public string StaticIP { get; set; }
+
+ ///
+ /// Gets or sets a list of availability zones denoting where the
+ /// resource needs to come from.
+ ///
+ [JsonProperty(PropertyName = "zones")]
+ public IList Zones { get; set; }
+
+ ///
+ /// Gets or sets the geo-location where the resource lives
+ ///
+ [JsonProperty(PropertyName = "location")]
+ public string Location { get; set; }
+
+ ///
+ /// Gets or sets resource tags.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Sku == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Sku");
+ }
+ if (Location == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Location");
+ }
+ if (Sku != null)
+ {
+ Sku.Validate();
+ }
+ if (SubnetId != null)
+ {
+ if (!System.Text.RegularExpressions.Regex.IsMatch(SubnetId, "^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "SubnetId", "^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$");
+ }
+ }
+ if (StaticIP != null)
+ {
+ if (!System.Text.RegularExpressions.Regex.IsMatch(StaticIP, "^\\d+\\.\\d+\\.\\d+\\.\\d+$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "StaticIP", "^\\d+\\.\\d+\\.\\d+\\.\\d+$");
+ }
+ }
+ }
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisFirewallRule.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisFirewallRule.cs
new file mode 100644
index 000000000000..7e7610e13dbf
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisFirewallRule.cs
@@ -0,0 +1,89 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Redis.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// A firewall rule on a redis cache has a name, and describes a contiguous
+ /// range of IP addresses permitted to connect
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class RedisFirewallRule : ProxyResource
+ {
+ ///
+ /// Initializes a new instance of the RedisFirewallRule class.
+ ///
+ public RedisFirewallRule()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RedisFirewallRule class.
+ ///
+ /// lowest IP address included in the
+ /// range
+ /// highest IP address included in the
+ /// range
+ /// 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. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
+ public RedisFirewallRule(string startIP, string endIP, string id = default(string), string name = default(string), string type = default(string))
+ : base(id, name, type)
+ {
+ StartIP = startIP;
+ EndIP = endIP;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets lowest IP address included in the range
+ ///
+ [JsonProperty(PropertyName = "properties.startIP")]
+ public string StartIP { get; set; }
+
+ ///
+ /// Gets or sets highest IP address included in the range
+ ///
+ [JsonProperty(PropertyName = "properties.endIP")]
+ public string EndIP { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (StartIP == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "StartIP");
+ }
+ if (EndIP == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "EndIP");
+ }
+ }
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisFirewallRuleCreateParameters.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisFirewallRuleCreateParameters.cs
new file mode 100644
index 000000000000..72709ecc9904
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisFirewallRuleCreateParameters.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.Redis.Models
+{
+ using System.Linq;
+
+ ///
+ /// Parameters required for creating a firewall rule on redis cache. (Note,
+ /// you can just use the FirewallRule type instead now.)
+ ///
+ public partial class RedisFirewallRuleCreateParameters : RedisFirewallRule
+ {
+ ///
+ /// Initializes a new instance of the RedisFirewallRuleCreateParameters
+ /// class.
+ ///
+ public RedisFirewallRuleCreateParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RedisFirewallRuleCreateParameters
+ /// class.
+ ///
+ /// lowest IP address included in the
+ /// range
+ /// highest IP address included in the
+ /// range
+ /// 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. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
+ public RedisFirewallRuleCreateParameters(string startIP, string endIP, string id = default(string), string name = default(string), string type = default(string))
+ : base(startIP, endIP, id, name, type)
+ {
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public override void Validate()
+ {
+ base.Validate();
+ }
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisForceRebootResponse.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisForceRebootResponse.cs
new file mode 100644
index 000000000000..11660c866411
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisForceRebootResponse.cs
@@ -0,0 +1,51 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Redis.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Response to force reboot for Redis cache.
+ ///
+ public partial class RedisForceRebootResponse
+ {
+ ///
+ /// Initializes a new instance of the RedisForceRebootResponse class.
+ ///
+ public RedisForceRebootResponse()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RedisForceRebootResponse class.
+ ///
+ /// Status message
+ public RedisForceRebootResponse(string message = default(string))
+ {
+ Message = message;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets status message
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; private set; }
+
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisInstanceDetails.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisInstanceDetails.cs
new file mode 100644
index 000000000000..7cd425377082
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisInstanceDetails.cs
@@ -0,0 +1,98 @@
+//
+// 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.Redis.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Details of single instance of redis.
+ ///
+ public partial class RedisInstanceDetails
+ {
+ ///
+ /// Initializes a new instance of the RedisInstanceDetails class.
+ ///
+ public RedisInstanceDetails()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RedisInstanceDetails class.
+ ///
+ /// Redis instance SSL port.
+ /// If enableNonSslPort is true, provides
+ /// Redis instance Non-SSL port.
+ /// If the Cache uses availability zones, specifies
+ /// availability zone where this instance is located.
+ /// If clustering is enabled, the Shard ID of
+ /// Redis Instance
+ /// Specifies whether the instance is a primary
+ /// node.
+ /// Specifies whether the instance is a primary
+ /// node.
+ public RedisInstanceDetails(int? sslPort = default(int?), int? nonSslPort = default(int?), string zone = default(string), int? shardId = default(int?), bool? isMaster = default(bool?), bool? isPrimary = default(bool?))
+ {
+ SslPort = sslPort;
+ NonSslPort = nonSslPort;
+ Zone = zone;
+ ShardId = shardId;
+ IsMaster = isMaster;
+ IsPrimary = isPrimary;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets redis instance SSL port.
+ ///
+ [JsonProperty(PropertyName = "sslPort")]
+ public int? SslPort { get; private set; }
+
+ ///
+ /// Gets if enableNonSslPort is true, provides Redis instance Non-SSL
+ /// port.
+ ///
+ [JsonProperty(PropertyName = "nonSslPort")]
+ public int? NonSslPort { get; private set; }
+
+ ///
+ /// Gets if the Cache uses availability zones, specifies availability
+ /// zone where this instance is located.
+ ///
+ [JsonProperty(PropertyName = "zone")]
+ public string Zone { get; private set; }
+
+ ///
+ /// Gets if clustering is enabled, the Shard ID of Redis Instance
+ ///
+ [JsonProperty(PropertyName = "shardId")]
+ public int? ShardId { get; private set; }
+
+ ///
+ /// Gets specifies whether the instance is a primary node.
+ ///
+ [JsonProperty(PropertyName = "isMaster")]
+ public bool? IsMaster { get; private set; }
+
+ ///
+ /// Gets specifies whether the instance is a primary node.
+ ///
+ [JsonProperty(PropertyName = "isPrimary")]
+ public bool? IsPrimary { get; private set; }
+
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisKeyType.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisKeyType.cs
new file mode 100644
index 000000000000..beda98cbdf1b
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisKeyType.cs
@@ -0,0 +1,60 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Redis.Models
+{
+ using Newtonsoft.Json;
+ using Newtonsoft.Json.Converters;
+ using System.Runtime;
+ using System.Runtime.Serialization;
+
+ ///
+ /// Defines values for RedisKeyType.
+ ///
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum RedisKeyType
+ {
+ [EnumMember(Value = "Primary")]
+ Primary,
+ [EnumMember(Value = "Secondary")]
+ Secondary
+ }
+ internal static class RedisKeyTypeEnumExtension
+ {
+ internal static string ToSerializedValue(this RedisKeyType? value)
+ {
+ return value == null ? null : ((RedisKeyType)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this RedisKeyType value)
+ {
+ switch( value )
+ {
+ case RedisKeyType.Primary:
+ return "Primary";
+ case RedisKeyType.Secondary:
+ return "Secondary";
+ }
+ return null;
+ }
+
+ internal static RedisKeyType? ParseRedisKeyType(this string value)
+ {
+ switch( value )
+ {
+ case "Primary":
+ return RedisKeyType.Primary;
+ case "Secondary":
+ return RedisKeyType.Secondary;
+ }
+ return null;
+ }
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisLinkedServer.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisLinkedServer.cs
new file mode 100644
index 000000000000..4c55c676acee
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisLinkedServer.cs
@@ -0,0 +1,51 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Redis.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Linked server Id
+ ///
+ public partial class RedisLinkedServer
+ {
+ ///
+ /// Initializes a new instance of the RedisLinkedServer class.
+ ///
+ public RedisLinkedServer()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RedisLinkedServer class.
+ ///
+ /// Linked server Id.
+ public RedisLinkedServer(string id = default(string))
+ {
+ Id = id;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets linked server Id.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisLinkedServerCreateParameters.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisLinkedServerCreateParameters.cs
new file mode 100644
index 000000000000..873b4b4aec9c
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisLinkedServerCreateParameters.cs
@@ -0,0 +1,93 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Redis.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Parameter required for creating a linked server to redis cache.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class RedisLinkedServerCreateParameters
+ {
+ ///
+ /// Initializes a new instance of the RedisLinkedServerCreateParameters
+ /// class.
+ ///
+ public RedisLinkedServerCreateParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RedisLinkedServerCreateParameters
+ /// class.
+ ///
+ /// Fully qualified resourceId of the
+ /// linked redis cache.
+ /// Location of the linked redis
+ /// cache.
+ /// Role of the linked server. Possible values
+ /// include: 'Primary', 'Secondary'
+ public RedisLinkedServerCreateParameters(string linkedRedisCacheId, string linkedRedisCacheLocation, ReplicationRole serverRole)
+ {
+ LinkedRedisCacheId = linkedRedisCacheId;
+ LinkedRedisCacheLocation = linkedRedisCacheLocation;
+ ServerRole = serverRole;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets fully qualified resourceId of the linked redis cache.
+ ///
+ [JsonProperty(PropertyName = "properties.linkedRedisCacheId")]
+ public string LinkedRedisCacheId { get; set; }
+
+ ///
+ /// Gets or sets location of the linked redis cache.
+ ///
+ [JsonProperty(PropertyName = "properties.linkedRedisCacheLocation")]
+ public string LinkedRedisCacheLocation { get; set; }
+
+ ///
+ /// Gets or sets role of the linked server. Possible values include:
+ /// 'Primary', 'Secondary'
+ ///
+ [JsonProperty(PropertyName = "properties.serverRole")]
+ public ReplicationRole ServerRole { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (LinkedRedisCacheId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "LinkedRedisCacheId");
+ }
+ if (LinkedRedisCacheLocation == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "LinkedRedisCacheLocation");
+ }
+ }
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisLinkedServerWithProperties.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisLinkedServerWithProperties.cs
new file mode 100644
index 000000000000..e53bcbe1158c
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisLinkedServerWithProperties.cs
@@ -0,0 +1,110 @@
+//
+// 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.Redis.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Response to put/get linked server (with properties) for Redis cache.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class RedisLinkedServerWithProperties : ProxyResource
+ {
+ ///
+ /// Initializes a new instance of the RedisLinkedServerWithProperties
+ /// class.
+ ///
+ public RedisLinkedServerWithProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RedisLinkedServerWithProperties
+ /// class.
+ ///
+ /// Fully qualified resourceId of the
+ /// linked redis cache.
+ /// Location of the linked redis
+ /// cache.
+ /// Role of the linked server. Possible values
+ /// include: 'Primary', 'Secondary'
+ /// 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. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
+ /// Terminal state of the link between
+ /// primary and secondary redis cache.
+ public RedisLinkedServerWithProperties(string linkedRedisCacheId, string linkedRedisCacheLocation, ReplicationRole serverRole, string id = default(string), string name = default(string), string type = default(string), string provisioningState = default(string))
+ : base(id, name, type)
+ {
+ LinkedRedisCacheId = linkedRedisCacheId;
+ LinkedRedisCacheLocation = linkedRedisCacheLocation;
+ ServerRole = serverRole;
+ ProvisioningState = provisioningState;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets fully qualified resourceId of the linked redis cache.
+ ///
+ [JsonProperty(PropertyName = "properties.linkedRedisCacheId")]
+ public string LinkedRedisCacheId { get; set; }
+
+ ///
+ /// Gets or sets location of the linked redis cache.
+ ///
+ [JsonProperty(PropertyName = "properties.linkedRedisCacheLocation")]
+ public string LinkedRedisCacheLocation { get; set; }
+
+ ///
+ /// Gets or sets role of the linked server. Possible values include:
+ /// 'Primary', 'Secondary'
+ ///
+ [JsonProperty(PropertyName = "properties.serverRole")]
+ public ReplicationRole ServerRole { get; set; }
+
+ ///
+ /// Gets terminal state of the link between primary and secondary redis
+ /// cache.
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (LinkedRedisCacheId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "LinkedRedisCacheId");
+ }
+ if (LinkedRedisCacheLocation == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "LinkedRedisCacheLocation");
+ }
+ }
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisPatchSchedule.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisPatchSchedule.cs
new file mode 100644
index 000000000000..0f96f9317bb4
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisPatchSchedule.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.Redis.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Response to put/get patch schedules for Redis cache.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class RedisPatchSchedule : ProxyResource
+ {
+ ///
+ /// Initializes a new instance of the RedisPatchSchedule class.
+ ///
+ public RedisPatchSchedule()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RedisPatchSchedule class.
+ ///
+ /// List of patch schedules for a Redis
+ /// cache.
+ /// 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. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
+ public RedisPatchSchedule(IList scheduleEntries, string id = default(string), string name = default(string), string type = default(string))
+ : base(id, name, type)
+ {
+ ScheduleEntries = scheduleEntries;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets list of patch schedules for a Redis cache.
+ ///
+ [JsonProperty(PropertyName = "properties.scheduleEntries")]
+ public IList ScheduleEntries { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (ScheduleEntries == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "ScheduleEntries");
+ }
+ if (ScheduleEntries != null)
+ {
+ foreach (var element in ScheduleEntries)
+ {
+ if (element != null)
+ {
+ element.Validate();
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisRebootParameters.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisRebootParameters.cs
new file mode 100644
index 000000000000..2a93808252df
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisRebootParameters.cs
@@ -0,0 +1,77 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Redis.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Specifies which Redis node(s) to reboot.
+ ///
+ public partial class RedisRebootParameters
+ {
+ ///
+ /// Initializes a new instance of the RedisRebootParameters class.
+ ///
+ public RedisRebootParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RedisRebootParameters class.
+ ///
+ /// Which Redis node(s) to reboot. Depending
+ /// on this value data loss is possible. Possible values include:
+ /// 'PrimaryNode', 'SecondaryNode', 'AllNodes'
+ /// If clustering is enabled, the ID of the shard
+ /// to be rebooted.
+ /// A list of redis instances to reboot, specified
+ /// by per-instance SSL ports or non-SSL ports.
+ public RedisRebootParameters(string rebootType = default(string), int? shardId = default(int?), IList ports = default(IList))
+ {
+ RebootType = rebootType;
+ ShardId = shardId;
+ Ports = ports;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets which Redis node(s) to reboot. Depending on this value
+ /// data loss is possible. Possible values include: 'PrimaryNode',
+ /// 'SecondaryNode', 'AllNodes'
+ ///
+ [JsonProperty(PropertyName = "rebootType")]
+ public string RebootType { get; set; }
+
+ ///
+ /// Gets or sets if clustering is enabled, the ID of the shard to be
+ /// rebooted.
+ ///
+ [JsonProperty(PropertyName = "shardId")]
+ public int? ShardId { get; set; }
+
+ ///
+ /// Gets or sets a list of redis instances to reboot, specified by
+ /// per-instance SSL ports or non-SSL ports.
+ ///
+ [JsonProperty(PropertyName = "ports")]
+ public IList Ports { get; set; }
+
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisRegenerateKeyParameters.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisRegenerateKeyParameters.cs
new file mode 100644
index 000000000000..81061642d532
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisRegenerateKeyParameters.cs
@@ -0,0 +1,64 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Redis.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Specifies which Redis access keys to reset.
+ ///
+ public partial class RedisRegenerateKeyParameters
+ {
+ ///
+ /// Initializes a new instance of the RedisRegenerateKeyParameters
+ /// class.
+ ///
+ public RedisRegenerateKeyParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RedisRegenerateKeyParameters
+ /// class.
+ ///
+ /// The Redis access key to regenerate. Possible
+ /// values include: 'Primary', 'Secondary'
+ public RedisRegenerateKeyParameters(RedisKeyType keyType)
+ {
+ KeyType = keyType;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the Redis access key to regenerate. Possible values
+ /// include: 'Primary', 'Secondary'
+ ///
+ [JsonProperty(PropertyName = "keyType")]
+ public RedisKeyType KeyType { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ }
+ }
+}
diff --git a/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisResource.cs b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisResource.cs
new file mode 100644
index 000000000000..5908666fa11d
--- /dev/null
+++ b/sdk/redis/Microsoft.Azure.Management.Redis/src/Generated/Models/RedisResource.cs
@@ -0,0 +1,317 @@
+//
+// 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.Redis.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// A single Redis item in List or Get Operation.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class RedisResource : TrackedResource
+ {
+ ///
+ /// Initializes a new instance of the RedisResource class.
+ ///
+ public RedisResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the RedisResource class.
+ ///
+ /// The geo-location where the resource
+ /// lives
+ /// The SKU of the Redis cache to deploy.
+ /// 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. E.g.
+ /// "Microsoft.Compute/virtualMachines" or
+ /// "Microsoft.Storage/storageAccounts"
+ /// Resource tags.
+ /// All Redis Settings. Few possible
+ /// keys:
+ /// rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value
+ /// etc.
+ /// Redis version. Only major version will
+ /// be used in PUT/PATCH request with current valid values: (4,
+ /// 6)
+ /// Specifies whether the non-ssl Redis
+ /// server port (6379) is enabled.
+ /// The number of replicas to be
+ /// created per primary.
+ /// The number of replicas to be
+ /// created per primary.
+ /// A dictionary of tenant
+ /// settings
+ /// The number of shards to be created on a
+ /// Premium Cluster Cache.
+ /// Optional: requires clients to use a
+ /// specified TLS version (or higher) to connect (e,g, '1.0', '1.1',
+ /// '1.2'). Possible values include: '1.0', '1.1', '1.2'
+ /// Whether or not public endpoint
+ /// access is allowed for this cache. Value is optional but if passed
+ /// in, must be 'Enabled' or 'Disabled'. If 'Disabled', private
+ /// endpoints are the exclusive access method. Default value is
+ /// 'Enabled'. Possible values include: 'Enabled', 'Disabled'
+ /// The full resource ID of a subnet in a
+ /// virtual network to deploy the Redis cache in. Example format:
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1
+ /// Static IP address. Required when deploying a
+ /// Redis cache inside an existing Azure Virtual Network.
+ /// Redis instance provisioning status.
+ /// Possible values include: 'Creating', 'Deleting', 'Disabled',
+ /// 'Failed', 'Linking', 'Provisioning', 'RecoveringScaleFailure',
+ /// 'Scaling', 'Succeeded', 'Unlinking', 'Unprovisioning',
+ /// 'Updating'
+ /// Redis host name.
+ /// Redis non-SSL port.
+ /// Redis SSL port.
+ /// The keys of the Redis cache - not set if
+ /// this object is not the response to Create or Update redis
+ /// cache
+ /// List of the linked servers associated
+ /// with the cache
+ /// List of the Redis instances associated with
+ /// the cache
+ /// List of private endpoint
+ /// connection associated with the specified redis cache
+ /// A list of availability zones denoting where the
+ /// resource needs to come from.
+ public RedisResource(string location, Sku sku, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), IDictionary redisConfiguration = default(IDictionary), string redisVersion = default(string), bool? enableNonSslPort = default(bool?), int? replicasPerMaster = default(int?), int? replicasPerPrimary = default(int?), IDictionary tenantSettings = default(IDictionary), int? shardCount = default(int?), string minimumTlsVersion = default(string), string publicNetworkAccess = default(string), string subnetId = default(string), string staticIP = default(string), string provisioningState = default(string), string hostName = default(string), int? port = default(int?), int? sslPort = default(int?), RedisAccessKeys accessKeys = default(RedisAccessKeys), IList linkedServers = default(IList), IList instances = default(IList), IList privateEndpointConnections = default(IList), IList zones = default(IList))
+ : base(location, id, name, type, tags)
+ {
+ RedisConfiguration = redisConfiguration;
+ RedisVersion = redisVersion;
+ EnableNonSslPort = enableNonSslPort;
+ ReplicasPerMaster = replicasPerMaster;
+ ReplicasPerPrimary = replicasPerPrimary;
+ TenantSettings = tenantSettings;
+ ShardCount = shardCount;
+ MinimumTlsVersion = minimumTlsVersion;
+ PublicNetworkAccess = publicNetworkAccess;
+ Sku = sku;
+ SubnetId = subnetId;
+ StaticIP = staticIP;
+ ProvisioningState = provisioningState;
+ HostName = hostName;
+ Port = port;
+ SslPort = sslPort;
+ AccessKeys = accessKeys;
+ LinkedServers = linkedServers;
+ Instances = instances;
+ PrivateEndpointConnections = privateEndpointConnections;
+ Zones = zones;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets all Redis Settings. Few possible keys:
+ /// rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value
+ /// etc.
+ ///
+ [JsonProperty(PropertyName = "properties.redisConfiguration")]
+ public IDictionary RedisConfiguration { get; set; }
+
+ ///
+ /// Gets or sets redis version. Only major version will be used in
+ /// PUT/PATCH request with current valid values: (4, 6)
+ ///
+ [JsonProperty(PropertyName = "properties.redisVersion")]
+ public string RedisVersion { get; set; }
+
+ ///
+ /// Gets or sets specifies whether the non-ssl Redis server port (6379)
+ /// is enabled.
+ ///
+ [JsonProperty(PropertyName = "properties.enableNonSslPort")]
+ public bool? EnableNonSslPort { get; set; }
+
+ ///
+ /// Gets or sets the number of replicas to be created per primary.
+ ///
+ [JsonProperty(PropertyName = "properties.replicasPerMaster")]
+ public int? ReplicasPerMaster { get; set; }
+
+ ///
+ /// Gets or sets the number of replicas to be created per primary.
+ ///
+ [JsonProperty(PropertyName = "properties.replicasPerPrimary")]
+ public int? ReplicasPerPrimary { get; set; }
+
+ ///
+ /// Gets or sets a dictionary of tenant settings
+ ///
+ [JsonProperty(PropertyName = "properties.tenantSettings")]
+ public IDictionary TenantSettings { get; set; }
+
+ ///
+ /// Gets or sets the number of shards to be created on a Premium
+ /// Cluster Cache.
+ ///
+ [JsonProperty(PropertyName = "properties.shardCount")]
+ public int? ShardCount { get; set; }
+
+ ///
+ /// Gets or sets optional: requires clients to use a specified TLS
+ /// version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible
+ /// values include: '1.0', '1.1', '1.2'
+ ///
+ [JsonProperty(PropertyName = "properties.minimumTlsVersion")]
+ public string MinimumTlsVersion { get; set; }
+
+ ///
+ /// Gets or sets whether or not public endpoint access is allowed for
+ /// this cache. Value is optional but if passed in, must be 'Enabled'
+ /// or 'Disabled'. If 'Disabled', private endpoints are the exclusive
+ /// access method. Default value is 'Enabled'. Possible values include:
+ /// 'Enabled', 'Disabled'
+ ///
+ [JsonProperty(PropertyName = "properties.publicNetworkAccess")]
+ public string PublicNetworkAccess { get; set; }
+
+ ///
+ /// Gets or sets the SKU of the Redis cache to deploy.
+ ///
+ [JsonProperty(PropertyName = "properties.sku")]
+ public Sku Sku { get; set; }
+
+ ///
+ /// Gets or sets the full resource ID of a subnet in a virtual network
+ /// to deploy the Redis cache in. Example format:
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1
+ ///
+ [JsonProperty(PropertyName = "properties.subnetId")]
+ public string SubnetId { get; set; }
+
+ ///
+ /// Gets or sets static IP address. Required when deploying a Redis
+ /// cache inside an existing Azure Virtual Network.
+ ///
+ [JsonProperty(PropertyName = "properties.staticIP")]
+ public string StaticIP { get; set; }
+
+ ///
+ /// Gets redis instance provisioning status. Possible values include:
+ /// 'Creating', 'Deleting', 'Disabled', 'Failed', 'Linking',
+ /// 'Provisioning', 'RecoveringScaleFailure', 'Scaling', 'Succeeded',
+ /// 'Unlinking', 'Unprovisioning', 'Updating'
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; private set; }
+
+ ///
+ /// Gets redis host name.
+ ///
+ [JsonProperty(PropertyName = "properties.hostName")]
+ public string HostName { get; private set; }
+
+ ///
+ /// Gets redis non-SSL port.
+ ///
+ [JsonProperty(PropertyName = "properties.port")]
+ public int? Port { get; private set; }
+
+ ///
+ /// Gets redis SSL port.
+ ///
+ [JsonProperty(PropertyName = "properties.sslPort")]
+ public int? SslPort { get; private set; }
+
+ ///
+ /// Gets the keys of the Redis cache - not set if this object is not
+ /// the response to Create or Update redis cache
+ ///
+ [JsonProperty(PropertyName = "properties.accessKeys")]
+ public RedisAccessKeys AccessKeys { get; private set; }
+
+ ///
+ /// Gets list of the linked servers associated with the cache
+ ///
+ [JsonProperty(PropertyName = "properties.linkedServers")]
+ public IList LinkedServers { get; private set; }
+
+ ///
+ /// Gets list of the Redis instances associated with the cache
+ ///
+ [JsonProperty(PropertyName = "properties.instances")]
+ public IList Instances { get; private set; }
+
+ ///
+ /// Gets list of private endpoint connection associated with the
+ /// specified redis cache
+ ///
+ [JsonProperty(PropertyName = "properties.privateEndpointConnections")]
+ public IList PrivateEndpointConnections { get; private set; }
+
+ ///