From 808c959a497d889904f8a52d494e138a6b12b933 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 25 Feb 2021 06:30:15 +0000 Subject: [PATCH] CodeGen from PR 13114 in Azure/azure-rest-api-specs Update all azureresourceschema.md (#13114) --- .../src/Generated/DatabasesOperations.cs | 226 ++++++++++++++++++ .../DatabasesOperationsExtensions.cs | 100 ++++++++ .../src/Generated/IDatabasesOperations.cs | 56 +++++ .../src/Generated/Models/Database.cs | 12 +- .../DatabasePropertiesGeoReplication.cs | 66 +++++ .../src/Generated/Models/DatabaseUpdate.cs | 12 +- .../Generated/Models/ForceUnlinkParameters.cs | 59 +++++ .../src/Generated/Models/LinkState.cs | 25 ++ .../src/Generated/Models/LinkedDatabase.cs | 68 ++++++ .../RedisEnterpriseManagementClient.cs | 2 +- ...SdkInfo_RedisEnterpriseManagementClient.cs | 23 +- 11 files changed, 629 insertions(+), 20 deletions(-) create mode 100644 sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/DatabasePropertiesGeoReplication.cs create mode 100644 sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/ForceUnlinkParameters.cs create mode 100644 sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/LinkState.cs create mode 100644 sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/LinkedDatabase.cs diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/DatabasesOperations.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/DatabasesOperations.cs index e0e036e936d84..53a2300494768 100644 --- a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/DatabasesOperations.cs +++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/DatabasesOperations.cs @@ -807,6 +807,34 @@ internal DatabasesOperations(RedisEnterpriseManagementClient client) return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } + /// + /// Forcibly removes the link to the specified database resource. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the RedisEnterprise cluster. + /// + /// + /// The name of the database. + /// + /// + /// The resource IDs of the database resources to be unlinked. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task ForceUnlinkWithHttpMessagesAsync(string resourceGroupName, string clusterName, string databaseName, IList ids, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginForceUnlinkWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, ids, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + /// /// Creates a database /// @@ -2041,6 +2069,204 @@ internal DatabasesOperations(RedisEnterpriseManagementClient client) return _result; } + /// + /// Forcibly removes the link to the specified database resource. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the RedisEnterprise cluster. + /// + /// + /// The name of the database. + /// + /// + /// The resource IDs of the database resources to be unlinked. + /// + /// + /// 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 BeginForceUnlinkWithHttpMessagesAsync(string resourceGroupName, string clusterName, string databaseName, IList ids, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (clusterName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "clusterName"); + } + if (databaseName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "databaseName"); + } + 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 (ids == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ids"); + } + ForceUnlinkParameters parameters = new ForceUnlinkParameters(); + if (ids != null) + { + parameters.Ids = ids; + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("clusterName", clusterName); + tracingParameters.Add("databaseName", databaseName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginForceUnlink", 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/redisEnterprise/{clusterName}/databases/{databaseName}/forceUnlink").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{clusterName}", System.Uri.EscapeDataString(clusterName)); + _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName)); + _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("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new 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 databases in the specified RedisEnterprise cluster. /// diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/DatabasesOperationsExtensions.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/DatabasesOperationsExtensions.cs index 1cdc136bdfe19..a44bcc54f538f 100644 --- a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/DatabasesOperationsExtensions.cs +++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/DatabasesOperationsExtensions.cs @@ -13,6 +13,8 @@ namespace Microsoft.Azure.Management.RedisEnterprise using Microsoft.Rest; using Microsoft.Rest.Azure; using Models; + using System.Collections; + using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; @@ -452,6 +454,55 @@ public static void Export(this IDatabasesOperations operations, string resourceG (await operations.ExportWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, sasUri, null, cancellationToken).ConfigureAwait(false)).Dispose(); } + /// + /// Forcibly removes the link to the specified database resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the RedisEnterprise cluster. + /// + /// + /// The name of the database. + /// + /// + /// The resource IDs of the database resources to be unlinked. + /// + public static void ForceUnlink(this IDatabasesOperations operations, string resourceGroupName, string clusterName, string databaseName, IList ids) + { + operations.ForceUnlinkAsync(resourceGroupName, clusterName, databaseName, ids).GetAwaiter().GetResult(); + } + + /// + /// Forcibly removes the link to the specified database resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the RedisEnterprise cluster. + /// + /// + /// The name of the database. + /// + /// + /// The resource IDs of the database resources to be unlinked. + /// + /// + /// The cancellation token. + /// + public static async Task ForceUnlinkAsync(this IDatabasesOperations operations, string resourceGroupName, string clusterName, string databaseName, IList ids, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.ForceUnlinkWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, ids, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// /// Creates a database /// @@ -751,6 +802,55 @@ public static void BeginExport(this IDatabasesOperations operations, string reso (await operations.BeginExportWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, sasUri, null, cancellationToken).ConfigureAwait(false)).Dispose(); } + /// + /// Forcibly removes the link to the specified database resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the RedisEnterprise cluster. + /// + /// + /// The name of the database. + /// + /// + /// The resource IDs of the database resources to be unlinked. + /// + public static void BeginForceUnlink(this IDatabasesOperations operations, string resourceGroupName, string clusterName, string databaseName, IList ids) + { + operations.BeginForceUnlinkAsync(resourceGroupName, clusterName, databaseName, ids).GetAwaiter().GetResult(); + } + + /// + /// Forcibly removes the link to the specified database resource. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the RedisEnterprise cluster. + /// + /// + /// The name of the database. + /// + /// + /// The resource IDs of the database resources to be unlinked. + /// + /// + /// The cancellation token. + /// + public static async Task BeginForceUnlinkAsync(this IDatabasesOperations operations, string resourceGroupName, string clusterName, string databaseName, IList ids, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginForceUnlinkWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, ids, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// /// Gets all databases in the specified RedisEnterprise cluster. /// diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/IDatabasesOperations.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/IDatabasesOperations.cs index f210a716c3d3e..978374b3c2044 100644 --- a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/IDatabasesOperations.cs +++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/IDatabasesOperations.cs @@ -280,6 +280,34 @@ public partial interface IDatabasesOperations /// Task ExportWithHttpMessagesAsync(string resourceGroupName, string clusterName, string databaseName, string sasUri, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Forcibly removes the link to the specified database resource. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the RedisEnterprise cluster. + /// + /// + /// The name of the database. + /// + /// + /// The resource IDs of the database resources to be unlinked. + /// + /// + /// 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 ForceUnlinkWithHttpMessagesAsync(string resourceGroupName, string clusterName, string databaseName, IList ids, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Creates a database /// /// @@ -455,6 +483,34 @@ public partial interface IDatabasesOperations /// Task BeginExportWithHttpMessagesAsync(string resourceGroupName, string clusterName, string databaseName, string sasUri, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Forcibly removes the link to the specified database resource. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the RedisEnterprise cluster. + /// + /// + /// The name of the database. + /// + /// + /// The resource IDs of the database resources to be unlinked. + /// + /// + /// 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 BeginForceUnlinkWithHttpMessagesAsync(string resourceGroupName, string clusterName, string databaseName, IList ids, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Gets all databases in the specified RedisEnterprise cluster. /// /// diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/Database.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/Database.cs index 78cae236bd9ac..f8317bca0fdcd 100644 --- a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/Database.cs +++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/Database.cs @@ -64,7 +64,9 @@ public Database() /// Persistence settings /// Optional set of redis modules to enable in /// this database - modules can only be added at creation time. - public Database(string id = default(string), string name = default(string), string type = default(string), string clientProtocol = default(string), int? port = default(int?), string provisioningState = default(string), string resourceState = default(string), string clusteringPolicy = default(string), string evictionPolicy = default(string), Persistence persistence = default(Persistence), IList modules = default(IList)) + /// Optional set of properties to + /// configure geo replication for this database. + public Database(string id = default(string), string name = default(string), string type = default(string), string clientProtocol = default(string), int? port = default(int?), string provisioningState = default(string), string resourceState = default(string), string clusteringPolicy = default(string), string evictionPolicy = default(string), Persistence persistence = default(Persistence), IList modules = default(IList), DatabasePropertiesGeoReplication geoReplication = default(DatabasePropertiesGeoReplication)) : base(id, name, type) { ClientProtocol = clientProtocol; @@ -75,6 +77,7 @@ public Database() EvictionPolicy = evictionPolicy; Persistence = persistence; Modules = modules; + GeoReplication = geoReplication; CustomInit(); } @@ -145,5 +148,12 @@ public Database() [JsonProperty(PropertyName = "properties.modules")] public IList Modules { get; set; } + /// + /// Gets or sets optional set of properties to configure geo + /// replication for this database. + /// + [JsonProperty(PropertyName = "properties.geoReplication")] + public DatabasePropertiesGeoReplication GeoReplication { get; set; } + } } diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/DatabasePropertiesGeoReplication.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/DatabasePropertiesGeoReplication.cs new file mode 100644 index 0000000000000..dc931d588e4a3 --- /dev/null +++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/DatabasePropertiesGeoReplication.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.RedisEnterprise.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Optional set of properties to configure geo replication for this + /// database. + /// + public partial class DatabasePropertiesGeoReplication + { + /// + /// Initializes a new instance of the DatabasePropertiesGeoReplication + /// class. + /// + public DatabasePropertiesGeoReplication() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatabasePropertiesGeoReplication + /// class. + /// + /// Name for the group of linked database + /// resources + /// List of database resources to link + /// with this database + public DatabasePropertiesGeoReplication(string groupNickname = default(string), IList linkedDatabases = default(IList)) + { + GroupNickname = groupNickname; + LinkedDatabases = linkedDatabases; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name for the group of linked database resources + /// + [JsonProperty(PropertyName = "groupNickname")] + public string GroupNickname { get; set; } + + /// + /// Gets or sets list of database resources to link with this database + /// + [JsonProperty(PropertyName = "linkedDatabases")] + public IList LinkedDatabases { get; set; } + + } +} diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/DatabaseUpdate.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/DatabaseUpdate.cs index eadc36ff3bbc4..a4d3cb2029f2e 100644 --- a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/DatabaseUpdate.cs +++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/DatabaseUpdate.cs @@ -58,7 +58,9 @@ public DatabaseUpdate() /// Persistence settings /// Optional set of redis modules to enable in /// this database - modules can only be added at creation time. - public DatabaseUpdate(string clientProtocol = default(string), int? port = default(int?), string provisioningState = default(string), string resourceState = default(string), string clusteringPolicy = default(string), string evictionPolicy = default(string), Persistence persistence = default(Persistence), IList modules = default(IList)) + /// Optional set of properties to + /// configure geo replication for this database. + public DatabaseUpdate(string clientProtocol = default(string), int? port = default(int?), string provisioningState = default(string), string resourceState = default(string), string clusteringPolicy = default(string), string evictionPolicy = default(string), Persistence persistence = default(Persistence), IList modules = default(IList), DatabasePropertiesGeoReplication geoReplication = default(DatabasePropertiesGeoReplication)) { ClientProtocol = clientProtocol; Port = port; @@ -68,6 +70,7 @@ public DatabaseUpdate() EvictionPolicy = evictionPolicy; Persistence = persistence; Modules = modules; + GeoReplication = geoReplication; CustomInit(); } @@ -138,5 +141,12 @@ public DatabaseUpdate() [JsonProperty(PropertyName = "properties.modules")] public IList Modules { get; set; } + /// + /// Gets or sets optional set of properties to configure geo + /// replication for this database. + /// + [JsonProperty(PropertyName = "properties.geoReplication")] + public DatabasePropertiesGeoReplication GeoReplication { get; set; } + } } diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/ForceUnlinkParameters.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/ForceUnlinkParameters.cs new file mode 100644 index 0000000000000..b9af2c949fb29 --- /dev/null +++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/ForceUnlinkParameters.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.RedisEnterprise.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Forcibly unlink another database from this database. + /// + /// + /// Parameters for a Redis Enterprise Active Geo Replication Force Unlink + /// operation. + /// + public partial class ForceUnlinkParameters + { + /// + /// Initializes a new instance of the ForceUnlinkParameters class. + /// + public ForceUnlinkParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ForceUnlinkParameters class. + /// + /// The resource IDs of the database resources to be + /// unlinked. + public ForceUnlinkParameters(IList ids) + { + Ids = ids; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the resource IDs of the database resources to be + /// unlinked. + /// + [JsonProperty(PropertyName = "ids")] + public IList Ids { get; set; } + + } +} diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/LinkState.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/LinkState.cs new file mode 100644 index 0000000000000..b2b33657eadd2 --- /dev/null +++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/LinkState.cs @@ -0,0 +1,25 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RedisEnterprise.Models +{ + + /// + /// Defines values for LinkState. + /// + public static class LinkState + { + public const string Linked = "Linked"; + public const string Linking = "Linking"; + public const string Unlinking = "Unlinking"; + public const string LinkFailed = "LinkFailed"; + public const string UnlinkFailed = "UnlinkFailed"; + } +} diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/LinkedDatabase.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/LinkedDatabase.cs new file mode 100644 index 0000000000000..ee3fd514c91de --- /dev/null +++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/LinkedDatabase.cs @@ -0,0 +1,68 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RedisEnterprise.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Linked Database + /// + /// + /// Specifies details of a linked database resource. + /// + public partial class LinkedDatabase + { + /// + /// Initializes a new instance of the LinkedDatabase class. + /// + public LinkedDatabase() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LinkedDatabase class. + /// + /// Resource ID of a database resource to link with + /// this database. + /// State of the link between the database + /// resources. Possible values include: 'Linked', 'Linking', + /// 'Unlinking', 'LinkFailed', 'UnlinkFailed' + public LinkedDatabase(string id = default(string), string state = default(string)) + { + Id = id; + State = state; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resource ID of a database resource to link with this + /// database. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + /// + /// Gets state of the link between the database resources. Possible + /// values include: 'Linked', 'Linking', 'Unlinking', 'LinkFailed', + /// 'UnlinkFailed' + /// + [JsonProperty(PropertyName = "state")] + public string State { get; private set; } + + } +} diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/RedisEnterpriseManagementClient.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/RedisEnterpriseManagementClient.cs index 6cdf73b64ae6d..9136829c4c7a6 100644 --- a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/RedisEnterpriseManagementClient.cs +++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/RedisEnterpriseManagementClient.cs @@ -352,7 +352,7 @@ private void Initialize() PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this); PrivateLinkResources = new PrivateLinkResourcesOperations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2021-03-01"; + ApiVersion = "2021-02-01-preview"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/SdkInfo_RedisEnterpriseManagementClient.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/SdkInfo_RedisEnterpriseManagementClient.cs index 72a4529ff61fc..6c5d1e5a65a57 100644 --- a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/SdkInfo_RedisEnterpriseManagementClient.cs +++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/SdkInfo_RedisEnterpriseManagementClient.cs @@ -19,25 +19,14 @@ public static IEnumerable> ApiInfo_RedisEnterprise { return new Tuple[] { - new Tuple("Cache", "Databases", "2021-03-01"), - new Tuple("Cache", "Operations", "2021-03-01"), - new Tuple("Cache", "OperationsStatus", "2021-03-01"), - new Tuple("Cache", "PrivateEndpointConnections", "2021-03-01"), - new Tuple("Cache", "PrivateLinkResources", "2021-03-01"), - new Tuple("Cache", "RedisEnterprise", "2021-03-01"), + new Tuple("Cache", "Databases", "2021-02-01-preview"), + new Tuple("Cache", "Operations", "2021-02-01-preview"), + new Tuple("Cache", "OperationsStatus", "2021-02-01-preview"), + new Tuple("Cache", "PrivateEndpointConnections", "2021-02-01-preview"), + new Tuple("Cache", "PrivateLinkResources", "2021-02-01-preview"), + new Tuple("Cache", "RedisEnterprise", "2021-02-01-preview"), }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "v2"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/redisenterprise/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\\repos\\feb21\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "379ee7309b62268464be1e14b0f9022a9283c2a4"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } -