From cdd756e289450623e5fb0fc2850e1187ccd4635d Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 15 Jan 2021 22:45:02 +0000 Subject: [PATCH] CodeGen from PR 12424 in Azure/azure-rest-api-specs Merge 09d3d757980ff6944e26a58e532128f2556584ca into dc3ba322d86c385a7f56f40f1cb2d585cfce6a1b --- .../DataMaskingPoliciesOperations.cs | 22 +- .../Generated/DataMaskingRulesOperations.cs | 263 ++++++- .../DataMaskingRulesOperationsExtensions.cs | 52 ++ .../IDataMaskingPoliciesOperations.cs | 4 +- .../Generated/IDataMaskingRulesOperations.cs | 35 +- ...teLinkHubPrivateLinkResourcesOperations.cs | 111 +++ .../ISqlPoolGeoBackupPoliciesOperations.cs | 32 + ...lPoolMaintenanceWindowOptionsOperations.cs | 61 ++ .../ISqlPoolMaintenanceWindowsOperations.cs | 96 +++ ...lRecommendedSensitivityLabelsOperations.cs | 55 ++ .../ISqlPoolSensitivityLabelsOperations.cs | 28 + .../src/Generated/ISynapseManagementClient.cs | 20 + .../Models/BigDataPoolResourceInfo.cs | 28 +- .../src/Generated/Models/DayOfWeek.cs | 27 + .../Models/DynamicExecutorAllocation.cs | 53 ++ .../Models/MaintenanceWindowOptions.cs | 122 ++++ .../Models/MaintenanceWindowTimeRange.cs | 73 ++ .../Generated/Models/MaintenanceWindows.cs | 61 ++ .../RecommendedSensitivityLabelUpdate.cs | 109 +++ .../RecommendedSensitivityLabelUpdateKind.cs | 60 ++ .../RecommendedSensitivityLabelUpdateList.cs | 53 ++ .../src/Generated/Models/SensitivityLabel.cs | 44 +- .../Generated/Models/SensitivityLabelRank.cs | 78 ++ .../Models/SensitivityLabelUpdate.cs | 116 +++ .../Models/SensitivityLabelUpdateKind.cs | 60 ++ .../Models/SensitivityLabelUpdateList.cs | 51 ++ .../src/Generated/Models/SqlPoolColumn.cs | 11 +- .../src/Generated/Models/Workspace.cs | 10 +- .../WorkspaceRepositoryConfiguration.cs | 18 +- ...teLinkHubPrivateLinkResourcesOperations.cs | 680 ++++++++++++++++++ ...rivateLinkResourcesOperationsExtensions.cs | 163 +++++ .../SdkInfo_SynapseManagementClient.cs | 14 +- .../SdkInfo_SynapseSqlVManagementClient.cs | 1 - .../SqlPoolGeoBackupPoliciesOperations.cs | 268 +++++++ ...olGeoBackupPoliciesOperationsExtensions.cs | 52 ++ ...lPoolMaintenanceWindowOptionsOperations.cs | 303 ++++++++ ...enanceWindowOptionsOperationsExtensions.cs | 83 +++ .../SqlPoolMaintenanceWindowsOperations.cs | 541 ++++++++++++++ ...lMaintenanceWindowsOperationsExtensions.cs | 146 ++++ ...lRecommendedSensitivityLabelsOperations.cs | 281 ++++++++ ...edSensitivityLabelsOperationsExtensions.cs | 74 ++ .../SqlPoolSensitivityLabelsOperations.cs | 226 ++++++ ...olSensitivityLabelsOperationsExtensions.cs | 47 ++ .../src/Generated/SynapseManagementClient.cs | 24 + 44 files changed, 4595 insertions(+), 61 deletions(-) create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateLinkHubPrivateLinkResourcesOperations.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolMaintenanceWindowOptionsOperations.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolMaintenanceWindowsOperations.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolRecommendedSensitivityLabelsOperations.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/DayOfWeek.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/DynamicExecutorAllocation.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/MaintenanceWindowOptions.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/MaintenanceWindowTimeRange.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/MaintenanceWindows.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/RecommendedSensitivityLabelUpdate.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/RecommendedSensitivityLabelUpdateKind.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/RecommendedSensitivityLabelUpdateList.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelRank.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelUpdate.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelUpdateKind.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelUpdateList.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateLinkHubPrivateLinkResourcesOperations.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateLinkHubPrivateLinkResourcesOperationsExtensions.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowOptionsOperations.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowOptionsOperationsExtensions.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowsOperations.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowsOperationsExtensions.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolRecommendedSensitivityLabelsOperations.cs create mode 100644 sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolRecommendedSensitivityLabelsOperationsExtensions.cs diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingPoliciesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingPoliciesOperations.cs index b1d2487e1189b..a07c5b263766d 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingPoliciesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingPoliciesOperations.cs @@ -71,7 +71,7 @@ internal DataMaskingPoliciesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -240,14 +240,13 @@ internal DataMaskingPoliciesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -257,10 +256,6 @@ internal DataMaskingPoliciesOperations(SynapseManagementClient client) } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { ServiceClientTracing.Error(_invocationId, ex); @@ -323,7 +318,7 @@ internal DataMaskingPoliciesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -477,14 +472,13 @@ internal DataMaskingPoliciesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -494,10 +488,6 @@ internal DataMaskingPoliciesOperations(SynapseManagementClient client) } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { ServiceClientTracing.Error(_invocationId, ex); diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingRulesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingRulesOperations.cs index 6b4f917ac6c94..c984a0d3b8a0f 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingRulesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingRulesOperations.cs @@ -74,7 +74,7 @@ internal DataMaskingRulesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -249,14 +249,13 @@ internal DataMaskingRulesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 201) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -266,10 +265,6 @@ internal DataMaskingRulesOperations(SynapseManagementClient client) } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { ServiceClientTracing.Error(_invocationId, ex); @@ -332,6 +327,247 @@ internal DataMaskingRulesOperations(SynapseManagementClient client) return _result; } + /// + /// Gets the specific Sql pool data masking rule. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// The name of the data masking 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 workspaceName, string sqlPoolName, string dataMaskingRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (sqlPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sqlPoolName"); + } + if (dataMaskingRuleName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "dataMaskingRuleName"); + } + string dataMaskingPolicyName = "Default"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("sqlPoolName", sqlPoolName); + tracingParameters.Add("dataMaskingPolicyName", dataMaskingPolicyName); + tracingParameters.Add("dataMaskingRuleName", dataMaskingRuleName); + 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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{sqlPoolName}", System.Uri.EscapeDataString(sqlPoolName)); + _url = _url.Replace("{dataMaskingPolicyName}", System.Uri.EscapeDataString(dataMaskingPolicyName)); + _url = _url.Replace("{dataMaskingRuleName}", System.Uri.EscapeDataString(dataMaskingRuleName)); + 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 ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorContract _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 a list of Sql pool data masking rules. /// @@ -350,7 +586,7 @@ internal DataMaskingRulesOperations(SynapseManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -504,14 +740,13 @@ internal DataMaskingRulesOperations(SynapseManagementClient client) string _responseContent = null; if ((int)_statusCode != 200) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + ErrorContract _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -521,10 +756,6 @@ internal DataMaskingRulesOperations(SynapseManagementClient client) } ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { ServiceClientTracing.Error(_invocationId, ex); diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingRulesOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingRulesOperationsExtensions.cs index 61cc5702cd93c..b538337ae72bb 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingRulesOperationsExtensions.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/DataMaskingRulesOperationsExtensions.cs @@ -81,6 +81,58 @@ public static DataMaskingRule CreateOrUpdate(this IDataMaskingRulesOperations op } } + /// + /// Gets the specific Sql pool data masking rule. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// The name of the data masking rule. + /// + public static DataMaskingRule Get(this IDataMaskingRulesOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, string dataMaskingRuleName) + { + return operations.GetAsync(resourceGroupName, workspaceName, sqlPoolName, dataMaskingRuleName).GetAwaiter().GetResult(); + } + + /// + /// Gets the specific Sql pool data masking rule. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// The name of the data masking rule. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IDataMaskingRulesOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, string dataMaskingRuleName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, dataMaskingRuleName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Gets a list of Sql pool data masking rules. /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IDataMaskingPoliciesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IDataMaskingPoliciesOperations.cs index b14881d8cb537..8232691da4442 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IDataMaskingPoliciesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IDataMaskingPoliciesOperations.cs @@ -44,7 +44,7 @@ public partial interface IDataMaskingPoliciesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -72,7 +72,7 @@ public partial interface IDataMaskingPoliciesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IDataMaskingRulesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IDataMaskingRulesOperations.cs index d1188c41bc4f8..7049cb4bf9ffd 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IDataMaskingRulesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IDataMaskingRulesOperations.cs @@ -48,7 +48,7 @@ public partial interface IDataMaskingRulesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -59,6 +59,37 @@ public partial interface IDataMaskingRulesOperations /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, string dataMaskingRuleName, DataMaskingRule parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Gets the specific Sql pool data masking rule. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// The name of the data masking 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 workspaceName, string sqlPoolName, string dataMaskingRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Gets a list of Sql pool data masking rules. /// /// @@ -76,7 +107,7 @@ public partial interface IDataMaskingRulesOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateLinkHubPrivateLinkResourcesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateLinkHubPrivateLinkResourcesOperations.cs new file mode 100644 index 0000000000000..9ce8643b73838 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/IPrivateLinkHubPrivateLinkResourcesOperations.cs @@ -0,0 +1,111 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// PrivateLinkHubPrivateLinkResourcesOperations operations. + /// + public partial interface IPrivateLinkHubPrivateLinkResourcesOperations + { + /// + /// Private Link Resources + /// + /// + /// Get all private link resources for a private link hub + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the private link hub + /// + /// + /// 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 privateLinkHubName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get Private Link Hub Private Link Resource + /// + /// + /// Get private link resource in private link hub + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the private link hub + /// + /// + /// The name of the private link 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 privateLinkHubName, string privateLinkResourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Private Link Resources + /// + /// + /// Get all private link resources for a private link hub + /// + /// + /// 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/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolGeoBackupPoliciesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolGeoBackupPoliciesOperations.cs index 5a02bf0b79e8b..3f9ee83000eee 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolGeoBackupPoliciesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolGeoBackupPoliciesOperations.cs @@ -55,6 +55,38 @@ public partial interface ISqlPoolGeoBackupPoliciesOperations /// Task>> ListWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Updates a SQL Pool geo backup policy. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// The required parameters for creating or updating the geo backup + /// policy. + /// + /// + /// 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 workspaceName, string sqlPoolName, GeoBackupPolicy parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Get a SQL pool geo backup policy /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolMaintenanceWindowOptionsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolMaintenanceWindowOptionsOperations.cs new file mode 100644 index 0000000000000..2c712e6e85280 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolMaintenanceWindowOptionsOperations.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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// SqlPoolMaintenanceWindowOptionsOperations operations. + /// + public partial interface ISqlPoolMaintenanceWindowOptionsOperations + { + /// + /// SQL pool's available maintenance windows. + /// + /// + /// Get list of SQL pool's available maintenance windows. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window options name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, string maintenanceWindowOptionsName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolMaintenanceWindowsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolMaintenanceWindowsOperations.cs new file mode 100644 index 0000000000000..440f74bd4cfc6 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolMaintenanceWindowsOperations.cs @@ -0,0 +1,96 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// SqlPoolMaintenanceWindowsOperations operations. + /// + public partial interface ISqlPoolMaintenanceWindowsOperations + { + /// + /// Get a SQL pool's Maintenance Windows. + /// + /// + /// Get a SQL pool's Maintenance Windows. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, string maintenanceWindowName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a Sql pool's maintenance windows settings. + /// + /// + /// Creates or updates a Sql pool's maintenance windows settings. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window name. + /// + /// + /// The required parameters for creating or updating Maintenance + /// Windows settings + /// + /// + /// 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 CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, string maintenanceWindowName, MaintenanceWindows parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolRecommendedSensitivityLabelsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolRecommendedSensitivityLabelsOperations.cs new file mode 100644 index 0000000000000..6c1cd3140493b --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolRecommendedSensitivityLabelsOperations.cs @@ -0,0 +1,55 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// SqlPoolRecommendedSensitivityLabelsOperations operations. + /// + public partial interface ISqlPoolRecommendedSensitivityLabelsOperations + { + /// + /// Update recommended sensitivity labels states of a given SQL Pool + /// using an operations batch. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, RecommendedSensitivityLabelUpdateList parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolSensitivityLabelsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolSensitivityLabelsOperations.cs index d1f1757826757..e8074e4f227cf 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolSensitivityLabelsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISqlPoolSensitivityLabelsOperations.cs @@ -59,6 +59,34 @@ public partial interface ISqlPoolSensitivityLabelsOperations /// Task>> ListCurrentWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Update sensitivity labels of a given SQL Pool using an operations + /// batch. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, SensitivityLabelUpdateList parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Gets sensitivity labels of a given SQL pool /// /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISynapseManagementClient.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISynapseManagementClient.cs index b8609f7c7917a..4415ba1c4eb3a 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISynapseManagementClient.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/ISynapseManagementClient.cs @@ -119,6 +119,16 @@ public partial interface ISynapseManagementClient : System.IDisposable /// ISqlPoolReplicationLinksOperations SqlPoolReplicationLinks { get; } + /// + /// Gets the ISqlPoolMaintenanceWindowsOperations. + /// + ISqlPoolMaintenanceWindowsOperations SqlPoolMaintenanceWindows { get; } + + /// + /// Gets the ISqlPoolMaintenanceWindowOptionsOperations. + /// + ISqlPoolMaintenanceWindowOptionsOperations SqlPoolMaintenanceWindowOptions { get; } + /// /// Gets the ISqlPoolTransparentDataEncryptionsOperations. /// @@ -144,6 +154,11 @@ public partial interface ISynapseManagementClient : System.IDisposable /// ISqlPoolSensitivityLabelsOperations SqlPoolSensitivityLabels { get; } + /// + /// Gets the ISqlPoolRecommendedSensitivityLabelsOperations. + /// + ISqlPoolRecommendedSensitivityLabelsOperations SqlPoolRecommendedSensitivityLabels { get; } + /// /// Gets the ISqlPoolSchemasOperations. /// @@ -289,6 +304,11 @@ public partial interface ISynapseManagementClient : System.IDisposable /// IPrivateLinkResourcesOperations PrivateLinkResources { get; } + /// + /// Gets the IPrivateLinkHubPrivateLinkResourcesOperations. + /// + IPrivateLinkHubPrivateLinkResourcesOperations PrivateLinkHubPrivateLinkResources { get; } + /// /// Gets the IPrivateEndpointConnectionsOperations. /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/BigDataPoolResourceInfo.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/BigDataPoolResourceInfo.cs index 46b083205a9c4..f06a361e00d35 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/BigDataPoolResourceInfo.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/BigDataPoolResourceInfo.cs @@ -54,10 +54,11 @@ public BigDataPoolResourceInfo() /// Auto-pausing properties /// Whether compute isolation /// is required or not. - /// Whether library - /// requirements changed. /// Whether session level /// packages enabled. + /// The cache size + /// Dynamic Executor + /// Allocation /// The Spark events folder /// The number of nodes in the Big Data /// pool. @@ -74,7 +75,7 @@ public BigDataPoolResourceInfo() /// The kind of nodes that the Big Data /// pool provides. Possible values include: 'None', /// 'MemoryOptimized' - public BigDataPoolResourceInfo(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), AutoScaleProperties autoScale = default(AutoScaleProperties), System.DateTime? creationDate = default(System.DateTime?), AutoPauseProperties autoPause = default(AutoPauseProperties), bool? isComputeIsolationEnabled = default(bool?), bool? haveLibraryRequirementsChanged = default(bool?), bool? sessionLevelPackagesEnabled = default(bool?), string sparkEventsFolder = default(string), int? nodeCount = default(int?), LibraryRequirements libraryRequirements = default(LibraryRequirements), LibraryRequirements sparkConfigProperties = default(LibraryRequirements), string sparkVersion = default(string), string defaultSparkLogFolder = default(string), string nodeSize = default(string), string nodeSizeFamily = default(string)) + public BigDataPoolResourceInfo(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), AutoScaleProperties autoScale = default(AutoScaleProperties), System.DateTime? creationDate = default(System.DateTime?), AutoPauseProperties autoPause = default(AutoPauseProperties), bool? isComputeIsolationEnabled = default(bool?), bool? sessionLevelPackagesEnabled = default(bool?), int? cacheSize = default(int?), DynamicExecutorAllocation dynamicExecutorAllocation = default(DynamicExecutorAllocation), string sparkEventsFolder = default(string), int? nodeCount = default(int?), LibraryRequirements libraryRequirements = default(LibraryRequirements), LibraryRequirements sparkConfigProperties = default(LibraryRequirements), string sparkVersion = default(string), string defaultSparkLogFolder = default(string), string nodeSize = default(string), string nodeSizeFamily = default(string)) : base(location, id, name, type, tags) { ProvisioningState = provisioningState; @@ -82,8 +83,9 @@ public BigDataPoolResourceInfo() CreationDate = creationDate; AutoPause = autoPause; IsComputeIsolationEnabled = isComputeIsolationEnabled; - HaveLibraryRequirementsChanged = haveLibraryRequirementsChanged; SessionLevelPackagesEnabled = sessionLevelPackagesEnabled; + CacheSize = cacheSize; + DynamicExecutorAllocation = dynamicExecutorAllocation; SparkEventsFolder = sparkEventsFolder; NodeCount = nodeCount; LibraryRequirements = libraryRequirements; @@ -130,18 +132,24 @@ public BigDataPoolResourceInfo() [JsonProperty(PropertyName = "properties.isComputeIsolationEnabled")] public bool? IsComputeIsolationEnabled { get; set; } - /// - /// Gets or sets whether library requirements changed. - /// - [JsonProperty(PropertyName = "properties.haveLibraryRequirementsChanged")] - public bool? HaveLibraryRequirementsChanged { get; set; } - /// /// Gets or sets whether session level packages enabled. /// [JsonProperty(PropertyName = "properties.sessionLevelPackagesEnabled")] public bool? SessionLevelPackagesEnabled { get; set; } + /// + /// Gets or sets the cache size + /// + [JsonProperty(PropertyName = "properties.cacheSize")] + public int? CacheSize { get; set; } + + /// + /// Gets or sets dynamic Executor Allocation + /// + [JsonProperty(PropertyName = "properties.dynamicExecutorAllocation")] + public DynamicExecutorAllocation DynamicExecutorAllocation { get; set; } + /// /// Gets or sets the Spark events folder /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/DayOfWeek.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/DayOfWeek.cs new file mode 100644 index 0000000000000..3915d376d9cd6 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/DayOfWeek.cs @@ -0,0 +1,27 @@ +// +// 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.Synapse.Models +{ + + /// + /// Defines values for DayOfWeek. + /// + public static class DayOfWeek + { + public const string Sunday = "Sunday"; + public const string Monday = "Monday"; + public const string Tuesday = "Tuesday"; + public const string Wednesday = "Wednesday"; + public const string Thursday = "Thursday"; + public const string Friday = "Friday"; + public const string Saturday = "Saturday"; + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/DynamicExecutorAllocation.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/DynamicExecutorAllocation.cs new file mode 100644 index 0000000000000..7fe223752c39b --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/DynamicExecutorAllocation.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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Dynamic Executor Allocation Properties + /// + public partial class DynamicExecutorAllocation + { + /// + /// Initializes a new instance of the DynamicExecutorAllocation class. + /// + public DynamicExecutorAllocation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DynamicExecutorAllocation class. + /// + /// Indicates whether Dynamic Executor Allocation + /// is enabled or not. + public DynamicExecutorAllocation(bool? enabled = default(bool?)) + { + Enabled = enabled; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets indicates whether Dynamic Executor Allocation is + /// enabled or not. + /// + [JsonProperty(PropertyName = "enabled")] + public bool? Enabled { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/MaintenanceWindowOptions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/MaintenanceWindowOptions.cs new file mode 100644 index 0000000000000..d0b03ccfdda6b --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/MaintenanceWindowOptions.cs @@ -0,0 +1,122 @@ +// +// 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.Synapse.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Maintenance window options. + /// + [Rest.Serialization.JsonTransformation] + public partial class MaintenanceWindowOptions : ProxyResource + { + /// + /// Initializes a new instance of the MaintenanceWindowOptions class. + /// + public MaintenanceWindowOptions() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MaintenanceWindowOptions 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" + /// Whether maintenance windows are enabled for + /// the database. + /// Available maintenance cycles + /// e.g. {Saturday, 0, 48*60}, {Wednesday, 0, 24*60}. + /// Minimum duration of maintenance + /// window. + /// Default duration for + /// maintenance window. + /// Minimum number of maintenance windows + /// cycles to be set on the database. + /// Time granularity in minutes + /// for maintenance windows. + /// Whether we + /// allow multiple maintenance windows per cycle. + public MaintenanceWindowOptions(string id = default(string), string name = default(string), string type = default(string), bool? isEnabled = default(bool?), IList maintenanceWindowCycles = default(IList), int? minDurationInMinutes = default(int?), int? defaultDurationInMinutes = default(int?), int? minCycles = default(int?), int? timeGranularityInMinutes = default(int?), bool? allowMultipleMaintenanceWindowsPerCycle = default(bool?)) + : base(id, name, type) + { + IsEnabled = isEnabled; + MaintenanceWindowCycles = maintenanceWindowCycles; + MinDurationInMinutes = minDurationInMinutes; + DefaultDurationInMinutes = defaultDurationInMinutes; + MinCycles = minCycles; + TimeGranularityInMinutes = timeGranularityInMinutes; + AllowMultipleMaintenanceWindowsPerCycle = allowMultipleMaintenanceWindowsPerCycle; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets whether maintenance windows are enabled for the + /// database. + /// + [JsonProperty(PropertyName = "properties.isEnabled")] + public bool? IsEnabled { get; set; } + + /// + /// Gets or sets available maintenance cycles e.g. {Saturday, 0, + /// 48*60}, {Wednesday, 0, 24*60}. + /// + [JsonProperty(PropertyName = "properties.maintenanceWindowCycles")] + public IList MaintenanceWindowCycles { get; set; } + + /// + /// Gets or sets minimum duration of maintenance window. + /// + [JsonProperty(PropertyName = "properties.minDurationInMinutes")] + public int? MinDurationInMinutes { get; set; } + + /// + /// Gets or sets default duration for maintenance window. + /// + [JsonProperty(PropertyName = "properties.defaultDurationInMinutes")] + public int? DefaultDurationInMinutes { get; set; } + + /// + /// Gets or sets minimum number of maintenance windows cycles to be set + /// on the database. + /// + [JsonProperty(PropertyName = "properties.minCycles")] + public int? MinCycles { get; set; } + + /// + /// Gets or sets time granularity in minutes for maintenance windows. + /// + [JsonProperty(PropertyName = "properties.timeGranularityInMinutes")] + public int? TimeGranularityInMinutes { get; set; } + + /// + /// Gets or sets whether we allow multiple maintenance windows per + /// cycle. + /// + [JsonProperty(PropertyName = "properties.allowMultipleMaintenanceWindowsPerCycle")] + public bool? AllowMultipleMaintenanceWindowsPerCycle { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/MaintenanceWindowTimeRange.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/MaintenanceWindowTimeRange.cs new file mode 100644 index 0000000000000..09c49aa28433a --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/MaintenanceWindowTimeRange.cs @@ -0,0 +1,73 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Maintenance window time range. + /// + public partial class MaintenanceWindowTimeRange + { + /// + /// Initializes a new instance of the MaintenanceWindowTimeRange class. + /// + public MaintenanceWindowTimeRange() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MaintenanceWindowTimeRange class. + /// + /// Day of maintenance window. Possible values + /// include: 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', + /// 'Friday', 'Saturday' + /// Start time minutes offset from + /// 12am. + /// Duration of maintenance window in + /// minutes. + public MaintenanceWindowTimeRange(string dayOfWeek = default(string), string startTime = default(string), string duration = default(string)) + { + DayOfWeek = dayOfWeek; + StartTime = startTime; + Duration = duration; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets day of maintenance window. Possible values include: + /// 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', + /// 'Saturday' + /// + [JsonProperty(PropertyName = "dayOfWeek")] + public string DayOfWeek { get; set; } + + /// + /// Gets or sets start time minutes offset from 12am. + /// + [JsonProperty(PropertyName = "startTime")] + public string StartTime { get; set; } + + /// + /// Gets or sets duration of maintenance window in minutes. + /// + [JsonProperty(PropertyName = "duration")] + public string Duration { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/MaintenanceWindows.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/MaintenanceWindows.cs new file mode 100644 index 0000000000000..3b6e2e7fed369 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/MaintenanceWindows.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.Synapse.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Maintenance windows. + /// + [Rest.Serialization.JsonTransformation] + public partial class MaintenanceWindows : ProxyResource + { + /// + /// Initializes a new instance of the MaintenanceWindows class. + /// + public MaintenanceWindows() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MaintenanceWindows 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 MaintenanceWindows(string id = default(string), string name = default(string), string type = default(string), IList timeRanges = default(IList)) + : base(id, name, type) + { + TimeRanges = timeRanges; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "properties.timeRanges")] + public IList TimeRanges { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/RecommendedSensitivityLabelUpdate.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/RecommendedSensitivityLabelUpdate.cs new file mode 100644 index 0000000000000..e23ccf416e852 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/RecommendedSensitivityLabelUpdate.cs @@ -0,0 +1,109 @@ +// +// 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.Synapse.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A recommended sensitivity label update operation. + /// + [Rest.Serialization.JsonTransformation] + public partial class RecommendedSensitivityLabelUpdate : ProxyResource + { + /// + /// Initializes a new instance of the RecommendedSensitivityLabelUpdate + /// class. + /// + public RecommendedSensitivityLabelUpdate() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RecommendedSensitivityLabelUpdate + /// class. + /// + /// Possible values include: 'enable', + /// 'disable' + /// Schema name of the column to update. + /// Table name of the column to update. + /// Column name to update. + /// 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 RecommendedSensitivityLabelUpdate(RecommendedSensitivityLabelUpdateKind op, string schema, string table, string column, string id = default(string), string name = default(string), string type = default(string)) + : base(id, name, type) + { + Op = op; + Schema = schema; + Table = table; + Column = column; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets possible values include: 'enable', 'disable' + /// + [JsonProperty(PropertyName = "properties.op")] + public RecommendedSensitivityLabelUpdateKind Op { get; set; } + + /// + /// Gets or sets schema name of the column to update. + /// + [JsonProperty(PropertyName = "properties.schema")] + public string Schema { get; set; } + + /// + /// Gets or sets table name of the column to update. + /// + [JsonProperty(PropertyName = "properties.table")] + public string Table { get; set; } + + /// + /// Gets or sets column name to update. + /// + [JsonProperty(PropertyName = "properties.column")] + public string Column { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Schema == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Schema"); + } + if (Table == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Table"); + } + if (Column == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Column"); + } + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/RecommendedSensitivityLabelUpdateKind.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/RecommendedSensitivityLabelUpdateKind.cs new file mode 100644 index 0000000000000..349e2a1112edc --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/RecommendedSensitivityLabelUpdateKind.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.Synapse.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for RecommendedSensitivityLabelUpdateKind. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum RecommendedSensitivityLabelUpdateKind + { + [EnumMember(Value = "enable")] + Enable, + [EnumMember(Value = "disable")] + Disable + } + internal static class RecommendedSensitivityLabelUpdateKindEnumExtension + { + internal static string ToSerializedValue(this RecommendedSensitivityLabelUpdateKind? value) + { + return value == null ? null : ((RecommendedSensitivityLabelUpdateKind)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this RecommendedSensitivityLabelUpdateKind value) + { + switch( value ) + { + case RecommendedSensitivityLabelUpdateKind.Enable: + return "enable"; + case RecommendedSensitivityLabelUpdateKind.Disable: + return "disable"; + } + return null; + } + + internal static RecommendedSensitivityLabelUpdateKind? ParseRecommendedSensitivityLabelUpdateKind(this string value) + { + switch( value ) + { + case "enable": + return RecommendedSensitivityLabelUpdateKind.Enable; + case "disable": + return RecommendedSensitivityLabelUpdateKind.Disable; + } + return null; + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/RecommendedSensitivityLabelUpdateList.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/RecommendedSensitivityLabelUpdateList.cs new file mode 100644 index 0000000000000..b9d8f961ffceb --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/RecommendedSensitivityLabelUpdateList.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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A list of recommended sensitivity label update operations. + /// + public partial class RecommendedSensitivityLabelUpdateList + { + /// + /// Initializes a new instance of the + /// RecommendedSensitivityLabelUpdateList class. + /// + public RecommendedSensitivityLabelUpdateList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// RecommendedSensitivityLabelUpdateList class. + /// + public RecommendedSensitivityLabelUpdateList(IList operations = default(IList)) + { + Operations = operations; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "operations")] + public IList Operations { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabel.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabel.cs index f96208c5ea6ad..435afbf1f368f 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabel.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabel.cs @@ -38,6 +38,9 @@ public SensitivityLabel() /// The type of the resource. E.g. /// "Microsoft.Compute/virtualMachines" or /// "Microsoft.Storage/storageAccounts" + /// The schema name. + /// The table name. + /// The column name. /// The label name. /// The label ID. /// The information type. @@ -46,14 +49,22 @@ public SensitivityLabel() /// Applicable for recommended sensitivity label only. Specifies /// whether the sensitivity recommendation on this column is disabled /// (dismissed) or not. - public SensitivityLabel(string id = default(string), string name = default(string), string type = default(string), string labelName = default(string), string labelId = default(string), string informationType = default(string), string informationTypeId = default(string), bool? isDisabled = default(bool?)) + /// Possible values include: 'None', 'Low', + /// 'Medium', 'High', 'Critical' + /// managed by + public SensitivityLabel(string id = default(string), string name = default(string), string type = default(string), string schemaName = default(string), string tableName = default(string), string columnName = default(string), string labelName = default(string), string labelId = default(string), string informationType = default(string), string informationTypeId = default(string), bool? isDisabled = default(bool?), SensitivityLabelRank? rank = default(SensitivityLabelRank?), string managedBy = default(string)) : base(id, name, type) { + SchemaName = schemaName; + TableName = tableName; + ColumnName = columnName; LabelName = labelName; LabelId = labelId; InformationType = informationType; InformationTypeId = informationTypeId; IsDisabled = isDisabled; + Rank = rank; + ManagedBy = managedBy; CustomInit(); } @@ -62,6 +73,24 @@ public SensitivityLabel() /// partial void CustomInit(); + /// + /// Gets the schema name. + /// + [JsonProperty(PropertyName = "properties.schemaName")] + public string SchemaName { get; private set; } + + /// + /// Gets the table name. + /// + [JsonProperty(PropertyName = "properties.tableName")] + public string TableName { get; private set; } + + /// + /// Gets the column name. + /// + [JsonProperty(PropertyName = "properties.columnName")] + public string ColumnName { get; private set; } + /// /// Gets or sets the label name. /// @@ -95,5 +124,18 @@ public SensitivityLabel() [JsonProperty(PropertyName = "properties.isDisabled")] public bool? IsDisabled { get; private set; } + /// + /// Gets or sets possible values include: 'None', 'Low', 'Medium', + /// 'High', 'Critical' + /// + [JsonProperty(PropertyName = "properties.rank")] + public SensitivityLabelRank? Rank { get; set; } + + /// + /// Gets managed by + /// + [JsonProperty(PropertyName = "managedBy")] + public string ManagedBy { get; private set; } + } } diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelRank.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelRank.cs new file mode 100644 index 0000000000000..19cf2b61aa283 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelRank.cs @@ -0,0 +1,78 @@ +// +// 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.Synapse.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for SensitivityLabelRank. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SensitivityLabelRank + { + [EnumMember(Value = "None")] + None, + [EnumMember(Value = "Low")] + Low, + [EnumMember(Value = "Medium")] + Medium, + [EnumMember(Value = "High")] + High, + [EnumMember(Value = "Critical")] + Critical + } + internal static class SensitivityLabelRankEnumExtension + { + internal static string ToSerializedValue(this SensitivityLabelRank? value) + { + return value == null ? null : ((SensitivityLabelRank)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this SensitivityLabelRank value) + { + switch( value ) + { + case SensitivityLabelRank.None: + return "None"; + case SensitivityLabelRank.Low: + return "Low"; + case SensitivityLabelRank.Medium: + return "Medium"; + case SensitivityLabelRank.High: + return "High"; + case SensitivityLabelRank.Critical: + return "Critical"; + } + return null; + } + + internal static SensitivityLabelRank? ParseSensitivityLabelRank(this string value) + { + switch( value ) + { + case "None": + return SensitivityLabelRank.None; + case "Low": + return SensitivityLabelRank.Low; + case "Medium": + return SensitivityLabelRank.Medium; + case "High": + return SensitivityLabelRank.High; + case "Critical": + return SensitivityLabelRank.Critical; + } + return null; + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelUpdate.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelUpdate.cs new file mode 100644 index 0000000000000..85167c5ac7764 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelUpdate.cs @@ -0,0 +1,116 @@ +// +// 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.Synapse.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A sensitivity label update operation. + /// + [Rest.Serialization.JsonTransformation] + public partial class SensitivityLabelUpdate : ProxyResource + { + /// + /// Initializes a new instance of the SensitivityLabelUpdate class. + /// + public SensitivityLabelUpdate() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SensitivityLabelUpdate class. + /// + /// Possible values include: 'set', 'remove' + /// Schema name of the column to update. + /// Table name of the column to update. + /// Column name to update. + /// 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 sensitivity label information to + /// apply on a column. + public SensitivityLabelUpdate(SensitivityLabelUpdateKind op, string schema, string table, string column, string id = default(string), string name = default(string), string type = default(string), SensitivityLabel sensitivityLabel = default(SensitivityLabel)) + : base(id, name, type) + { + Op = op; + Schema = schema; + Table = table; + Column = column; + SensitivityLabel = sensitivityLabel; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets possible values include: 'set', 'remove' + /// + [JsonProperty(PropertyName = "properties.op")] + public SensitivityLabelUpdateKind Op { get; set; } + + /// + /// Gets or sets schema name of the column to update. + /// + [JsonProperty(PropertyName = "properties.schema")] + public string Schema { get; set; } + + /// + /// Gets or sets table name of the column to update. + /// + [JsonProperty(PropertyName = "properties.table")] + public string Table { get; set; } + + /// + /// Gets or sets column name to update. + /// + [JsonProperty(PropertyName = "properties.column")] + public string Column { get; set; } + + /// + /// Gets or sets the sensitivity label information to apply on a + /// column. + /// + [JsonProperty(PropertyName = "properties.sensitivityLabel")] + public SensitivityLabel SensitivityLabel { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Schema == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Schema"); + } + if (Table == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Table"); + } + if (Column == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Column"); + } + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelUpdateKind.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelUpdateKind.cs new file mode 100644 index 0000000000000..614543a4c7627 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelUpdateKind.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.Synapse.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for SensitivityLabelUpdateKind. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SensitivityLabelUpdateKind + { + [EnumMember(Value = "set")] + Set, + [EnumMember(Value = "remove")] + Remove + } + internal static class SensitivityLabelUpdateKindEnumExtension + { + internal static string ToSerializedValue(this SensitivityLabelUpdateKind? value) + { + return value == null ? null : ((SensitivityLabelUpdateKind)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this SensitivityLabelUpdateKind value) + { + switch( value ) + { + case SensitivityLabelUpdateKind.Set: + return "set"; + case SensitivityLabelUpdateKind.Remove: + return "remove"; + } + return null; + } + + internal static SensitivityLabelUpdateKind? ParseSensitivityLabelUpdateKind(this string value) + { + switch( value ) + { + case "set": + return SensitivityLabelUpdateKind.Set; + case "remove": + return SensitivityLabelUpdateKind.Remove; + } + return null; + } + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelUpdateList.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelUpdateList.cs new file mode 100644 index 0000000000000..ab265f2aa7252 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SensitivityLabelUpdateList.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.Synapse.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A list of sensitivity label update operations. + /// + public partial class SensitivityLabelUpdateList + { + /// + /// Initializes a new instance of the SensitivityLabelUpdateList class. + /// + public SensitivityLabelUpdateList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SensitivityLabelUpdateList class. + /// + public SensitivityLabelUpdateList(IList operations = default(IList)) + { + Operations = operations; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "operations")] + public IList Operations { get; set; } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPoolColumn.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPoolColumn.cs index d6855d12700c6..d27df5410cc67 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPoolColumn.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/SqlPoolColumn.cs @@ -46,10 +46,13 @@ public SqlPoolColumn() /// 'bigint', 'hierarchyid', 'geometry', 'geography', 'varbinary', /// 'varchar', 'binary', 'char', 'timestamp', 'nvarchar', 'nchar', /// 'xml', 'sysname' - public SqlPoolColumn(string id = default(string), string name = default(string), string type = default(string), string columnType = default(string)) + /// Indicates whether column value is computed + /// or not + public SqlPoolColumn(string id = default(string), string name = default(string), string type = default(string), string columnType = default(string), bool? isComputed = default(bool?)) : base(id, name, type) { ColumnType = columnType; + IsComputed = isComputed; CustomInit(); } @@ -70,5 +73,11 @@ public SqlPoolColumn() [JsonProperty(PropertyName = "properties.columnType")] public string ColumnType { get; set; } + /// + /// Gets indicates whether column value is computed or not + /// + [JsonProperty(PropertyName = "properties.isComputed")] + public bool? IsComputed { get; private set; } + } } diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/Workspace.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/Workspace.cs index 957c8e2e343dc..668cc527a3cf5 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/Workspace.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/Workspace.cs @@ -73,8 +73,9 @@ public Workspace() /// Git integration /// settings /// Purview Configuration + /// The ADLA resource ID. /// Identity of the workspace - public Workspace(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), DataLakeStorageAccountDetails defaultDataLakeStorage = default(DataLakeStorageAccountDetails), string sqlAdministratorLoginPassword = default(string), string managedResourceGroupName = default(string), string provisioningState = default(string), string sqlAdministratorLogin = default(string), VirtualNetworkProfile virtualNetworkProfile = default(VirtualNetworkProfile), IDictionary connectivityEndpoints = default(IDictionary), string managedVirtualNetwork = default(string), IList privateEndpointConnections = default(IList), EncryptionDetails encryption = default(EncryptionDetails), System.Guid? workspaceUID = default(System.Guid?), IDictionary extraProperties = default(IDictionary), ManagedVirtualNetworkSettings managedVirtualNetworkSettings = default(ManagedVirtualNetworkSettings), WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration = default(WorkspaceRepositoryConfiguration), PurviewConfiguration purviewConfiguration = default(PurviewConfiguration), ManagedIdentity identity = default(ManagedIdentity)) + public Workspace(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), DataLakeStorageAccountDetails defaultDataLakeStorage = default(DataLakeStorageAccountDetails), string sqlAdministratorLoginPassword = default(string), string managedResourceGroupName = default(string), string provisioningState = default(string), string sqlAdministratorLogin = default(string), VirtualNetworkProfile virtualNetworkProfile = default(VirtualNetworkProfile), IDictionary connectivityEndpoints = default(IDictionary), string managedVirtualNetwork = default(string), IList privateEndpointConnections = default(IList), EncryptionDetails encryption = default(EncryptionDetails), System.Guid? workspaceUID = default(System.Guid?), IDictionary extraProperties = default(IDictionary), ManagedVirtualNetworkSettings managedVirtualNetworkSettings = default(ManagedVirtualNetworkSettings), WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration = default(WorkspaceRepositoryConfiguration), PurviewConfiguration purviewConfiguration = default(PurviewConfiguration), string adlaResourceId = default(string), ManagedIdentity identity = default(ManagedIdentity)) : base(location, id, name, type, tags) { DefaultDataLakeStorage = defaultDataLakeStorage; @@ -92,6 +93,7 @@ public Workspace() ManagedVirtualNetworkSettings = managedVirtualNetworkSettings; WorkspaceRepositoryConfiguration = workspaceRepositoryConfiguration; PurviewConfiguration = purviewConfiguration; + AdlaResourceId = adlaResourceId; Identity = identity; CustomInit(); } @@ -198,6 +200,12 @@ public Workspace() [JsonProperty(PropertyName = "properties.purviewConfiguration")] public PurviewConfiguration PurviewConfiguration { get; set; } + /// + /// Gets the ADLA resource ID. + /// + [JsonProperty(PropertyName = "properties.adlaResourceId")] + public string AdlaResourceId { get; private set; } + /// /// Gets or sets identity of the workspace /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/WorkspaceRepositoryConfiguration.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/WorkspaceRepositoryConfiguration.cs index ab97da560b461..1e5aafbeb51b6 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/WorkspaceRepositoryConfiguration.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/Models/WorkspaceRepositoryConfiguration.cs @@ -42,7 +42,9 @@ public WorkspaceRepositoryConfiguration() /// Collaboration branch /// Root folder to use in the /// repository - public WorkspaceRepositoryConfiguration(string type = default(string), string hostName = default(string), string accountName = default(string), string projectName = default(string), string repositoryName = default(string), string collaborationBranch = default(string), string rootFolder = default(string)) + /// The last commit ID + /// The VSTS tenant ID + public WorkspaceRepositoryConfiguration(string type = default(string), string hostName = default(string), string accountName = default(string), string projectName = default(string), string repositoryName = default(string), string collaborationBranch = default(string), string rootFolder = default(string), string lastCommitId = default(string), System.Guid? tenantId = default(System.Guid?)) { Type = type; HostName = hostName; @@ -51,6 +53,8 @@ public WorkspaceRepositoryConfiguration() RepositoryName = repositoryName; CollaborationBranch = collaborationBranch; RootFolder = rootFolder; + LastCommitId = lastCommitId; + TenantId = tenantId; CustomInit(); } @@ -103,5 +107,17 @@ public WorkspaceRepositoryConfiguration() [JsonProperty(PropertyName = "rootFolder")] public string RootFolder { get; set; } + /// + /// Gets or sets the last commit ID + /// + [JsonProperty(PropertyName = "lastCommitId")] + public string LastCommitId { get; set; } + + /// + /// Gets or sets the VSTS tenant ID + /// + [JsonProperty(PropertyName = "tenantId")] + public System.Guid? TenantId { get; set; } + } } diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateLinkHubPrivateLinkResourcesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateLinkHubPrivateLinkResourcesOperations.cs new file mode 100644 index 0000000000000..c03b4d837c15d --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateLinkHubPrivateLinkResourcesOperations.cs @@ -0,0 +1,680 @@ +// +// 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.Synapse +{ + 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; + + /// + /// PrivateLinkHubPrivateLinkResourcesOperations operations. + /// + internal partial class PrivateLinkHubPrivateLinkResourcesOperations : IServiceOperations, IPrivateLinkHubPrivateLinkResourcesOperations + { + /// + /// Initializes a new instance of the PrivateLinkHubPrivateLinkResourcesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal PrivateLinkHubPrivateLinkResourcesOperations(SynapseManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SynapseManagementClient + /// + public SynapseManagementClient Client { get; private set; } + + /// + /// Private Link Resources + /// + /// + /// Get all private link resources for a private link hub + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the private link hub + /// + /// + /// 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 privateLinkHubName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (privateLinkHubName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateLinkHubName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("privateLinkHubName", privateLinkHubName); + 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.Synapse/privateLinkHubs/{privateLinkHubName}/privateLinkResources").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{privateLinkHubName}", System.Uri.EscapeDataString(privateLinkHubName)); + 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 ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorContract _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; + } + + /// + /// Get Private Link Hub Private Link Resource + /// + /// + /// Get private link resource in private link hub + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the private link hub + /// + /// + /// The name of the private link resource + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string privateLinkHubName, string privateLinkResourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (privateLinkHubName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateLinkHubName"); + } + if (privateLinkResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateLinkResourceName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("privateLinkHubName", privateLinkHubName); + tracingParameters.Add("privateLinkResourceName", privateLinkResourceName); + 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.Synapse/privateLinkHubs/{privateLinkHubName}/privateLinkResources/{privateLinkResourceName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{privateLinkHubName}", System.Uri.EscapeDataString(privateLinkHubName)); + _url = _url.Replace("{privateLinkResourceName}", System.Uri.EscapeDataString(privateLinkResourceName)); + 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 ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorContract _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; + } + + /// + /// Private Link Resources + /// + /// + /// Get all private link resources for a private link hub + /// + /// + /// 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 ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorContract _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/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateLinkHubPrivateLinkResourcesOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateLinkHubPrivateLinkResourcesOperationsExtensions.cs new file mode 100644 index 0000000000000..506c8c1fa5535 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/PrivateLinkHubPrivateLinkResourcesOperationsExtensions.cs @@ -0,0 +1,163 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for PrivateLinkHubPrivateLinkResourcesOperations. + /// + public static partial class PrivateLinkHubPrivateLinkResourcesOperationsExtensions + { + /// + /// Private Link Resources + /// + /// + /// Get all private link resources for a private link hub + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the private link hub + /// + public static IPage List(this IPrivateLinkHubPrivateLinkResourcesOperations operations, string resourceGroupName, string privateLinkHubName) + { + return operations.ListAsync(resourceGroupName, privateLinkHubName).GetAwaiter().GetResult(); + } + + /// + /// Private Link Resources + /// + /// + /// Get all private link resources for a private link hub + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the private link hub + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IPrivateLinkHubPrivateLinkResourcesOperations operations, string resourceGroupName, string privateLinkHubName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, privateLinkHubName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get Private Link Hub Private Link Resource + /// + /// + /// Get private link resource in private link hub + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the private link hub + /// + /// + /// The name of the private link resource + /// + public static PrivateLinkResource Get(this IPrivateLinkHubPrivateLinkResourcesOperations operations, string resourceGroupName, string privateLinkHubName, string privateLinkResourceName) + { + return operations.GetAsync(resourceGroupName, privateLinkHubName, privateLinkResourceName).GetAwaiter().GetResult(); + } + + /// + /// Get Private Link Hub Private Link Resource + /// + /// + /// Get private link resource in private link hub + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the private link hub + /// + /// + /// The name of the private link resource + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IPrivateLinkHubPrivateLinkResourcesOperations operations, string resourceGroupName, string privateLinkHubName, string privateLinkResourceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, privateLinkHubName, privateLinkResourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Private Link Resources + /// + /// + /// Get all private link resources for a private link hub + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IPrivateLinkHubPrivateLinkResourcesOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Private Link Resources + /// + /// + /// Get all private link resources for a private link hub + /// + /// + /// 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 IPrivateLinkHubPrivateLinkResourcesOperations 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/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SdkInfo_SynapseManagementClient.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SdkInfo_SynapseManagementClient.cs index 325b80826114d..e3106841becf3 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SdkInfo_SynapseManagementClient.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SdkInfo_SynapseManagementClient.cs @@ -37,6 +37,7 @@ public static IEnumerable> ApiInfo_SynapseManageme new Tuple("Synapse", "Operations", "2019-06-01-preview"), new Tuple("Synapse", "PrivateEndpointConnections", "2019-06-01-preview"), new Tuple("Synapse", "PrivateEndpointConnectionsPrivateLinkHub", "2019-06-01-preview"), + new Tuple("Synapse", "PrivateLinkHubPrivateLinkResources", "2019-06-01-preview"), new Tuple("Synapse", "PrivateLinkHubs", "2019-06-01-preview"), new Tuple("Synapse", "PrivateLinkResources", "2019-06-01-preview"), new Tuple("Synapse", "RestorableDroppedSqlPools", "2019-06-01-preview"), @@ -45,9 +46,12 @@ public static IEnumerable> ApiInfo_SynapseManageme new Tuple("Synapse", "SqlPoolConnectionPolicies", "2019-06-01-preview"), new Tuple("Synapse", "SqlPoolDataWarehouseUserActivities", "2019-06-01-preview"), new Tuple("Synapse", "SqlPoolGeoBackupPolicies", "2019-06-01-preview"), + new Tuple("Synapse", "SqlPoolMaintenanceWindowOptions", "2019-06-01-preview"), + new Tuple("Synapse", "SqlPoolMaintenanceWindows", "2019-06-01-preview"), new Tuple("Synapse", "SqlPoolMetadataSyncConfigs", "2019-06-01-preview"), new Tuple("Synapse", "SqlPoolOperationResults", "2019-06-01-preview"), new Tuple("Synapse", "SqlPoolOperations", "2019-06-01-preview"), + new Tuple("Synapse", "SqlPoolRecommendedSensitivityLabels", "2019-06-01-preview"), new Tuple("Synapse", "SqlPoolReplicationLinks", "2019-06-01-preview"), new Tuple("Synapse", "SqlPoolRestorePoints", "2019-06-01-preview"), new Tuple("Synapse", "SqlPoolSchemas", "2019-06-01-preview"), @@ -77,15 +81,5 @@ public static IEnumerable> ApiInfo_SynapseManageme }.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/synapse/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=D:\\code\\AzureSDK\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "dbb0a6fd623196f0db6b461b0f3f54e284e3a9e4"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SdkInfo_SynapseSqlVManagementClient.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SdkInfo_SynapseSqlVManagementClient.cs index 55467ab958c7f..0ca731a1cbdb0 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SdkInfo_SynapseSqlVManagementClient.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SdkInfo_SynapseSqlVManagementClient.cs @@ -27,4 +27,3 @@ public static IEnumerable> ApiInfo_SynapseSqlVMana } } } - diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolGeoBackupPoliciesOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolGeoBackupPoliciesOperations.cs index 441e1b922063f..e46aec9e192c3 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolGeoBackupPoliciesOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolGeoBackupPoliciesOperations.cs @@ -282,6 +282,274 @@ internal SqlPoolGeoBackupPoliciesOperations(SynapseManagementClient client) return _result; } + /// + /// Updates a SQL Pool geo backup policy. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// The required parameters for creating or updating the geo backup policy. + /// + /// + /// 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 workspaceName, string sqlPoolName, GeoBackupPolicy parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (sqlPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sqlPoolName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + string geoBackupPolicyName = "Default"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("sqlPoolName", sqlPoolName); + tracingParameters.Add("geoBackupPolicyName", geoBackupPolicyName); + 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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/geoBackupPolicies/{geoBackupPolicyName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{sqlPoolName}", System.Uri.EscapeDataString(sqlPoolName)); + _url = _url.Replace("{geoBackupPolicyName}", System.Uri.EscapeDataString(geoBackupPolicyName)); + 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 ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorContract _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; + } + /// /// Get a SQL pool geo backup policy /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolGeoBackupPoliciesOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolGeoBackupPoliciesOperationsExtensions.cs index 26d3f27580088..0222a006120ed 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolGeoBackupPoliciesOperationsExtensions.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolGeoBackupPoliciesOperationsExtensions.cs @@ -75,6 +75,58 @@ public static IEnumerable List(this ISqlPoolGeoBackupPoliciesOp } } + /// + /// Updates a SQL Pool geo backup policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// The required parameters for creating or updating the geo backup policy. + /// + public static GeoBackupPolicy CreateOrUpdate(this ISqlPoolGeoBackupPoliciesOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, GeoBackupPolicy parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, workspaceName, sqlPoolName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates a SQL Pool geo backup policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// The required parameters for creating or updating the geo backup policy. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this ISqlPoolGeoBackupPoliciesOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, GeoBackupPolicy parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Get a SQL pool geo backup policy /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowOptionsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowOptionsOperations.cs new file mode 100644 index 0000000000000..f961829a67309 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowOptionsOperations.cs @@ -0,0 +1,303 @@ +// +// 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.Synapse +{ + 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; + + /// + /// SqlPoolMaintenanceWindowOptionsOperations operations. + /// + internal partial class SqlPoolMaintenanceWindowOptionsOperations : IServiceOperations, ISqlPoolMaintenanceWindowOptionsOperations + { + /// + /// Initializes a new instance of the SqlPoolMaintenanceWindowOptionsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal SqlPoolMaintenanceWindowOptionsOperations(SynapseManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SynapseManagementClient + /// + public SynapseManagementClient Client { get; private set; } + + /// + /// SQL pool's available maintenance windows. + /// + /// + /// Get list of SQL pool's available maintenance windows. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window options name. + /// + /// + /// 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 workspaceName, string sqlPoolName, string maintenanceWindowOptionsName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (sqlPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sqlPoolName"); + } + if (maintenanceWindowOptionsName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "maintenanceWindowOptionsName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("sqlPoolName", sqlPoolName); + tracingParameters.Add("maintenanceWindowOptionsName", maintenanceWindowOptionsName); + 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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/maintenanceWindowOptions/current").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{sqlPoolName}", System.Uri.EscapeDataString(sqlPoolName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (maintenanceWindowOptionsName != null) + { + _queryParameters.Add(string.Format("maintenanceWindowOptionsName={0}", System.Uri.EscapeDataString(maintenanceWindowOptionsName))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowOptionsOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowOptionsOperationsExtensions.cs new file mode 100644 index 0000000000000..fe79f67be898d --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowOptionsOperationsExtensions.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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for SqlPoolMaintenanceWindowOptionsOperations. + /// + public static partial class SqlPoolMaintenanceWindowOptionsOperationsExtensions + { + /// + /// SQL pool's available maintenance windows. + /// + /// + /// Get list of SQL pool's available maintenance windows. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window options name. + /// + public static MaintenanceWindowOptions Get(this ISqlPoolMaintenanceWindowOptionsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, string maintenanceWindowOptionsName) + { + return operations.GetAsync(resourceGroupName, workspaceName, sqlPoolName, maintenanceWindowOptionsName).GetAwaiter().GetResult(); + } + + /// + /// SQL pool's available maintenance windows. + /// + /// + /// Get list of SQL pool's available maintenance windows. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window options name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this ISqlPoolMaintenanceWindowOptionsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, string maintenanceWindowOptionsName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, maintenanceWindowOptionsName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowsOperations.cs new file mode 100644 index 0000000000000..1816dd9eb1473 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowsOperations.cs @@ -0,0 +1,541 @@ +// +// 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.Synapse +{ + 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; + + /// + /// SqlPoolMaintenanceWindowsOperations operations. + /// + internal partial class SqlPoolMaintenanceWindowsOperations : IServiceOperations, ISqlPoolMaintenanceWindowsOperations + { + /// + /// Initializes a new instance of the SqlPoolMaintenanceWindowsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal SqlPoolMaintenanceWindowsOperations(SynapseManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SynapseManagementClient + /// + public SynapseManagementClient Client { get; private set; } + + /// + /// Get a SQL pool's Maintenance Windows. + /// + /// + /// Get a SQL pool's Maintenance Windows. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window name. + /// + /// + /// 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 workspaceName, string sqlPoolName, string maintenanceWindowName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (sqlPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sqlPoolName"); + } + if (maintenanceWindowName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "maintenanceWindowName"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("sqlPoolName", sqlPoolName); + tracingParameters.Add("maintenanceWindowName", maintenanceWindowName); + 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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/maintenancewindows/current").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{sqlPoolName}", System.Uri.EscapeDataString(sqlPoolName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (maintenanceWindowName != null) + { + _queryParameters.Add(string.Format("maintenanceWindowName={0}", System.Uri.EscapeDataString(maintenanceWindowName))); + } + 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 ErrorContractException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorContract _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; + } + + /// + /// Creates or updates a Sql pool's maintenance windows settings. + /// + /// + /// Creates or updates a Sql pool's maintenance windows settings. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window name. + /// + /// + /// The required parameters for creating or updating Maintenance Windows + /// settings + /// + /// + /// 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 CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, string maintenanceWindowName, MaintenanceWindows parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (sqlPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sqlPoolName"); + } + if (maintenanceWindowName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "maintenanceWindowName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("sqlPoolName", sqlPoolName); + tracingParameters.Add("maintenanceWindowName", maintenanceWindowName); + 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.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/maintenancewindows/current").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{sqlPoolName}", System.Uri.EscapeDataString(sqlPoolName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (maintenanceWindowName != null) + { + _queryParameters.Add(string.Format("maintenanceWindowName={0}", System.Uri.EscapeDataString(maintenanceWindowName))); + } + 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) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowsOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowsOperationsExtensions.cs new file mode 100644 index 0000000000000..408208734f799 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolMaintenanceWindowsOperationsExtensions.cs @@ -0,0 +1,146 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for SqlPoolMaintenanceWindowsOperations. + /// + public static partial class SqlPoolMaintenanceWindowsOperationsExtensions + { + /// + /// Get a SQL pool's Maintenance Windows. + /// + /// + /// Get a SQL pool's Maintenance Windows. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window name. + /// + public static MaintenanceWindows Get(this ISqlPoolMaintenanceWindowsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, string maintenanceWindowName) + { + return operations.GetAsync(resourceGroupName, workspaceName, sqlPoolName, maintenanceWindowName).GetAwaiter().GetResult(); + } + + /// + /// Get a SQL pool's Maintenance Windows. + /// + /// + /// Get a SQL pool's Maintenance Windows. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window name. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this ISqlPoolMaintenanceWindowsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, string maintenanceWindowName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, maintenanceWindowName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a Sql pool's maintenance windows settings. + /// + /// + /// Creates or updates a Sql pool's maintenance windows settings. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window name. + /// + /// + /// The required parameters for creating or updating Maintenance Windows + /// settings + /// + public static void CreateOrUpdate(this ISqlPoolMaintenanceWindowsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, string maintenanceWindowName, MaintenanceWindows parameters) + { + operations.CreateOrUpdateAsync(resourceGroupName, workspaceName, sqlPoolName, maintenanceWindowName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a Sql pool's maintenance windows settings. + /// + /// + /// Creates or updates a Sql pool's maintenance windows settings. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// Maintenance window name. + /// + /// + /// The required parameters for creating or updating Maintenance Windows + /// settings + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this ISqlPoolMaintenanceWindowsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, string maintenanceWindowName, MaintenanceWindows parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, maintenanceWindowName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolRecommendedSensitivityLabelsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolRecommendedSensitivityLabelsOperations.cs new file mode 100644 index 0000000000000..efed08972f4d5 --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolRecommendedSensitivityLabelsOperations.cs @@ -0,0 +1,281 @@ +// +// 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.Synapse +{ + 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; + + /// + /// SqlPoolRecommendedSensitivityLabelsOperations operations. + /// + internal partial class SqlPoolRecommendedSensitivityLabelsOperations : IServiceOperations, ISqlPoolRecommendedSensitivityLabelsOperations + { + /// + /// Initializes a new instance of the SqlPoolRecommendedSensitivityLabelsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal SqlPoolRecommendedSensitivityLabelsOperations(SynapseManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the SynapseManagementClient + /// + public SynapseManagementClient Client { get; private set; } + + /// + /// Update recommended sensitivity labels states of a given SQL Pool using an + /// operations batch. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, RecommendedSensitivityLabelUpdateList parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (sqlPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sqlPoolName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("sqlPoolName", sqlPoolName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/recommendedSensitivityLabels").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{sqlPoolName}", System.Uri.EscapeDataString(sqlPoolName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolRecommendedSensitivityLabelsOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolRecommendedSensitivityLabelsOperationsExtensions.cs new file mode 100644 index 0000000000000..e9e04eaf22b3a --- /dev/null +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolRecommendedSensitivityLabelsOperationsExtensions.cs @@ -0,0 +1,74 @@ +// +// 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.Synapse +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for SqlPoolRecommendedSensitivityLabelsOperations. + /// + public static partial class SqlPoolRecommendedSensitivityLabelsOperationsExtensions + { + /// + /// Update recommended sensitivity labels states of a given SQL Pool using an + /// operations batch. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// + public static void Update(this ISqlPoolRecommendedSensitivityLabelsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, RecommendedSensitivityLabelUpdateList parameters) + { + operations.UpdateAsync(resourceGroupName, workspaceName, sqlPoolName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Update recommended sensitivity labels states of a given SQL Pool using an + /// operations batch. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this ISqlPoolRecommendedSensitivityLabelsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, RecommendedSensitivityLabelUpdateList parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolSensitivityLabelsOperations.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolSensitivityLabelsOperations.cs index d04ff4bf2a92d..c4026471f6002 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolSensitivityLabelsOperations.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolSensitivityLabelsOperations.cs @@ -295,6 +295,232 @@ internal SqlPoolSensitivityLabelsOperations(SynapseManagementClient client) return _result; } + /// + /// Update sensitivity labels of a given SQL Pool using an operations batch. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// + /// + /// 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 UpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string sqlPoolName, SensitivityLabelUpdateList parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (workspaceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName"); + } + if (sqlPoolName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sqlPoolName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("workspaceName", workspaceName); + tracingParameters.Add("sqlPoolName", sqlPoolName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/currentSensitivityLabels").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName)); + _url = _url.Replace("{sqlPoolName}", System.Uri.EscapeDataString(sqlPoolName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + /// /// Gets sensitivity labels of a given SQL pool /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolSensitivityLabelsOperationsExtensions.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolSensitivityLabelsOperationsExtensions.cs index 3a49a32095d81..7337bd4e16de4 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolSensitivityLabelsOperationsExtensions.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SqlPoolSensitivityLabelsOperationsExtensions.cs @@ -80,6 +80,53 @@ public static partial class SqlPoolSensitivityLabelsOperationsExtensions } } + /// + /// Update sensitivity labels of a given SQL Pool using an operations batch. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// + public static void Update(this ISqlPoolSensitivityLabelsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, SensitivityLabelUpdateList parameters) + { + operations.UpdateAsync(resourceGroupName, workspaceName, sqlPoolName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Update sensitivity labels of a given SQL Pool using an operations batch. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the workspace + /// + /// + /// SQL pool name + /// + /// + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this ISqlPoolSensitivityLabelsOperations operations, string resourceGroupName, string workspaceName, string sqlPoolName, SensitivityLabelUpdateList parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, sqlPoolName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// /// Gets sensitivity labels of a given SQL pool /// diff --git a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SynapseManagementClient.cs b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SynapseManagementClient.cs index 02a863ae3bbfd..243d5c496d306 100644 --- a/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SynapseManagementClient.cs +++ b/sdk/synapse/Microsoft.Azure.Management.Synapse/src/Generated/SynapseManagementClient.cs @@ -124,6 +124,16 @@ public partial class SynapseManagementClient : ServiceClient public virtual ISqlPoolReplicationLinksOperations SqlPoolReplicationLinks { get; private set; } + /// + /// Gets the ISqlPoolMaintenanceWindowsOperations. + /// + public virtual ISqlPoolMaintenanceWindowsOperations SqlPoolMaintenanceWindows { get; private set; } + + /// + /// Gets the ISqlPoolMaintenanceWindowOptionsOperations. + /// + public virtual ISqlPoolMaintenanceWindowOptionsOperations SqlPoolMaintenanceWindowOptions { get; private set; } + /// /// Gets the ISqlPoolTransparentDataEncryptionsOperations. /// @@ -149,6 +159,11 @@ public partial class SynapseManagementClient : ServiceClient public virtual ISqlPoolSensitivityLabelsOperations SqlPoolSensitivityLabels { get; private set; } + /// + /// Gets the ISqlPoolRecommendedSensitivityLabelsOperations. + /// + public virtual ISqlPoolRecommendedSensitivityLabelsOperations SqlPoolRecommendedSensitivityLabels { get; private set; } + /// /// Gets the ISqlPoolSchemasOperations. /// @@ -294,6 +309,11 @@ public partial class SynapseManagementClient : ServiceClient public virtual IPrivateLinkResourcesOperations PrivateLinkResources { get; private set; } + /// + /// Gets the IPrivateLinkHubPrivateLinkResourcesOperations. + /// + public virtual IPrivateLinkHubPrivateLinkResourcesOperations PrivateLinkHubPrivateLinkResources { get; private set; } + /// /// Gets the IPrivateEndpointConnectionsOperations. /// @@ -595,11 +615,14 @@ private void Initialize() SqlPoolDataWarehouseUserActivities = new SqlPoolDataWarehouseUserActivitiesOperations(this); SqlPoolRestorePoints = new SqlPoolRestorePointsOperations(this); SqlPoolReplicationLinks = new SqlPoolReplicationLinksOperations(this); + SqlPoolMaintenanceWindows = new SqlPoolMaintenanceWindowsOperations(this); + SqlPoolMaintenanceWindowOptions = new SqlPoolMaintenanceWindowOptionsOperations(this); SqlPoolTransparentDataEncryptions = new SqlPoolTransparentDataEncryptionsOperations(this); SqlPoolBlobAuditingPolicies = new SqlPoolBlobAuditingPoliciesOperations(this); SqlPoolOperations = new SqlPoolOperations(this); SqlPoolUsages = new SqlPoolUsagesOperations(this); SqlPoolSensitivityLabels = new SqlPoolSensitivityLabelsOperations(this); + SqlPoolRecommendedSensitivityLabels = new SqlPoolRecommendedSensitivityLabelsOperations(this); SqlPoolSchemas = new SqlPoolSchemasOperations(this); SqlPoolTables = new SqlPoolTablesOperations(this); SqlPoolTableColumns = new SqlPoolTableColumnsOperations(this); @@ -629,6 +652,7 @@ private void Initialize() IntegrationRuntimeMonitoringData = new IntegrationRuntimeMonitoringDataOperations(this); IntegrationRuntimeStatus = new IntegrationRuntimeStatusOperations(this); PrivateLinkResources = new PrivateLinkResourcesOperations(this); + PrivateLinkHubPrivateLinkResources = new PrivateLinkHubPrivateLinkResourcesOperations(this); PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this); PrivateLinkHubs = new PrivateLinkHubsOperations(this); PrivateEndpointConnectionsPrivateLinkHub = new PrivateEndpointConnectionsPrivateLinkHubOperations(this);