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 bca2e6799550..d7a3edcea80f 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 4d4f949fee6c..fc49105b9d30 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 b63cb2d1bad5..9375a80c582a 100644 --- a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/IServersOperations.cs +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/IServersOperations.cs @@ -41,7 +41,7 @@ public partial interface IServersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -74,7 +74,7 @@ public partial interface IServersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -102,7 +102,7 @@ public partial interface IServersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -132,7 +132,7 @@ public partial interface IServersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -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. /// /// @@ -161,7 +161,7 @@ public partial interface IServersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -187,7 +187,7 @@ public partial interface IServersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -209,7 +209,7 @@ public partial interface IServersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -228,7 +228,7 @@ public partial interface IServersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -247,7 +247,7 @@ public partial interface IServersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -275,7 +275,7 @@ public partial interface IServersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -331,7 +331,7 @@ public partial interface IServersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -354,7 +354,7 @@ public partial interface IServersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -379,7 +379,7 @@ public partial interface IServersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -401,7 +401,7 @@ public partial interface IServersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -434,7 +434,7 @@ public partial interface IServersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -462,7 +462,7 @@ public partial interface IServersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -492,7 +492,7 @@ public partial interface IServersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -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. /// /// @@ -521,7 +521,7 @@ public partial interface IServersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -547,7 +547,7 @@ public partial interface IServersOperations /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// diff --git a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/AnalysisServicesServer.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/AnalysisServicesServer.cs index 4447b622e96b..a8be38982d61 100644 --- a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/AnalysisServicesServer.cs +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/AnalysisServicesServer.cs @@ -63,6 +63,10 @@ public AnalysisServicesServer() /// operations</li></ul>Specifying readOnly when capacity /// is 1 results in error. Possible values include: 'All', /// 'ReadOnly' + /// The managed mode of the server (0 = not + /// managed, 1 = managed). + /// The server monitor mode for AS + /// server /// The current state of Analysis Services /// resource. The state is to indicate more states outside of resource /// provisioning. Possible values include: 'Deleting', 'Succeeded', @@ -76,7 +80,9 @@ public AnalysisServicesServer() /// 'Preparing', 'Scaling' /// The full name of the Analysis Services /// resource. - public AnalysisServicesServer(string location, ResourceSku sku, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), ServerAdministrators asAdministrators = default(ServerAdministrators), string backupBlobContainerUri = default(string), GatewayDetails gatewayDetails = default(GatewayDetails), IPv4FirewallSettings ipV4FirewallSettings = default(IPv4FirewallSettings), ConnectionMode? querypoolConnectionMode = default(ConnectionMode?), string state = default(string), string provisioningState = default(string), string serverFullName = default(string)) + /// The SKU of the Analysis + /// Services resource. + public AnalysisServicesServer(string location, ResourceSku sku, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), ServerAdministrators asAdministrators = default(ServerAdministrators), string backupBlobContainerUri = default(string), GatewayDetails gatewayDetails = default(GatewayDetails), IPv4FirewallSettings ipV4FirewallSettings = default(IPv4FirewallSettings), ConnectionMode? querypoolConnectionMode = default(ConnectionMode?), int? managedMode = default(int?), int? serverMonitorMode = default(int?), string state = default(string), string provisioningState = default(string), string serverFullName = default(string), ResourceSku analysisServicesServerSku = default(ResourceSku)) : base(location, sku, id, name, type, tags) { AsAdministrators = asAdministrators; @@ -84,9 +90,12 @@ public AnalysisServicesServer() GatewayDetails = gatewayDetails; IpV4FirewallSettings = ipV4FirewallSettings; QuerypoolConnectionMode = querypoolConnectionMode; + ManagedMode = managedMode; + ServerMonitorMode = serverMonitorMode; State = state; ProvisioningState = provisioningState; ServerFullName = serverFullName; + AnalysisServicesServerSku = analysisServicesServerSku; CustomInit(); } @@ -133,6 +142,19 @@ public AnalysisServicesServer() [JsonProperty(PropertyName = "properties.querypoolConnectionMode")] public ConnectionMode? QuerypoolConnectionMode { get; set; } + /// + /// Gets or sets the managed mode of the server (0 = not managed, 1 = + /// managed). + /// + [JsonProperty(PropertyName = "properties.managedMode")] + public int? ManagedMode { get; set; } + + /// + /// Gets or sets the server monitor mode for AS server + /// + [JsonProperty(PropertyName = "properties.serverMonitorMode")] + public int? ServerMonitorMode { get; set; } + /// /// Gets the current state of Analysis Services resource. The state is /// to indicate more states outside of resource provisioning. Possible @@ -159,6 +181,12 @@ public AnalysisServicesServer() [JsonProperty(PropertyName = "properties.serverFullName")] public string ServerFullName { get; private set; } + /// + /// Gets or sets the SKU of the Analysis Services resource. + /// + [JsonProperty(PropertyName = "properties.sku")] + public ResourceSku AnalysisServicesServerSku { get; set; } + /// /// Validate the object. /// @@ -168,6 +196,10 @@ public AnalysisServicesServer() public override void Validate() { base.Validate(); + if (AnalysisServicesServerSku != null) + { + AnalysisServicesServerSku.Validate(); + } } } } diff --git a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/AnalysisServicesServerUpdateParameters.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/AnalysisServicesServerUpdateParameters.cs index 7b2ca64dd343..7afe832940fa 100644 --- a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/AnalysisServicesServerUpdateParameters.cs +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/AnalysisServicesServerUpdateParameters.cs @@ -57,7 +57,11 @@ public AnalysisServicesServerUpdateParameters() /// operations</li></ul>Specifying readOnly when capacity /// is 1 results in error. Possible values include: 'All', /// 'ReadOnly' - public AnalysisServicesServerUpdateParameters(ResourceSku sku = default(ResourceSku), IDictionary tags = default(IDictionary), ServerAdministrators asAdministrators = default(ServerAdministrators), string backupBlobContainerUri = default(string), GatewayDetails gatewayDetails = default(GatewayDetails), IPv4FirewallSettings ipV4FirewallSettings = default(IPv4FirewallSettings), ConnectionMode? querypoolConnectionMode = default(ConnectionMode?)) + /// The managed mode of the server (0 = not + /// managed, 1 = managed). + /// The server monitor mode for AS + /// server + public AnalysisServicesServerUpdateParameters(ResourceSku sku = default(ResourceSku), IDictionary tags = default(IDictionary), ServerAdministrators asAdministrators = default(ServerAdministrators), string backupBlobContainerUri = default(string), GatewayDetails gatewayDetails = default(GatewayDetails), IPv4FirewallSettings ipV4FirewallSettings = default(IPv4FirewallSettings), ConnectionMode? querypoolConnectionMode = default(ConnectionMode?), int? managedMode = default(int?), int? serverMonitorMode = default(int?)) { Sku = sku; Tags = tags; @@ -66,6 +70,8 @@ public AnalysisServicesServerUpdateParameters() GatewayDetails = gatewayDetails; IpV4FirewallSettings = ipV4FirewallSettings; QuerypoolConnectionMode = querypoolConnectionMode; + ManagedMode = managedMode; + ServerMonitorMode = serverMonitorMode; CustomInit(); } @@ -124,6 +130,19 @@ public AnalysisServicesServerUpdateParameters() [JsonProperty(PropertyName = "properties.querypoolConnectionMode")] public ConnectionMode? QuerypoolConnectionMode { get; set; } + /// + /// Gets or sets the managed mode of the server (0 = not managed, 1 = + /// managed). + /// + [JsonProperty(PropertyName = "properties.managedMode")] + public int? ManagedMode { get; set; } + + /// + /// Gets or sets the server monitor mode for AS server + /// + [JsonProperty(PropertyName = "properties.serverMonitorMode")] + public int? ServerMonitorMode { get; set; } + /// /// Validate the object. /// 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 974d9c83ee5d..5b4f7da40b0c 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/ErrorAdditionalInfo.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/ErrorAdditionalInfo.cs new file mode 100644 index 000000000000..b1a3dfdd9c25 --- /dev/null +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/ErrorAdditionalInfo.cs @@ -0,0 +1,59 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Analysis.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The resource management error additional info. + /// + public partial class ErrorAdditionalInfo + { + /// + /// Initializes a new instance of the ErrorAdditionalInfo class. + /// + public ErrorAdditionalInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ErrorAdditionalInfo class. + /// + /// The additional info type. + /// The additional info. + public ErrorAdditionalInfo(string type = default(string), object info = default(object)) + { + Type = type; + Info = info; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the additional info type. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets the additional info. + /// + [JsonProperty(PropertyName = "info")] + public object Info { get; private set; } + + } +} diff --git a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/ErrorResponse.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/ErrorResponse.cs index b170beb44f46..f58408b77c9f 100644 --- a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/ErrorResponse.cs +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/ErrorResponse.cs @@ -29,13 +29,10 @@ public ErrorResponse() /// /// Initializes a new instance of the ErrorResponse class. /// - /// Error code - /// Error message indicating why the operation - /// failed. - public ErrorResponse(string code = default(string), string message = default(string)) + /// The error object + public ErrorResponse(GatewayError error = default(GatewayError)) { - Code = code; - Message = message; + Error = error; CustomInit(); } @@ -45,16 +42,10 @@ public ErrorResponse() partial void CustomInit(); /// - /// Gets or sets error code + /// Gets or sets the error object /// - [JsonProperty(PropertyName = "code")] - public string Code { get; set; } - - /// - /// Gets or sets error message indicating why the operation failed. - /// - [JsonProperty(PropertyName = "message")] - public string Message { get; set; } + [JsonProperty(PropertyName = "error")] + public GatewayError Error { get; set; } } } diff --git a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/GatewayError.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/GatewayError.cs index 634842812fc1..fa78691327df 100644 --- a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/GatewayError.cs +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/GatewayError.cs @@ -11,10 +11,12 @@ namespace Microsoft.Azure.Management.Analysis.Models { using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// - /// Detail of gateway errors. + /// The error detail. /// public partial class GatewayError { @@ -29,12 +31,24 @@ public GatewayError() /// /// Initializes a new instance of the GatewayError class. /// - /// Error code of list gateway. - /// Error message of list gateway. - public GatewayError(string code = default(string), string message = default(string)) + /// The error code. + /// The error message. + /// The error target. + /// The error sub code + /// The http status code + /// the timestamp for the error. + /// The error details. + /// The error additional info. + public GatewayError(string code = default(string), string message = default(string), string target = default(string), int? subCode = default(int?), int? httpStatusCode = default(int?), string timeStamp = default(string), IList details = default(IList), IList additionalInfo = default(IList)) { Code = code; Message = message; + Target = target; + SubCode = subCode; + HttpStatusCode = httpStatusCode; + TimeStamp = timeStamp; + Details = details; + AdditionalInfo = additionalInfo; CustomInit(); } @@ -44,16 +58,52 @@ public GatewayError() partial void CustomInit(); /// - /// Gets or sets error code of list gateway. + /// Gets the error code. /// [JsonProperty(PropertyName = "code")] - public string Code { get; set; } + public string Code { get; private set; } /// - /// Gets or sets error message of list gateway. + /// Gets the error message. /// [JsonProperty(PropertyName = "message")] - public string Message { get; set; } + public string Message { get; private set; } + + /// + /// Gets the error target. + /// + [JsonProperty(PropertyName = "target")] + public string Target { get; private set; } + + /// + /// Gets the error sub code + /// + [JsonProperty(PropertyName = "subCode")] + public int? SubCode { get; private set; } + + /// + /// Gets the http status code + /// + [JsonProperty(PropertyName = "httpStatusCode")] + public int? HttpStatusCode { get; private set; } + + /// + /// Gets the timestamp for the error. + /// + [JsonProperty(PropertyName = "timeStamp")] + public string TimeStamp { get; private set; } + + /// + /// Gets the error details. + /// + [JsonProperty(PropertyName = "details")] + public IList Details { get; private set; } + + /// + /// Gets the error additional info. + /// + [JsonProperty(PropertyName = "additionalInfo")] + public IList AdditionalInfo { get; private set; } } } diff --git a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/GatewayListStatusLive.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/GatewayListStatusLive.cs index bf7b178202de..95b61b82db96 100644 --- a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/GatewayListStatusLive.cs +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/GatewayListStatusLive.cs @@ -29,9 +29,9 @@ public GatewayListStatusLive() /// /// Initializes a new instance of the GatewayListStatusLive class. /// - /// Live message of list gateway. Possible values - /// include: 'Live' - public GatewayListStatusLive(Status? status = default(Status?)) + /// Live message of list gateway. Status: 0 - + /// Live + public GatewayListStatusLive(int? status = default(int?)) { Status = status; CustomInit(); @@ -43,11 +43,10 @@ public GatewayListStatusLive() partial void CustomInit(); /// - /// Gets or sets live message of list gateway. Possible values include: - /// 'Live' + /// Gets or sets live message of list gateway. Status: 0 - Live /// [JsonProperty(PropertyName = "status")] - public Status? Status { get; set; } + public int? Status { get; set; } } } 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 7ad47f6cd123..c232a369da3e 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/Models/LogSpecifications.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/LogSpecifications.cs new file mode 100644 index 000000000000..c512add9e2e2 --- /dev/null +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/LogSpecifications.cs @@ -0,0 +1,68 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Analysis.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The log metric specification for exposing performance metrics to + /// shoebox. + /// + public partial class LogSpecifications + { + /// + /// Initializes a new instance of the LogSpecifications class. + /// + public LogSpecifications() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LogSpecifications class. + /// + /// The name of metric. + /// The displayed name of log. + /// The blob duration for the log. + public LogSpecifications(string name = default(string), string displayName = default(string), string blobDuration = default(string)) + { + Name = name; + DisplayName = displayName; + BlobDuration = blobDuration; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the name of metric. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets the displayed name of log. + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; private set; } + + /// + /// Gets the blob duration for the log. + /// + [JsonProperty(PropertyName = "blobDuration")] + public string BlobDuration { get; private set; } + + } +} diff --git a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/MetricDimensions.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/MetricDimensions.cs new file mode 100644 index 000000000000..412e35c4d556 --- /dev/null +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/MetricDimensions.cs @@ -0,0 +1,59 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Analysis.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Metric dimension. + /// + public partial class MetricDimensions + { + /// + /// Initializes a new instance of the MetricDimensions class. + /// + public MetricDimensions() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MetricDimensions class. + /// + /// Dimension name. + /// Dimension display name. + public MetricDimensions(string name = default(string), string displayName = default(string)) + { + Name = name; + DisplayName = displayName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets dimension name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets dimension display name. + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; private set; } + + } +} diff --git a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/MetricSpecifications.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/MetricSpecifications.cs new file mode 100644 index 000000000000..aa4e4c97b602 --- /dev/null +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/MetricSpecifications.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.Analysis.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Available operation metric specification for exposing performance + /// metrics to shoebox. + /// + public partial class MetricSpecifications + { + /// + /// Initializes a new instance of the MetricSpecifications class. + /// + public MetricSpecifications() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MetricSpecifications class. + /// + /// The name of metric. + /// The displayed name of metric. + /// The displayed description of + /// metric. + /// The unit of the metric. + /// The aggregation type of + /// metric. + /// The dimensions of metric. + public MetricSpecifications(string name = default(string), string displayName = default(string), string displayDescription = default(string), string unit = default(string), string aggregationType = default(string), IList dimensions = default(IList)) + { + Name = name; + DisplayName = displayName; + DisplayDescription = displayDescription; + Unit = unit; + AggregationType = aggregationType; + Dimensions = dimensions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the name of metric. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets the displayed name of metric. + /// + [JsonProperty(PropertyName = "displayName")] + public string DisplayName { get; private set; } + + /// + /// Gets the displayed description of metric. + /// + [JsonProperty(PropertyName = "displayDescription")] + public string DisplayDescription { get; private set; } + + /// + /// Gets the unit of the metric. + /// + [JsonProperty(PropertyName = "unit")] + public string Unit { get; private set; } + + /// + /// Gets the aggregation type of metric. + /// + [JsonProperty(PropertyName = "aggregationType")] + public string AggregationType { get; private set; } + + /// + /// Gets the dimensions of metric. + /// + [JsonProperty(PropertyName = "dimensions")] + public IList Dimensions { get; private set; } + + } +} diff --git a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/Operation.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/Operation.cs index 2d59b954bcdd..e59fcd51a8c9 100644 --- a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/Operation.cs +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/Operation.cs @@ -33,10 +33,15 @@ public Operation() /// {provider}/{resource}/{operation}. /// The object that represents the /// operation. - public Operation(string name = default(string), OperationDisplay display = default(OperationDisplay)) + /// The origin + /// Additional properties to expose + /// performance metrics to shoebox. + public Operation(string name = default(string), OperationDisplay display = default(OperationDisplay), string origin = default(string), OperationProperties properties = default(OperationProperties)) { Name = name; Display = display; + Origin = origin; + Properties = properties; CustomInit(); } @@ -57,5 +62,18 @@ public Operation() [JsonProperty(PropertyName = "display")] public OperationDisplay Display { get; set; } + /// + /// Gets the origin + /// + [JsonProperty(PropertyName = "origin")] + public string Origin { get; private set; } + + /// + /// Gets or sets additional properties to expose performance metrics to + /// shoebox. + /// + [JsonProperty(PropertyName = "properties")] + public OperationProperties Properties { get; set; } + } } diff --git a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/OperationDisplay.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/OperationDisplay.cs index d7d8b3e6b635..3d44b3608ade 100644 --- a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/OperationDisplay.cs +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/OperationDisplay.cs @@ -35,11 +35,14 @@ public OperationDisplay() /// performed: UsageDetail, etc. /// Operation type: Read, write, delete, /// etc. - public OperationDisplay(string provider = default(string), string resource = default(string), string operation = default(string)) + /// Description of the operation + /// object. + public OperationDisplay(string provider = default(string), string resource = default(string), string operation = default(string), string description = default(string)) { Provider = provider; Resource = resource; Operation = operation; + Description = description; CustomInit(); } @@ -67,5 +70,11 @@ public OperationDisplay() [JsonProperty(PropertyName = "operation")] public string Operation { get; private set; } + /// + /// Gets description of the operation object. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; private set; } + } } diff --git a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/OperationProperties.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/OperationProperties.cs new file mode 100644 index 000000000000..fff2b9720542 --- /dev/null +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/OperationProperties.cs @@ -0,0 +1,52 @@ +// +// 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.Analysis.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Additional properties to expose performance metrics to shoebox. + /// + public partial class OperationProperties + { + /// + /// Initializes a new instance of the OperationProperties class. + /// + public OperationProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the OperationProperties class. + /// + /// Performance metrics to + /// shoebox. + public OperationProperties(OperationPropertiesServiceSpecification serviceSpecification = default(OperationPropertiesServiceSpecification)) + { + ServiceSpecification = serviceSpecification; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets performance metrics to shoebox. + /// + [JsonProperty(PropertyName = "serviceSpecification")] + public OperationPropertiesServiceSpecification ServiceSpecification { get; set; } + + } +} diff --git a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/OperationPropertiesServiceSpecification.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/OperationPropertiesServiceSpecification.cs new file mode 100644 index 000000000000..6c86840c2992 --- /dev/null +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/OperationPropertiesServiceSpecification.cs @@ -0,0 +1,64 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Analysis.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Performance metrics to shoebox. + /// + public partial class OperationPropertiesServiceSpecification + { + /// + /// Initializes a new instance of the + /// OperationPropertiesServiceSpecification class. + /// + public OperationPropertiesServiceSpecification() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// OperationPropertiesServiceSpecification class. + /// + /// The metric + /// specifications. + /// The log specifications. + public OperationPropertiesServiceSpecification(IList metricSpecifications = default(IList), IList logSpecifications = default(IList)) + { + MetricSpecifications = metricSpecifications; + LogSpecifications = logSpecifications; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the metric specifications. + /// + [JsonProperty(PropertyName = "metricSpecifications")] + public IList MetricSpecifications { get; private set; } + + /// + /// Gets the log specifications. + /// + [JsonProperty(PropertyName = "logSpecifications")] + public IList LogSpecifications { get; private set; } + + } +} diff --git a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/OperationStatus.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/OperationStatus.cs index 0acc588a4c85..a07cc59fe05b 100644 --- a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/OperationStatus.cs +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/OperationStatus.cs @@ -36,7 +36,7 @@ public OperationStatus() /// The status of the operation. /// The error detail of the operation if /// any. - public OperationStatus(string id = default(string), string name = default(string), string startTime = default(string), string endTime = default(string), string status = default(string), ErrorResponse error = default(ErrorResponse)) + public OperationStatus(string id = default(string), string name = default(string), string startTime = default(string), string endTime = default(string), string status = default(string), GatewayError error = default(GatewayError)) { Id = id; Name = name; @@ -86,7 +86,7 @@ public OperationStatus() /// Gets or sets the error detail of the operation if any. /// [JsonProperty(PropertyName = "error")] - public ErrorResponse Error { get; set; } + public GatewayError Error { get; set; } } } diff --git a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/SkuDetailsForExistingResource.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/SkuDetailsForExistingResource.cs index 052c3f959e38..23a619394b6b 100644 --- a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/SkuDetailsForExistingResource.cs +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/SkuDetailsForExistingResource.cs @@ -33,9 +33,11 @@ public SkuDetailsForExistingResource() /// /// The SKU in SKU details for existing /// resources. - public SkuDetailsForExistingResource(ResourceSku sku = default(ResourceSku)) + /// The resource type. + public SkuDetailsForExistingResource(ResourceSku sku = default(ResourceSku), string resourceType = default(string)) { Sku = sku; + ResourceType = resourceType; CustomInit(); } @@ -50,6 +52,12 @@ public SkuDetailsForExistingResource() [JsonProperty(PropertyName = "sku")] public ResourceSku Sku { get; set; } + /// + /// Gets or sets the resource type. + /// + [JsonProperty(PropertyName = "resourceType")] + public string ResourceType { get; set; } + /// /// Validate the object. /// diff --git a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/Status.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/Status.cs deleted file mode 100644 index ec0d75ddc4bd..000000000000 --- a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/Models/Status.cs +++ /dev/null @@ -1,54 +0,0 @@ -// -// 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.Analysis.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for Status. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Status - { - [EnumMember(Value = "Live")] - Live - } - internal static class StatusEnumExtension - { - internal static string ToSerializedValue(this Status? value) - { - return value == null ? null : ((Status)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this Status value) - { - switch( value ) - { - case Status.Live: - return "Live"; - } - return null; - } - - internal static Status? ParseStatus(this string value) - { - switch( value ) - { - case "Live": - return Status.Live; - } - return null; - } - } -} 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 3cfe06fa79ef..ef5046b7851f 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 9eaacc744637..d9e2e0bb8e91 100644 --- a/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/ServersOperations.cs +++ b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/ServersOperations.cs @@ -68,7 +68,7 @@ internal ServersOperations(AnalysisServicesManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -214,14 +214,13 @@ internal ServersOperations(AnalysisServicesManagementClient 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 ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -231,10 +230,6 @@ internal ServersOperations(AnalysisServicesManagementClient 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); @@ -362,7 +357,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 @@ -425,7 +420,7 @@ internal ServersOperations(AnalysisServicesManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -550,14 +545,13 @@ internal ServersOperations(AnalysisServicesManagementClient 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 ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -567,10 +561,6 @@ internal ServersOperations(AnalysisServicesManagementClient 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); @@ -624,7 +614,7 @@ internal ServersOperations(AnalysisServicesManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -728,14 +718,13 @@ internal ServersOperations(AnalysisServicesManagementClient 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 ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -745,10 +734,6 @@ internal ServersOperations(AnalysisServicesManagementClient 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); @@ -802,7 +787,7 @@ internal ServersOperations(AnalysisServicesManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -906,14 +891,13 @@ internal ServersOperations(AnalysisServicesManagementClient 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 ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -923,10 +907,6 @@ internal ServersOperations(AnalysisServicesManagementClient 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); @@ -989,7 +969,7 @@ internal ServersOperations(AnalysisServicesManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1135,14 +1115,13 @@ internal ServersOperations(AnalysisServicesManagementClient 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 ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1152,10 +1131,6 @@ internal ServersOperations(AnalysisServicesManagementClient 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); @@ -1442,7 +1417,7 @@ internal ServersOperations(AnalysisServicesManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1585,14 +1560,13 @@ internal ServersOperations(AnalysisServicesManagementClient 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 ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1602,10 +1576,6 @@ internal ServersOperations(AnalysisServicesManagementClient 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); @@ -1647,7 +1617,7 @@ internal ServersOperations(AnalysisServicesManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1772,14 +1742,13 @@ internal ServersOperations(AnalysisServicesManagementClient 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 ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1789,10 +1758,6 @@ internal ServersOperations(AnalysisServicesManagementClient 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); @@ -1852,7 +1817,7 @@ internal ServersOperations(AnalysisServicesManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -1965,14 +1930,13 @@ internal ServersOperations(AnalysisServicesManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1982,10 +1946,6 @@ internal ServersOperations(AnalysisServicesManagementClient 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); @@ -2027,7 +1987,7 @@ internal ServersOperations(AnalysisServicesManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -2143,14 +2103,13 @@ internal ServersOperations(AnalysisServicesManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -2160,10 +2119,6 @@ internal ServersOperations(AnalysisServicesManagementClient 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); @@ -2248,7 +2203,7 @@ internal ServersOperations(AnalysisServicesManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -2407,16 +2362,15 @@ internal ServersOperations(AnalysisServicesManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201) + if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -2426,10 +2380,6 @@ internal ServersOperations(AnalysisServicesManagementClient 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); @@ -2485,6 +2435,24 @@ internal ServersOperations(AnalysisServicesManagementClient client) throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); } } + // Deserialize Response + if ((int)_statusCode == 202) + { + _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); @@ -2510,7 +2478,7 @@ internal ServersOperations(AnalysisServicesManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -2653,14 +2621,13 @@ internal ServersOperations(AnalysisServicesManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -2670,10 +2637,6 @@ internal ServersOperations(AnalysisServicesManagementClient 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); @@ -2721,7 +2684,7 @@ internal ServersOperations(AnalysisServicesManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -2878,14 +2841,13 @@ internal ServersOperations(AnalysisServicesManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -2895,10 +2857,6 @@ internal ServersOperations(AnalysisServicesManagementClient 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); @@ -2962,7 +2920,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 @@ -2979,7 +2937,7 @@ internal ServersOperations(AnalysisServicesManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -3122,14 +3080,13 @@ internal ServersOperations(AnalysisServicesManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -3139,10 +3096,6 @@ internal ServersOperations(AnalysisServicesManagementClient 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); @@ -3187,7 +3140,7 @@ internal ServersOperations(AnalysisServicesManagementClient client) /// /// The cancellation token. /// - /// + /// /// Thrown when the operation returned an invalid status code /// /// @@ -3330,14 +3283,13 @@ internal ServersOperations(AnalysisServicesManagementClient client) string _responseContent = null; if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(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); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { - ex = new CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -3347,10 +3299,6 @@ internal ServersOperations(AnalysisServicesManagementClient 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/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/ServersOperationsExtensions.cs b/sdk/analysisservices/Microsoft.Azure.Management.AnalysisServices/src/Generated/ServersOperationsExtensions.cs index b2833ce7ac6c..237055f4071d 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.