From 818980d123103a73d2652f8d8e6207489f23ce26 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 3 Dec 2020 03:15:49 +0000 Subject: [PATCH] CodeGen from PR 11638 in Azure/azure-rest-api-specs Fix Analysis Services for Swagger Completeness (#11638) * Fix Analysis Services for Swagger Completeness * Fix for lintdiff issues * Change schema to error * Default schema change * Adding title and description * Add separator * Some changes to address R4018 * Fix parameter * Move parameter * Remove a parameter * Fix quotes bug * Add required parameters to address R4018 * More updates to Operations API response schema * Cleaner schema change following the example schema under R4018 * Fix for prettier tool --- .../AnalysisServicesManagementClient.cs | 51 +++++++++++++++++-- .../IAnalysisServicesManagementClient.cs | 11 ++-- .../src/Generated/IServersOperations.cs | 4 +- .../CheckServerNameAvailabilityResult.cs | 2 +- .../Generated/Models/IPv4FirewallSettings.cs | 8 +-- .../SdkInfo_AzureAnalysisServices.cs | 35 ++++++++----- .../src/Generated/ServersOperations.cs | 4 +- .../Generated/ServersOperationsExtensions.cs | 8 +-- 8 files changed, 87 insertions(+), 36 deletions(-) diff --git a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/AnalysisServicesManagementClient.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/AnalysisServicesManagementClient.cs index bca2e67995503..d7a3edcea80f6 100644 --- a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/AnalysisServicesManagementClient.cs +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/AnalysisServicesManagementClient.cs @@ -60,19 +60,20 @@ public partial class AnalysisServicesManagementClient : ServiceClient - /// Gets or sets the preferred language for the response. + /// The preferred language for the response. /// public string AcceptLanguage { get; set; } /// - /// Gets or sets the retry timeout in seconds for Long Running Operations. - /// Default value is 30. + /// The retry timeout in seconds for Long Running Operations. Default value is + /// 30. /// public int? LongRunningOperationRetryTimeout { get; set; } /// - /// When set to true a unique x-ms-client-request-id value is generated and - /// included in each request. Default is true. + /// Whether a unique x-ms-client-request-id should be generated. When set to + /// true a unique x-ms-client-request-id value is generated and included in + /// each request. Default is true. /// public bool? GenerateClientRequestId { get; set; } @@ -86,6 +87,19 @@ public partial class AnalysisServicesManagementClient : ServiceClient public virtual IOperations Operations { get; private set; } + /// + /// Initializes a new instance of the AnalysisServicesManagementClient class. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling AnalysisServicesManagementClient.Dispose(). False: will not dispose provided httpClient + protected AnalysisServicesManagementClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + { + Initialize(); + } + /// /// Initializes a new instance of the AnalysisServicesManagementClient class. /// @@ -181,6 +195,33 @@ public AnalysisServicesManagementClient(ServiceClientCredentials credentials, pa } } + /// + /// Initializes a new instance of the AnalysisServicesManagementClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling AnalysisServicesManagementClient.Dispose(). False: will not dispose provided httpClient + /// + /// Thrown when a required parameter is null + /// + public AnalysisServicesManagementClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + /// /// Initializes a new instance of the AnalysisServicesManagementClient class. /// diff --git a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/IAnalysisServicesManagementClient.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/IAnalysisServicesManagementClient.cs index 4d4f949fee6c8..fc49105b9d300 100644 --- a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/IAnalysisServicesManagementClient.cs +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/IAnalysisServicesManagementClient.cs @@ -54,19 +54,20 @@ public partial interface IAnalysisServicesManagementClient : System.IDisposable string ApiVersion { get; } /// - /// Gets or sets the preferred language for the response. + /// The preferred language for the response. /// string AcceptLanguage { get; set; } /// - /// Gets or sets the retry timeout in seconds for Long Running - /// Operations. Default value is 30. + /// The retry timeout in seconds for Long Running Operations. Default + /// value is 30. /// int? LongRunningOperationRetryTimeout { get; set; } /// - /// When set to true a unique x-ms-client-request-id value is generated - /// and included in each request. Default is true. + /// Whether a unique x-ms-client-request-id should be generated. When + /// set to true a unique x-ms-client-request-id value is generated and + /// included in each request. Default is true. /// bool? GenerateClientRequestId { get; set; } diff --git a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/IServersOperations.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/IServersOperations.cs index b63cb2d1bad56..89d23d9bc4c34 100644 --- a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/IServersOperations.cs +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/IServersOperations.cs @@ -143,7 +143,7 @@ public partial interface IServersOperations /// Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, AnalysisServicesServerUpdateParameters serverUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Supends operation of the specified Analysis Services server + /// Suspends operation of the specified Analysis Services server /// instance. /// /// @@ -503,7 +503,7 @@ public partial interface IServersOperations /// Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, AnalysisServicesServerUpdateParameters serverUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Supends operation of the specified Analysis Services server + /// Suspends operation of the specified Analysis Services server /// instance. /// /// diff --git a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/CheckServerNameAvailabilityResult.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/CheckServerNameAvailabilityResult.cs index 974d9c83ee5d2..5b4f7da40b0c5 100644 --- a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/CheckServerNameAvailabilityResult.cs +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/CheckServerNameAvailabilityResult.cs @@ -14,7 +14,7 @@ namespace Microsoft.Azure.Management.Analysis.Models using System.Linq; /// - /// The checking result of server name availibility. + /// The checking result of server name availability. /// public partial class CheckServerNameAvailabilityResult { diff --git a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/IPv4FirewallSettings.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/IPv4FirewallSettings.cs index 7ad47f6cd1232..c232a369da3eb 100644 --- a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/IPv4FirewallSettings.cs +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/IPv4FirewallSettings.cs @@ -32,9 +32,9 @@ public IPv4FirewallSettings() /// Initializes a new instance of the IPv4FirewallSettings class. /// /// An array of firewall rules. - /// The indicator of enableing PBI + /// The indicator of enabling PBI /// service. - public IPv4FirewallSettings(IList firewallRules = default(IList), string enablePowerBIService = default(string)) + public IPv4FirewallSettings(IList firewallRules = default(IList), bool? enablePowerBIService = default(bool?)) { FirewallRules = firewallRules; EnablePowerBIService = enablePowerBIService; @@ -53,10 +53,10 @@ public IPv4FirewallSettings() public IList FirewallRules { get; set; } /// - /// Gets or sets the indicator of enableing PBI service. + /// Gets or sets the indicator of enabling PBI service. /// [JsonProperty(PropertyName = "enablePowerBIService")] - public string EnablePowerBIService { get; set; } + public bool? EnablePowerBIService { get; set; } } } diff --git a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/SdkInfo_AzureAnalysisServices.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/SdkInfo_AzureAnalysisServices.cs index 3cfe06fa79efc..ef5046b7851f0 100644 --- a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/SdkInfo_AzureAnalysisServices.cs +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/SdkInfo_AzureAnalysisServices.cs @@ -1,19 +1,28 @@ -using System; -using System.Collections.Generic; -using System.Linq; +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// -internal static partial class SdkInfo +namespace Microsoft.Azure.Management.Analysis { - public static IEnumerable> ApiInfo_AzureAnalysisServices - { - get - { - return new Tuple[] - { + using System; + using System.Collections.Generic; + using System.Linq; + + internal static partial class SdkInfo + { + public static IEnumerable> ApiInfo_AzureAnalysisServices + { + get + { + return new Tuple[] + { new Tuple("AnalysisServices", "Operations", "2017-08-01"), new Tuple("AnalysisServices", "Servers", "2017-08-01"), - }.AsEnumerable(); - } - } + }.AsEnumerable(); + } + } + } } diff --git a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/ServersOperations.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/ServersOperations.cs index 9eaacc744637c..1fd152e05206e 100644 --- a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/ServersOperations.cs +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/ServersOperations.cs @@ -362,7 +362,7 @@ internal ServersOperations(AnalysisServicesManagementClient client) } /// - /// Supends operation of the specified Analysis Services server instance. + /// Suspends operation of the specified Analysis Services server instance. /// /// /// The name of the Azure Resource group of which a given Analysis Services @@ -2962,7 +2962,7 @@ internal ServersOperations(AnalysisServicesManagementClient client) } /// - /// Supends operation of the specified Analysis Services server instance. + /// Suspends operation of the specified Analysis Services server instance. /// /// /// The name of the Azure Resource group of which a given Analysis Services diff --git a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/ServersOperationsExtensions.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/ServersOperationsExtensions.cs index b2833ce7ac6c0..237055f4071d4 100644 --- a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/ServersOperationsExtensions.cs +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/ServersOperationsExtensions.cs @@ -219,7 +219,7 @@ public static AnalysisServicesServer Update(this IServersOperations operations, } /// - /// Supends operation of the specified Analysis Services server instance. + /// Suspends operation of the specified Analysis Services server instance. /// /// /// The operations group for this extension method. @@ -239,7 +239,7 @@ public static void Suspend(this IServersOperations operations, string resourceGr } /// - /// Supends operation of the specified Analysis Services server instance. + /// Suspends operation of the specified Analysis Services server instance. /// /// /// The operations group for this extension method. @@ -800,7 +800,7 @@ public static AnalysisServicesServer BeginUpdate(this IServersOperations operati } /// - /// Supends operation of the specified Analysis Services server instance. + /// Suspends operation of the specified Analysis Services server instance. /// /// /// The operations group for this extension method. @@ -820,7 +820,7 @@ public static void BeginSuspend(this IServersOperations operations, string resou } /// - /// Supends operation of the specified Analysis Services server instance. + /// Suspends operation of the specified Analysis Services server instance. /// /// /// The operations group for this extension method.