diff --git a/src/SDKs/OperationalInsights/Management/AzSdk.RP.props b/src/SDKs/OperationalInsights/Management/AzSdk.RP.props
index 39645fa6dc05..84c383eb498a 100644
--- a/src/SDKs/OperationalInsights/Management/AzSdk.RP.props
+++ b/src/SDKs/OperationalInsights/Management/AzSdk.RP.props
@@ -1,7 +1,7 @@
-
+ OperationalInsights_2015-11-01-preview;
$(PackageTags);$(CommonTags);$(AzureApiTag);
\ No newline at end of file
diff --git a/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/DataSourcesOperations.cs b/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/DataSourcesOperations.cs
index 144df1f97ff1..9e683fe44c10 100644
--- a/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/DataSourcesOperations.cs
+++ b/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/DataSourcesOperations.cs
@@ -1,18 +1,32 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.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.OperationalInsights
{
- using System.Linq;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
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;
///
/// DataSourcesOperations operations.
///
- internal partial class DataSourcesOperations : Microsoft.Rest.IServiceOperations, IDataSourcesOperations
+ internal partial class DataSourcesOperations : IServiceOperations, IDataSourcesOperations
{
///
/// Initializes a new instance of the DataSourcesOperations class.
@@ -25,11 +39,11 @@ internal partial class DataSourcesOperations : Microsoft.Rest.IServiceOperations
///
internal DataSourcesOperations(OperationalInsightsManagementClient client)
{
- if (client == null)
+ if (client == null)
{
throw new System.ArgumentNullException("client");
}
- this.Client = client;
+ Client = client;
}
///
@@ -58,109 +72,116 @@ internal DataSourcesOperations(OperationalInsightsManagementClient client)
///
/// 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 System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string dataSourceName, DataSource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string dataSourceName, DataSource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
if (resourceGroupName.Length > 90)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90);
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
}
if (resourceGroupName.Length < 1)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1);
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
}
}
if (workspaceName == null)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workspaceName");
+ throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName");
}
if (dataSourceName == null)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "dataSourceName");
+ throw new ValidationException(ValidationRules.CannotBeNull, "dataSourceName");
}
if (parameters == null)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters");
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
if (parameters != null)
{
parameters.Validate();
}
- if (this.Client.SubscriptionId == null)
+ if (Client.ApiVersion == null)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2015-11-01-preview";
// Tracing
- bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
if (_shouldTrace)
{
- _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
- System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("workspaceName", workspaceName);
tracingParameters.Add("dataSourceName", dataSourceName);
tracingParameters.Add("parameters", parameters);
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters);
}
// Construct URL
- var _baseUrl = this.Client.BaseUri.AbsoluteUri;
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName));
_url = _url.Replace("{dataSourceName}", System.Uri.EscapeDataString(dataSourceName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
- System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
- if (apiVersion != null)
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ _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
- System.Net.Http.HttpRequestMessage _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("PUT");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PUT");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
- if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
{
_httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
}
- if (this.Client.AcceptLanguage != null)
+ if (Client.AcceptLanguage != null)
{
if (_httpRequest.Headers.Contains("accept-language"))
{
_httpRequest.Headers.Remove("accept-language");
}
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -177,56 +198,56 @@ internal DataSourcesOperations(OperationalInsightsManagementClient client)
string _requestContent = null;
if(parameters != null)
{
- _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings);
- _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _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 (this.Client.Credentials != null)
+ if (Client.Credentials != null)
{
cancellationToken.ThrowIfCancellationRequested();
- await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
}
// Send Request
if (_shouldTrace)
{
- Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
}
cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
if (_shouldTrace)
{
- Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
}
- System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
if ((int)_statusCode != 200 && (int)_statusCode != 201)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
- ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ 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)
{
- Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ ServiceClientTracing.Error(_invocationId, ex);
}
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -236,7 +257,7 @@ internal DataSourcesOperations(OperationalInsightsManagementClient client)
throw ex;
}
// Create Result
- var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -249,16 +270,16 @@ internal DataSourcesOperations(OperationalInsightsManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
{
_httpResponse.Dispose();
}
- throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
}
}
// Deserialize Response
@@ -267,21 +288,21 @@ internal DataSourcesOperations(OperationalInsightsManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
{
_httpResponse.Dispose();
}
- throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
}
}
if (_shouldTrace)
{
- Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ ServiceClientTracing.Exit(_invocationId, _result);
}
return _result;
}
@@ -304,97 +325,104 @@ internal DataSourcesOperations(OperationalInsightsManagementClient client)
///
/// 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 System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string dataSourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string dataSourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
if (resourceGroupName.Length > 90)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90);
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
}
if (resourceGroupName.Length < 1)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1);
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
}
}
if (workspaceName == null)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workspaceName");
+ throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName");
}
if (dataSourceName == null)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "dataSourceName");
+ throw new ValidationException(ValidationRules.CannotBeNull, "dataSourceName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
- if (this.Client.SubscriptionId == null)
+ if (Client.SubscriptionId == null)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2015-11-01-preview";
// Tracing
- bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
if (_shouldTrace)
{
- _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
- System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("workspaceName", workspaceName);
tracingParameters.Add("dataSourceName", dataSourceName);
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters);
}
// Construct URL
- var _baseUrl = this.Client.BaseUri.AbsoluteUri;
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName));
_url = _url.Replace("{dataSourceName}", System.Uri.EscapeDataString(dataSourceName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
- System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
- if (apiVersion != null)
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ _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
- System.Net.Http.HttpRequestMessage _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("DELETE");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
- if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
{
_httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
}
- if (this.Client.AcceptLanguage != null)
+ if (Client.AcceptLanguage != null)
{
if (_httpRequest.Headers.Contains("accept-language"))
{
_httpRequest.Headers.Remove("accept-language");
}
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -410,43 +438,51 @@ internal DataSourcesOperations(OperationalInsightsManagementClient client)
// Serialize Request
string _requestContent = null;
// Set Credentials
- if (this.Client.Credentials != null)
+ if (Client.Credentials != null)
{
cancellationToken.ThrowIfCancellationRequested();
- await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
}
// Send Request
if (_shouldTrace)
{
- Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
}
cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
if (_shouldTrace)
{
- Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
}
- System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
if ((int)_statusCode != 200 && (int)_statusCode != 204)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- if (_httpResponse.Content != null) {
+ 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;
+ }
}
- else {
- _responseContent = string.Empty;
+ catch (JsonException)
+ {
+ // Ignore the exception
}
- ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ 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)
{
- Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ ServiceClientTracing.Error(_invocationId, ex);
}
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -456,7 +492,7 @@ internal DataSourcesOperations(OperationalInsightsManagementClient client)
throw ex;
}
// Create Result
- var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -465,7 +501,7 @@ internal DataSourcesOperations(OperationalInsightsManagementClient client)
}
if (_shouldTrace)
{
- Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ ServiceClientTracing.Exit(_invocationId, _result);
}
return _result;
}
@@ -488,100 +524,107 @@ internal DataSourcesOperations(OperationalInsightsManagementClient client)
///
/// 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 System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string dataSourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string dataSourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
if (resourceGroupName.Length > 90)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90);
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
}
if (resourceGroupName.Length < 1)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1);
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
}
}
if (workspaceName == null)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workspaceName");
+ throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName");
}
if (dataSourceName == null)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "dataSourceName");
+ throw new ValidationException(ValidationRules.CannotBeNull, "dataSourceName");
}
- if (this.Client.SubscriptionId == null)
+ if (Client.ApiVersion == null)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2015-11-01-preview";
// Tracing
- bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
if (_shouldTrace)
{
- _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
- System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("workspaceName", workspaceName);
tracingParameters.Add("dataSourceName", dataSourceName);
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
}
// Construct URL
- var _baseUrl = this.Client.BaseUri.AbsoluteUri;
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName));
_url = _url.Replace("{dataSourceName}", System.Uri.EscapeDataString(dataSourceName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
- System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
- if (apiVersion != null)
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ _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
- System.Net.Http.HttpRequestMessage _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
- if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
{
_httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
}
- if (this.Client.AcceptLanguage != null)
+ if (Client.AcceptLanguage != null)
{
if (_httpRequest.Headers.Contains("accept-language"))
{
_httpRequest.Headers.Remove("accept-language");
}
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -597,51 +640,51 @@ internal DataSourcesOperations(OperationalInsightsManagementClient client)
// Serialize Request
string _requestContent = null;
// Set Credentials
- if (this.Client.Credentials != null)
+ if (Client.Credentials != null)
{
cancellationToken.ThrowIfCancellationRequested();
- await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
}
// Send Request
if (_shouldTrace)
{
- Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
}
cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
if (_shouldTrace)
{
- Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
}
- System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
- ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ 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)
{
- Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ ServiceClientTracing.Error(_invocationId, ex);
}
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -651,7 +694,7 @@ internal DataSourcesOperations(OperationalInsightsManagementClient client)
throw ex;
}
// Create Result
- var _result = new Microsoft.Rest.Azure.AzureOperationResponse();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -664,21 +707,21 @@ internal DataSourcesOperations(OperationalInsightsManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
{
_httpResponse.Dispose();
}
- throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
}
}
if (_shouldTrace)
{
- Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ ServiceClientTracing.Exit(_invocationId, _result);
}
return _result;
}
@@ -705,78 +748,83 @@ internal DataSourcesOperations(OperationalInsightsManagementClient client)
///
/// 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 System.Threading.Tasks.Task>> ListByWorkspaceWithHttpMessagesAsync(Microsoft.Rest.Azure.OData.ODataQuery odataQuery, string resourceGroupName, string workspaceName, string skiptoken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async Task>> ListByWorkspaceWithHttpMessagesAsync(ODataQuery odataQuery, string resourceGroupName, string workspaceName, string skiptoken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (odataQuery == null)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "odataQuery");
+ throw new ValidationException(ValidationRules.CannotBeNull, "odataQuery");
}
if (resourceGroupName == null)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName");
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
if (resourceGroupName != null)
{
if (resourceGroupName.Length > 90)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90);
+ throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
}
if (resourceGroupName.Length < 1)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1);
+ throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
}
if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
+ throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
}
}
if (workspaceName == null)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "workspaceName");
+ throw new ValidationException(ValidationRules.CannotBeNull, "workspaceName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
}
- if (this.Client.SubscriptionId == null)
+ if (Client.SubscriptionId == null)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- string apiVersion = "2015-11-01-preview";
// Tracing
- bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
if (_shouldTrace)
{
- _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
- System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("odataQuery", odataQuery);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("workspaceName", workspaceName);
tracingParameters.Add("skiptoken", skiptoken);
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByWorkspace", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByWorkspace", tracingParameters);
}
// Construct URL
- var _baseUrl = this.Client.BaseUri.AbsoluteUri;
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources").ToString();
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{workspaceName}", System.Uri.EscapeDataString(workspaceName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId));
- System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
if (odataQuery != null)
{
var _odataFilter = odataQuery.ToString();
- if (!string.IsNullOrEmpty(_odataFilter))
+ if (!string.IsNullOrEmpty(_odataFilter))
{
_queryParameters.Add(_odataFilter);
}
@@ -785,32 +833,34 @@ internal DataSourcesOperations(OperationalInsightsManagementClient client)
{
_queryParameters.Add(string.Format("$skiptoken={0}", System.Uri.EscapeDataString(skiptoken)));
}
- if (apiVersion != null)
+ if (Client.ApiVersion != null)
{
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
+ _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
- System.Net.Http.HttpRequestMessage _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
- if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
{
_httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
}
- if (this.Client.AcceptLanguage != null)
+ if (Client.AcceptLanguage != null)
{
if (_httpRequest.Headers.Contains("accept-language"))
{
_httpRequest.Headers.Remove("accept-language");
}
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -826,51 +876,51 @@ internal DataSourcesOperations(OperationalInsightsManagementClient client)
// Serialize Request
string _requestContent = null;
// Set Credentials
- if (this.Client.Credentials != null)
+ if (Client.Credentials != null)
{
cancellationToken.ThrowIfCancellationRequested();
- await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
}
// Send Request
if (_shouldTrace)
{
- Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
}
cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
if (_shouldTrace)
{
- Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
}
- System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
- ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ 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)
{
- Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ ServiceClientTracing.Error(_invocationId, ex);
}
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -880,7 +930,7 @@ internal DataSourcesOperations(OperationalInsightsManagementClient client)
throw ex;
}
// Create Result
- var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
+ var _result = new AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -893,21 +943,21 @@ internal DataSourcesOperations(OperationalInsightsManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
{
_httpResponse.Dispose();
}
- throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
}
}
if (_shouldTrace)
{
- Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ ServiceClientTracing.Exit(_invocationId, _result);
}
return _result;
}
@@ -925,61 +975,66 @@ internal DataSourcesOperations(OperationalInsightsManagementClient client)
///
/// 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 System.Threading.Tasks.Task>> ListByWorkspaceNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public async Task>> ListByWorkspaceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (nextPageLink == null)
{
- throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink");
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
}
// Tracing
- bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
if (_shouldTrace)
{
- _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString();
- System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary();
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("nextPageLink", nextPageLink);
tracingParameters.Add("cancellationToken", cancellationToken);
- Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByWorkspaceNext", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByWorkspaceNext", tracingParameters);
}
// Construct URL
string _url = "{nextLink}";
_url = _url.Replace("{nextLink}", nextPageLink);
- System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List();
+ List _queryParameters = new List();
if (_queryParameters.Count > 0)
{
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
}
// Create HTTP transport objects
- System.Net.Http.HttpRequestMessage _httpRequest = new System.Net.Http.HttpRequestMessage();
- System.Net.Http.HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new System.Net.Http.HttpMethod("GET");
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
- if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value)
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
{
_httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
}
- if (this.Client.AcceptLanguage != null)
+ if (Client.AcceptLanguage != null)
{
if (_httpRequest.Headers.Contains("accept-language"))
{
_httpRequest.Headers.Remove("accept-language");
}
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.Client.AcceptLanguage);
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
}
+
+
if (customHeaders != null)
{
foreach(var _header in customHeaders)
@@ -995,51 +1050,51 @@ internal DataSourcesOperations(OperationalInsightsManagementClient client)
// Serialize Request
string _requestContent = null;
// Set Credentials
- if (this.Client.Credentials != null)
+ if (Client.Credentials != null)
{
cancellationToken.ThrowIfCancellationRequested();
- await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
}
// Send Request
if (_shouldTrace)
{
- Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
}
cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
if (_shouldTrace)
{
- Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
}
- System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
if ((int)_statusCode != 200)
{
- var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings);
+ CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
if (_errorBody != null)
{
- ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message);
+ ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
}
}
- catch (Newtonsoft.Json.JsonException)
+ catch (JsonException)
{
// Ignore the exception
}
- ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ 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)
{
- Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex);
+ ServiceClientTracing.Error(_invocationId, ex);
}
_httpRequest.Dispose();
if (_httpResponse != null)
@@ -1049,7 +1104,7 @@ internal DataSourcesOperations(OperationalInsightsManagementClient client)
throw ex;
}
// Create Result
- var _result = new Microsoft.Rest.Azure.AzureOperationResponse>();
+ var _result = new AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -1062,21 +1117,21 @@ internal DataSourcesOperations(OperationalInsightsManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
- catch (Newtonsoft.Json.JsonException ex)
+ catch (JsonException ex)
{
_httpRequest.Dispose();
if (_httpResponse != null)
{
_httpResponse.Dispose();
}
- throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
}
}
if (_shouldTrace)
{
- Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result);
+ ServiceClientTracing.Exit(_invocationId, _result);
}
return _result;
}
diff --git a/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/DataSourcesOperationsExtensions.cs b/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/DataSourcesOperationsExtensions.cs
index 8529e825c30a..73117368c4e5 100644
--- a/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/DataSourcesOperationsExtensions.cs
+++ b/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/DataSourcesOperationsExtensions.cs
@@ -1,12 +1,21 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.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.OperationalInsights
{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
+ using Models;
+ using System.Threading;
using System.Threading.Tasks;
- using Microsoft.Rest.Azure;
- using Models;
///
/// Extension methods for DataSourcesOperations.
@@ -33,7 +42,7 @@ public static partial class DataSourcesOperationsExtensions
///
public static DataSource CreateOrUpdate(this IDataSourcesOperations operations, string resourceGroupName, string workspaceName, string dataSourceName, DataSource parameters)
{
- return System.Threading.Tasks.Task.Factory.StartNew(s => ((IDataSourcesOperations)s).CreateOrUpdateAsync(resourceGroupName, workspaceName, dataSourceName, parameters), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
+ return operations.CreateOrUpdateAsync(resourceGroupName, workspaceName, dataSourceName, parameters).GetAwaiter().GetResult();
}
///
@@ -57,7 +66,7 @@ public static DataSource CreateOrUpdate(this IDataSourcesOperations operations,
///
/// The cancellation token.
///
- public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IDataSourcesOperations operations, string resourceGroupName, string workspaceName, string dataSourceName, DataSource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async Task CreateOrUpdateAsync(this IDataSourcesOperations operations, string resourceGroupName, string workspaceName, string dataSourceName, DataSource parameters, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, workspaceName, dataSourceName, parameters, null, cancellationToken).ConfigureAwait(false))
{
@@ -82,7 +91,7 @@ public static DataSource CreateOrUpdate(this IDataSourcesOperations operations,
///
public static void Delete(this IDataSourcesOperations operations, string resourceGroupName, string workspaceName, string dataSourceName)
{
- System.Threading.Tasks.Task.Factory.StartNew(s => ((IDataSourcesOperations)s).DeleteAsync(resourceGroupName, workspaceName, dataSourceName), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
+ operations.DeleteAsync(resourceGroupName, workspaceName, dataSourceName).GetAwaiter().GetResult();
}
///
@@ -103,9 +112,9 @@ public static void Delete(this IDataSourcesOperations operations, string resourc
///
/// The cancellation token.
///
- public static async System.Threading.Tasks.Task DeleteAsync(this IDataSourcesOperations operations, string resourceGroupName, string workspaceName, string dataSourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async Task DeleteAsync(this IDataSourcesOperations operations, string resourceGroupName, string workspaceName, string dataSourceName, CancellationToken cancellationToken = default(CancellationToken))
{
- await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, dataSourceName, null, cancellationToken).ConfigureAwait(false);
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, workspaceName, dataSourceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -125,7 +134,7 @@ public static void Delete(this IDataSourcesOperations operations, string resourc
///
public static DataSource Get(this IDataSourcesOperations operations, string resourceGroupName, string workspaceName, string dataSourceName)
{
- return System.Threading.Tasks.Task.Factory.StartNew(s => ((IDataSourcesOperations)s).GetAsync(resourceGroupName, workspaceName, dataSourceName), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
+ return operations.GetAsync(resourceGroupName, workspaceName, dataSourceName).GetAwaiter().GetResult();
}
///
@@ -146,7 +155,7 @@ public static DataSource Get(this IDataSourcesOperations operations, string reso
///
/// The cancellation token.
///
- public static async System.Threading.Tasks.Task GetAsync(this IDataSourcesOperations operations, string resourceGroupName, string workspaceName, string dataSourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async Task GetAsync(this IDataSourcesOperations operations, string resourceGroupName, string workspaceName, string dataSourceName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, dataSourceName, null, cancellationToken).ConfigureAwait(false))
{
@@ -173,9 +182,9 @@ public static DataSource Get(this IDataSourcesOperations operations, string reso
///
/// Starting point of the collection of data source instances.
///
- public static Microsoft.Rest.Azure.IPage ListByWorkspace(this IDataSourcesOperations operations, Microsoft.Rest.Azure.OData.ODataQuery odataQuery, string resourceGroupName, string workspaceName, string skiptoken = default(string))
+ public static IPage ListByWorkspace(this IDataSourcesOperations operations, ODataQuery odataQuery, string resourceGroupName, string workspaceName, string skiptoken = default(string))
{
- return System.Threading.Tasks.Task.Factory.StartNew(s => ((IDataSourcesOperations)s).ListByWorkspaceAsync(odataQuery, resourceGroupName, workspaceName, skiptoken), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
+ return operations.ListByWorkspaceAsync(odataQuery, resourceGroupName, workspaceName, skiptoken).GetAwaiter().GetResult();
}
///
@@ -200,7 +209,7 @@ public static DataSource Get(this IDataSourcesOperations operations, string reso
///
/// The cancellation token.
///
- public static async Task> ListByWorkspaceAsync(this IDataSourcesOperations operations, Microsoft.Rest.Azure.OData.ODataQuery odataQuery, string resourceGroupName, string workspaceName, string skiptoken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async Task> ListByWorkspaceAsync(this IDataSourcesOperations operations, ODataQuery odataQuery, string resourceGroupName, string workspaceName, string skiptoken = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListByWorkspaceWithHttpMessagesAsync(odataQuery, resourceGroupName, workspaceName, skiptoken, null, cancellationToken).ConfigureAwait(false))
{
@@ -218,9 +227,9 @@ public static DataSource Get(this IDataSourcesOperations operations, string reso
///
/// The NextLink from the previous successful call to List operation.
///
- public static Microsoft.Rest.Azure.IPage ListByWorkspaceNext(this IDataSourcesOperations operations, string nextPageLink)
+ public static IPage ListByWorkspaceNext(this IDataSourcesOperations operations, string nextPageLink)
{
- return System.Threading.Tasks.Task.Factory.StartNew(s => ((IDataSourcesOperations)s).ListByWorkspaceNextAsync(nextPageLink), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
+ return operations.ListByWorkspaceNextAsync(nextPageLink).GetAwaiter().GetResult();
}
///
@@ -236,7 +245,7 @@ public static Microsoft.Rest.Azure.IPage ListByWorkspaceNext(this ID
///
/// The cancellation token.
///
- public static async Task> ListByWorkspaceNextAsync(this IDataSourcesOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ public static async Task> ListByWorkspaceNextAsync(this IDataSourcesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListByWorkspaceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
diff --git a/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/IDataSourcesOperations.cs b/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/IDataSourcesOperations.cs
index 36ea4c59e104..1f66c06b3f25 100644
--- a/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/IDataSourcesOperations.cs
+++ b/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/IDataSourcesOperations.cs
@@ -1,11 +1,23 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.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.OperationalInsights
{
+ using Microsoft.Rest;
using Microsoft.Rest.Azure;
+ using Microsoft.Rest.Azure.OData;
using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
///
/// DataSourcesOperations operations.
@@ -44,7 +56,7 @@ public partial interface IDataSourcesOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string dataSourceName, DataSource parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string dataSourceName, DataSource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Deletes a data source instance.
///
@@ -70,7 +82,7 @@ public partial interface IDataSourcesOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string dataSourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string dataSourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets a datasource instance.
///
@@ -99,7 +111,7 @@ public partial interface IDataSourcesOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string dataSourceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string dataSourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets the first page of data source instances in a workspace with
/// the link to the next page.
@@ -132,7 +144,7 @@ public partial interface IDataSourcesOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task>> ListByWorkspaceWithHttpMessagesAsync(Microsoft.Rest.Azure.OData.ODataQuery odataQuery, string resourceGroupName, string workspaceName, string skiptoken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task>> ListByWorkspaceWithHttpMessagesAsync(ODataQuery odataQuery, string resourceGroupName, string workspaceName, string skiptoken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets the first page of data source instances in a workspace with
/// the link to the next page.
@@ -155,6 +167,6 @@ public partial interface IDataSourcesOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task>> ListByWorkspaceNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task>> ListByWorkspaceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/ILinkedServicesOperations.cs b/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/ILinkedServicesOperations.cs
index 4053ca9f79f5..b2af04003c52 100644
--- a/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/ILinkedServicesOperations.cs
+++ b/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/ILinkedServicesOperations.cs
@@ -1,11 +1,22 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.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.OperationalInsights
{
+ using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
///
/// LinkedServicesOperations operations.
@@ -44,7 +55,7 @@ public partial interface ILinkedServicesOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string linkedServiceName, LinkedService parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string linkedServiceName, LinkedService parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Deletes a linked service instance.
///
@@ -71,7 +82,7 @@ public partial interface ILinkedServicesOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string linkedServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string linkedServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets a linked service instance.
///
@@ -101,7 +112,7 @@ public partial interface ILinkedServicesOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string linkedServiceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string linkedServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets the linked services instances in a workspace.
///
@@ -128,6 +139,6 @@ public partial interface ILinkedServicesOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task>> ListByWorkspaceWithHttpMessagesAsync(string resourceGroupName, string workspaceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task>> ListByWorkspaceWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/IOperationalInsightsManagementClient.cs b/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/IOperationalInsightsManagementClient.cs
index edfb5569dc15..54bab35badaf 100644
--- a/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/IOperationalInsightsManagementClient.cs
+++ b/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/IOperationalInsightsManagementClient.cs
@@ -1,15 +1,22 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.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.OperationalInsights
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
+ using Newtonsoft.Json;
///
- /// .Net client wrapper for the REST API for Azure Operational Insights
+ /// Operational Insights Client
///
public partial interface IOperationalInsightsManagementClient : System.IDisposable
{
@@ -21,17 +28,17 @@ public partial interface IOperationalInsightsManagementClient : System.IDisposab
///
/// Gets or sets json serialization settings.
///
- Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; }
+ JsonSerializerSettings SerializationSettings { get; }
///
/// Gets or sets json deserialization settings.
///
- Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; }
+ JsonSerializerSettings DeserializationSettings { get; }
///
/// Credentials needed for the client to connect to Azure.
///
- Microsoft.Rest.ServiceClientCredentials Credentials { get; }
+ ServiceClientCredentials Credentials { get; }
///
/// Gets subscription credentials which uniquely identify Microsoft
@@ -41,19 +48,25 @@ public partial interface IOperationalInsightsManagementClient : System.IDisposab
string SubscriptionId { get; set; }
///
- /// Gets or sets the preferred language for the response.
+ /// Client Api Version.
+ ///
+ string ApiVersion { get; }
+
+ ///
+ /// 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; }
@@ -74,14 +87,9 @@ public partial interface IOperationalInsightsManagementClient : System.IDisposab
IWorkspacesOperations Workspaces { get; }
///
- /// Gets the IStorageInsightsOperations.
- ///
- IStorageInsightsOperations StorageInsights { get; }
-
- ///
- /// Gets the ISavedSearchesOperations.
+ /// Gets the IOperations.
///
- ISavedSearchesOperations SavedSearches { get; }
+ IOperations Operations { get; }
}
}
diff --git a/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/IOperations.cs b/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/IOperations.cs
new file mode 100644
index 000000000000..2c207f8464f1
--- /dev/null
+++ b/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/IOperations.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.OperationalInsights
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Operations operations.
+ ///
+ public partial interface IOperations
+ {
+ ///
+ /// Lists all of the available OperationalInsights Rest API operations.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all of the available OperationalInsights Rest API operations.
+ ///
+ ///
+ /// 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/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/ISavedSearchesOperations.cs b/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/ISavedSearchesOperations.cs
deleted file mode 100644
index 8dd6ced8ad30..000000000000
--- a/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/ISavedSearchesOperations.cs
+++ /dev/null
@@ -1,158 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace Microsoft.Azure.Management.OperationalInsights
-{
- using Microsoft.Rest.Azure;
- using Models;
-
- ///
- /// SavedSearchesOperations operations.
- ///
- public partial interface ISavedSearchesOperations
- {
- ///
- /// Deletes the specified saved search in a given workspace.
- ///
- ///
- /// The name of the resource group to get. The name is case
- /// insensitive.
- ///
- ///
- /// Log Analytics workspace name
- ///
- ///
- /// Name of the saved search.
- ///
- ///
- /// 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
- ///
- System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string savedSearchName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
- ///
- /// Creates or updates a saved search for a given workspace.
- ///
- ///
- /// The name of the resource group to get. The name is case
- /// insensitive.
- ///
- ///
- /// Log Analytics workspace name
- ///
- ///
- /// The id of the saved search.
- ///
- ///
- /// The parameters required to save a search.
- ///
- ///
- /// 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
- ///
- System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string savedSearchName, SavedSearch parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
- ///
- /// Gets the specified saved search for a given workspace.
- ///
- ///
- /// The name of the resource group to get. The name is case
- /// insensitive.
- ///
- ///
- /// Log Analytics workspace name
- ///
- ///
- /// The id of the saved search.
- ///
- ///
- /// 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
- ///
- System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string savedSearchName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
- ///
- /// Gets the saved searches for a given Log Analytics Workspace
- ///
- ///
- /// The name of the resource group to get. The name is case
- /// insensitive.
- ///
- ///
- /// Log Analytics workspace 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
- ///
- System.Threading.Tasks.Task> ListByWorkspaceWithHttpMessagesAsync(string resourceGroupName, string workspaceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
- ///
- /// Gets the results from a saved search for a given workspace.
- ///
- ///
- /// The name of the resource group to get. The name is case
- /// insensitive.
- ///
- ///
- /// Log Analytics workspace name
- ///
- ///
- /// The name of the saved search.
- ///
- ///
- /// 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
- ///
- System.Threading.Tasks.Task> GetResultsWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string savedSearchName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
- }
-}
diff --git a/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/IStorageInsightsOperations.cs b/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/IStorageInsightsOperations.cs
deleted file mode 100644
index 4edbf7a8c93d..000000000000
--- a/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/IStorageInsightsOperations.cs
+++ /dev/null
@@ -1,155 +0,0 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace Microsoft.Azure.Management.OperationalInsights
-{
- using Microsoft.Rest.Azure;
- using Models;
-
- ///
- /// StorageInsightsOperations operations.
- ///
- public partial interface IStorageInsightsOperations
- {
- ///
- /// Create or update a storage insight.
- ///
- ///
- /// The name of the resource group to get. The name is case
- /// insensitive.
- ///
- ///
- /// Log Analytics Workspace name that will contain the
- /// storageInsightsConfigs resource
- ///
- ///
- /// Name of the storageInsightsConfigs resource
- ///
- ///
- /// The parameters required to create or update a storage insight.
- ///
- ///
- /// 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
- ///
- System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string storageInsightName, StorageInsight parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
- ///
- /// Gets a storage insight instance.
- ///
- ///
- /// The name of the resource group to get. The name is case
- /// insensitive.
- ///
- ///
- /// Log Analytics Workspace name that contains the
- /// storageInsightsConfigs resource
- ///
- ///
- /// Name of the storageInsightsConfigs 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
- ///
- System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string storageInsightName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
- ///
- /// Deletes a storageInsightsConfigs resource
- ///
- ///
- /// The name of the resource group to get. The name is case
- /// insensitive.
- ///
- ///
- /// Log Analytics Workspace name that contains the
- /// storageInsightsConfigs resource
- ///
- ///
- /// Name of the storageInsightsConfigs resource
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string storageInsightName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
- ///
- /// Lists the storage insight instances within a workspace
- ///
- ///
- /// The name of the resource group to get. The name is case
- /// insensitive.
- ///
- ///
- /// Log Analytics Workspace name that will contain the
- /// storageInsightsConfigs 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
- ///
- System.Threading.Tasks.Task>> ListByWorkspaceWithHttpMessagesAsync(string resourceGroupName, string workspaceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
- ///
- /// Lists the storage insight instances within a workspace
- ///
- ///
- /// 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
- ///
- System.Threading.Tasks.Task>> ListByWorkspaceNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
- }
-}
diff --git a/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/IWorkspacesOperations.cs b/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/IWorkspacesOperations.cs
index 6b063acde6af..88f0edeb4812 100644
--- a/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/IWorkspacesOperations.cs
+++ b/src/SDKs/OperationalInsights/Management/Management.OperationalInsights/Generated/IWorkspacesOperations.cs
@@ -1,11 +1,22 @@
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.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.OperationalInsights
{
+ using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
///
/// WorkspacesOperations operations.
@@ -37,7 +48,7 @@ public partial interface IWorkspacesOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task DisableIntelligencePackWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string intelligencePackName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task DisableIntelligencePackWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string intelligencePackName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Enables an intelligence pack for a given workspace.
///
@@ -63,7 +74,7 @@ public partial interface IWorkspacesOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task EnableIntelligencePackWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string intelligencePackName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task EnableIntelligencePackWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string intelligencePackName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Lists all the intelligence packs possible and whether they are
/// enabled or disabled for a given workspace.
@@ -90,7 +101,7 @@ public partial interface IWorkspacesOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task>> ListIntelligencePacksWithHttpMessagesAsync(string resourceGroupName, string workspaceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task>> ListIntelligencePacksWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets the shared keys for a workspace.
///
@@ -116,7 +127,7 @@ public partial interface IWorkspacesOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task> GetSharedKeysWithHttpMessagesAsync(string resourceGroupName, string workspaceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task> GetSharedKeysWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets a list of usage metrics for a workspace.
///
@@ -142,7 +153,7 @@ public partial interface IWorkspacesOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task>> ListUsagesWithHttpMessagesAsync(string resourceGroupName, string workspaceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task>> ListUsagesWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets a list of management groups connected to a workspace.
///
@@ -168,7 +179,7 @@ public partial interface IWorkspacesOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task>> ListManagementGroupsWithHttpMessagesAsync(string resourceGroupName, string workspaceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task>> ListManagementGroupsWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets workspaces in a resource group.
///
@@ -191,7 +202,7 @@ public partial interface IWorkspacesOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets the workspaces in a subscription.
///
@@ -210,7 +221,7 @@ public partial interface IWorkspacesOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Create or update a workspace.
///
@@ -238,7 +249,7 @@ public partial interface IWorkspacesOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Workspace parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Workspace parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Deletes a workspace instance.
///
@@ -260,7 +271,7 @@ public partial interface IWorkspacesOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets a workspace instance.
///
@@ -285,69 +296,18 @@ public partial interface IWorkspacesOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Get a list of workspaces which the current user has administrator
- /// privileges and are not associated with an Azure Subscription. The
- /// subscriptionId parameter in the Url is ignored.
- ///
- ///
- /// 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
- ///
- System.Threading.Tasks.Task>> ListLinkTargetsWithHttpMessagesAsync(System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
- ///
- /// Gets the schema for a given workspace.
+ /// Updates a workspace.
///
///
- /// The name of the resource group to get. The name is case
- /// insensitive.
- ///
- ///
- /// Log Analytics workspace 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
- ///
- System.Threading.Tasks.Task> GetSchemaWithHttpMessagesAsync(string resourceGroupName, string workspaceName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
- ///
- /// Submit a search for a given workspace. The response will contain an
- /// id to track the search. User can use the id to poll the search
- /// status and get the full search result later if the search takes
- /// long time to finish.
- ///
- ///
- /// The name of the resource group to get. The name is case
- /// insensitive.
+ /// The resource group name of the workspace.
///
///
- /// Log Analytics workspace name
+ /// The name of the workspace.
///
///
- /// The parameters required to execute a search query.
+ /// The parameters required to patch a workspace.
///
///
/// The headers that will be added to request.
@@ -364,37 +324,7 @@ public partial interface IWorkspacesOperations
///
/// Thrown when a required parameter is null
///
- System.Threading.Tasks.Task> GetSearchResultsWithHttpMessagesAsync(string resourceGroupName, string workspaceName, SearchParameters parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
- ///
- /// Gets updated search results for a given search query.
- ///
- ///
- /// The name of the resource group to get. The name is case
- /// insensitive.
- ///
- ///
- /// Log Analytics workspace name
- ///
- ///
- /// The id of the search that will have results updated. You can get
- /// the id from the response of the GetResults call.
- ///
- ///
- /// 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
- ///
- System.Threading.Tasks.Task> UpdateSearchResultsWithHttpMessagesAsync(string resourceGroupName, string workspaceName, string id, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string workspaceName, Workspace parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///