diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/ClustersOperations.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/ClustersOperations.cs
deleted file mode 100644
index b43e5854018f..000000000000
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/ClustersOperations.cs
+++ /dev/null
@@ -1,2159 +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.StreamAnalytics
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Net;
- using System.Net.Http;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// ClustersOperations operations.
- ///
- internal partial class ClustersOperations : IServiceOperations, IClustersOperations
- {
- ///
- /// Initializes a new instance of the ClustersOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal ClustersOperations(StreamAnalyticsManagementClient client)
- {
- if (client == null)
- {
- throw new System.ArgumentNullException("client");
- }
- Client = client;
- }
-
- ///
- /// Gets a reference to the StreamAnalyticsManagementClient
- ///
- public StreamAnalyticsManagementClient Client { get; private set; }
-
- ///
- /// Creates a Stream Analytics Cluster or replaces an already existing cluster.
- ///
- ///
- /// The definition of the cluster that will be used to create a new cluster or
- /// replace the existing one.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The ETag of the resource. Omit this value to always overwrite the current
- /// record set. Specify the last-seen ETag value to prevent accidentally
- /// overwriting concurrent changes.
- ///
- ///
- /// Set to '*' to allow a new resource to be created, but to prevent updating
- /// an existing record set. Other values will result in a 412 Pre-condition
- /// Failed response.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task> CreateOrUpdateWithHttpMessagesAsync(Cluster cluster, string resourceGroupName, string clusterName, string ifMatch = default(string), string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send Request
- AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(cluster, resourceGroupName, clusterName, ifMatch, ifNoneMatch, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Updates an existing cluster. This can be used to partially update (ie.
- /// update one or two properties) a cluster without affecting the rest of the
- /// cluster definition.
- ///
- ///
- /// The properties specified here will overwrite the corresponding properties
- /// in the existing cluster (ie. Those properties will be updated).
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The ETag of the resource. Omit this value to always overwrite the current
- /// record set. Specify the last-seen ETag value to prevent accidentally
- /// overwriting concurrent changes.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task> UpdateWithHttpMessagesAsync(Cluster cluster, string resourceGroupName, string clusterName, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send Request
- AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(cluster, resourceGroupName, clusterName, ifMatch, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Gets information about the specified cluster.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string clusterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (Client.SubscriptionId != null)
- {
- if (Client.SubscriptionId.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
- }
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (resourceGroupName != null)
- {
- if (resourceGroupName.Length > 90)
- {
- throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
- }
- if (resourceGroupName.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
- }
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
- }
- if (clusterName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "clusterName");
- }
- string apiVersion = "2020-03-01-preview";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("clusterName", clusterName);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{clusterName}", System.Uri.EscapeDataString(clusterName));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Deletes the specified cluster.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string clusterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send request
- AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, clusterName, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Lists all of the clusters in the given subscription.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (Client.SubscriptionId != null)
- {
- if (Client.SubscriptionId.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
- }
- }
- string apiVersion = "2020-03-01-preview";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.StreamAnalytics/clusters").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse>();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Lists all of the clusters in the given resource group.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (Client.SubscriptionId != null)
- {
- if (Client.SubscriptionId.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
- }
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (resourceGroupName != null)
- {
- if (resourceGroupName.Length > 90)
- {
- throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
- }
- if (resourceGroupName.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
- }
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
- }
- string apiVersion = "2020-03-01-preview";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse>();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Lists all of the streaming jobs in the given cluster.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task>> ListStreamingJobsWithHttpMessagesAsync(string resourceGroupName, string clusterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (Client.SubscriptionId != null)
- {
- if (Client.SubscriptionId.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
- }
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (resourceGroupName != null)
- {
- if (resourceGroupName.Length > 90)
- {
- throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
- }
- if (resourceGroupName.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
- }
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
- }
- if (clusterName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "clusterName");
- }
- string apiVersion = "2020-03-01-preview";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("clusterName", clusterName);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListStreamingJobs", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}/listStreamingJobs").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{clusterName}", System.Uri.EscapeDataString(clusterName));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse>();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Creates a Stream Analytics Cluster or replaces an already existing cluster.
- ///
- ///
- /// The definition of the cluster that will be used to create a new cluster or
- /// replace the existing one.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The ETag of the resource. Omit this value to always overwrite the current
- /// record set. Specify the last-seen ETag value to prevent accidentally
- /// overwriting concurrent changes.
- ///
- ///
- /// Set to '*' to allow a new resource to be created, but to prevent updating
- /// an existing record set. Other values will result in a 412 Pre-condition
- /// Failed response.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(Cluster cluster, string resourceGroupName, string clusterName, string ifMatch = default(string), string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (cluster == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "cluster");
- }
- if (cluster != null)
- {
- cluster.Validate();
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (Client.SubscriptionId != null)
- {
- if (Client.SubscriptionId.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
- }
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (resourceGroupName != null)
- {
- if (resourceGroupName.Length > 90)
- {
- throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
- }
- if (resourceGroupName.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
- }
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
- }
- if (clusterName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "clusterName");
- }
- string apiVersion = "2020-03-01-preview";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("cluster", cluster);
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("clusterName", clusterName);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("ifMatch", ifMatch);
- tracingParameters.Add("ifNoneMatch", ifNoneMatch);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{clusterName}", System.Uri.EscapeDataString(clusterName));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("PUT");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (ifMatch != null)
- {
- if (_httpRequest.Headers.Contains("If-Match"))
- {
- _httpRequest.Headers.Remove("If-Match");
- }
- _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch);
- }
- if (ifNoneMatch != null)
- {
- if (_httpRequest.Headers.Contains("If-None-Match"))
- {
- _httpRequest.Headers.Remove("If-None-Match");
- }
- _httpRequest.Headers.TryAddWithoutValidation("If-None-Match", ifNoneMatch);
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- if(cluster != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(cluster, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 201)
- {
- var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- // Deserialize Response
- if ((int)_statusCode == 201)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Updates an existing cluster. This can be used to partially update (ie.
- /// update one or two properties) a cluster without affecting the rest of the
- /// cluster definition.
- ///
- ///
- /// The properties specified here will overwrite the corresponding properties
- /// in the existing cluster (ie. Those properties will be updated).
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The ETag of the resource. Omit this value to always overwrite the current
- /// record set. Specify the last-seen ETag value to prevent accidentally
- /// overwriting concurrent changes.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> BeginUpdateWithHttpMessagesAsync(Cluster cluster, string resourceGroupName, string clusterName, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (cluster == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "cluster");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (Client.SubscriptionId != null)
- {
- if (Client.SubscriptionId.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
- }
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (resourceGroupName != null)
- {
- if (resourceGroupName.Length > 90)
- {
- throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
- }
- if (resourceGroupName.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
- }
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
- }
- if (clusterName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "clusterName");
- }
- string apiVersion = "2020-03-01-preview";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("cluster", cluster);
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("clusterName", clusterName);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("ifMatch", ifMatch);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{clusterName}", System.Uri.EscapeDataString(clusterName));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("PATCH");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (ifMatch != null)
- {
- if (_httpRequest.Headers.Contains("If-Match"))
- {
- _httpRequest.Headers.Remove("If-Match");
- }
- _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch);
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- if(cluster != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(cluster, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 202)
- {
- var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Deletes the specified cluster.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string clusterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (Client.SubscriptionId != null)
- {
- if (Client.SubscriptionId.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1);
- }
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (resourceGroupName != null)
- {
- if (resourceGroupName.Length > 90)
- {
- throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90);
- }
- if (resourceGroupName.Length < 1)
- {
- throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1);
- }
- if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$"))
- {
- throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$");
- }
- }
- if (clusterName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "clusterName");
- }
- string apiVersion = "2020-03-01-preview";
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("clusterName", clusterName);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{clusterName}", System.Uri.EscapeDataString(clusterName));
- List _queryParameters = new List();
- if (apiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("DELETE");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204)
- {
- var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Lists all of the clusters in the given subscription.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (nextPageLink == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("nextPageLink", nextPageLink);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListBySubscriptionNext", tracingParameters);
- }
- // Construct URL
- string _url = "{nextLink}";
- _url = _url.Replace("{nextLink}", nextPageLink);
- List _queryParameters = new List();
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse>();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Lists all of the clusters in the given resource group.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (nextPageLink == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("nextPageLink", nextPageLink);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters);
- }
- // Construct URL
- string _url = "{nextLink}";
- _url = _url.Replace("{nextLink}", nextPageLink);
- List _queryParameters = new List();
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse>();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Lists all of the streaming jobs in the given cluster.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task>> ListStreamingJobsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (nextPageLink == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("nextPageLink", nextPageLink);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListStreamingJobsNext", tracingParameters);
- }
- // Construct URL
- string _url = "{nextLink}";
- _url = _url.Replace("{nextLink}", nextPageLink);
- List _queryParameters = new List();
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new ErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- Error _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse>();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- }
-}
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/ClustersOperationsExtensions.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/ClustersOperationsExtensions.cs
deleted file mode 100644
index 603689355063..000000000000
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/ClustersOperationsExtensions.cs
+++ /dev/null
@@ -1,603 +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.StreamAnalytics
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for ClustersOperations.
- ///
- public static partial class ClustersOperationsExtensions
- {
- ///
- /// Creates a Stream Analytics Cluster or replaces an already existing cluster.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The definition of the cluster that will be used to create a new cluster or
- /// replace the existing one.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The ETag of the resource. Omit this value to always overwrite the current
- /// record set. Specify the last-seen ETag value to prevent accidentally
- /// overwriting concurrent changes.
- ///
- ///
- /// Set to '*' to allow a new resource to be created, but to prevent updating
- /// an existing record set. Other values will result in a 412 Pre-condition
- /// Failed response.
- ///
- public static Cluster CreateOrUpdate(this IClustersOperations operations, Cluster cluster, string resourceGroupName, string clusterName, string ifMatch = default(string), string ifNoneMatch = default(string))
- {
- return operations.CreateOrUpdateAsync(cluster, resourceGroupName, clusterName, ifMatch, ifNoneMatch).GetAwaiter().GetResult();
- }
-
- ///
- /// Creates a Stream Analytics Cluster or replaces an already existing cluster.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The definition of the cluster that will be used to create a new cluster or
- /// replace the existing one.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The ETag of the resource. Omit this value to always overwrite the current
- /// record set. Specify the last-seen ETag value to prevent accidentally
- /// overwriting concurrent changes.
- ///
- ///
- /// Set to '*' to allow a new resource to be created, but to prevent updating
- /// an existing record set. Other values will result in a 412 Pre-condition
- /// Failed response.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task CreateOrUpdateAsync(this IClustersOperations operations, Cluster cluster, string resourceGroupName, string clusterName, string ifMatch = default(string), string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(cluster, resourceGroupName, clusterName, ifMatch, ifNoneMatch, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Updates an existing cluster. This can be used to partially update (ie.
- /// update one or two properties) a cluster without affecting the rest of the
- /// cluster definition.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The properties specified here will overwrite the corresponding properties
- /// in the existing cluster (ie. Those properties will be updated).
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The ETag of the resource. Omit this value to always overwrite the current
- /// record set. Specify the last-seen ETag value to prevent accidentally
- /// overwriting concurrent changes.
- ///
- public static Cluster Update(this IClustersOperations operations, Cluster cluster, string resourceGroupName, string clusterName, string ifMatch = default(string))
- {
- return operations.UpdateAsync(cluster, resourceGroupName, clusterName, ifMatch).GetAwaiter().GetResult();
- }
-
- ///
- /// Updates an existing cluster. This can be used to partially update (ie.
- /// update one or two properties) a cluster without affecting the rest of the
- /// cluster definition.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The properties specified here will overwrite the corresponding properties
- /// in the existing cluster (ie. Those properties will be updated).
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The ETag of the resource. Omit this value to always overwrite the current
- /// record set. Specify the last-seen ETag value to prevent accidentally
- /// overwriting concurrent changes.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task UpdateAsync(this IClustersOperations operations, Cluster cluster, string resourceGroupName, string clusterName, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.UpdateWithHttpMessagesAsync(cluster, resourceGroupName, clusterName, ifMatch, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Gets information about the specified cluster.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- public static Cluster Get(this IClustersOperations operations, string resourceGroupName, string clusterName)
- {
- return operations.GetAsync(resourceGroupName, clusterName).GetAwaiter().GetResult();
- }
-
- ///
- /// Gets information about the specified cluster.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task GetAsync(this IClustersOperations operations, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, clusterName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Deletes the specified cluster.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- public static void Delete(this IClustersOperations operations, string resourceGroupName, string clusterName)
- {
- operations.DeleteAsync(resourceGroupName, clusterName).GetAwaiter().GetResult();
- }
-
- ///
- /// Deletes the specified cluster.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task DeleteAsync(this IClustersOperations operations, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default(CancellationToken))
- {
- (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, clusterName, null, cancellationToken).ConfigureAwait(false)).Dispose();
- }
-
- ///
- /// Lists all of the clusters in the given subscription.
- ///
- ///
- /// The operations group for this extension method.
- ///
- public static IPage ListBySubscription(this IClustersOperations operations)
- {
- return operations.ListBySubscriptionAsync().GetAwaiter().GetResult();
- }
-
- ///
- /// Lists all of the clusters in the given subscription.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task> ListBySubscriptionAsync(this IClustersOperations operations, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Lists all of the clusters in the given resource group.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- public static IPage ListByResourceGroup(this IClustersOperations operations, string resourceGroupName)
- {
- return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult();
- }
-
- ///
- /// Lists all of the clusters in the given resource group.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task> ListByResourceGroupAsync(this IClustersOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Lists all of the streaming jobs in the given cluster.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- public static IPage ListStreamingJobs(this IClustersOperations operations, string resourceGroupName, string clusterName)
- {
- return operations.ListStreamingJobsAsync(resourceGroupName, clusterName).GetAwaiter().GetResult();
- }
-
- ///
- /// Lists all of the streaming jobs in the given cluster.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task> ListStreamingJobsAsync(this IClustersOperations operations, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListStreamingJobsWithHttpMessagesAsync(resourceGroupName, clusterName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Creates a Stream Analytics Cluster or replaces an already existing cluster.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The definition of the cluster that will be used to create a new cluster or
- /// replace the existing one.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The ETag of the resource. Omit this value to always overwrite the current
- /// record set. Specify the last-seen ETag value to prevent accidentally
- /// overwriting concurrent changes.
- ///
- ///
- /// Set to '*' to allow a new resource to be created, but to prevent updating
- /// an existing record set. Other values will result in a 412 Pre-condition
- /// Failed response.
- ///
- public static Cluster BeginCreateOrUpdate(this IClustersOperations operations, Cluster cluster, string resourceGroupName, string clusterName, string ifMatch = default(string), string ifNoneMatch = default(string))
- {
- return operations.BeginCreateOrUpdateAsync(cluster, resourceGroupName, clusterName, ifMatch, ifNoneMatch).GetAwaiter().GetResult();
- }
-
- ///
- /// Creates a Stream Analytics Cluster or replaces an already existing cluster.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The definition of the cluster that will be used to create a new cluster or
- /// replace the existing one.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The ETag of the resource. Omit this value to always overwrite the current
- /// record set. Specify the last-seen ETag value to prevent accidentally
- /// overwriting concurrent changes.
- ///
- ///
- /// Set to '*' to allow a new resource to be created, but to prevent updating
- /// an existing record set. Other values will result in a 412 Pre-condition
- /// Failed response.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task BeginCreateOrUpdateAsync(this IClustersOperations operations, Cluster cluster, string resourceGroupName, string clusterName, string ifMatch = default(string), string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(cluster, resourceGroupName, clusterName, ifMatch, ifNoneMatch, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Updates an existing cluster. This can be used to partially update (ie.
- /// update one or two properties) a cluster without affecting the rest of the
- /// cluster definition.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The properties specified here will overwrite the corresponding properties
- /// in the existing cluster (ie. Those properties will be updated).
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The ETag of the resource. Omit this value to always overwrite the current
- /// record set. Specify the last-seen ETag value to prevent accidentally
- /// overwriting concurrent changes.
- ///
- public static Cluster BeginUpdate(this IClustersOperations operations, Cluster cluster, string resourceGroupName, string clusterName, string ifMatch = default(string))
- {
- return operations.BeginUpdateAsync(cluster, resourceGroupName, clusterName, ifMatch).GetAwaiter().GetResult();
- }
-
- ///
- /// Updates an existing cluster. This can be used to partially update (ie.
- /// update one or two properties) a cluster without affecting the rest of the
- /// cluster definition.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The properties specified here will overwrite the corresponding properties
- /// in the existing cluster (ie. Those properties will be updated).
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The ETag of the resource. Omit this value to always overwrite the current
- /// record set. Specify the last-seen ETag value to prevent accidentally
- /// overwriting concurrent changes.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task BeginUpdateAsync(this IClustersOperations operations, Cluster cluster, string resourceGroupName, string clusterName, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(cluster, resourceGroupName, clusterName, ifMatch, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Deletes the specified cluster.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- public static void BeginDelete(this IClustersOperations operations, string resourceGroupName, string clusterName)
- {
- operations.BeginDeleteAsync(resourceGroupName, clusterName).GetAwaiter().GetResult();
- }
-
- ///
- /// Deletes the specified cluster.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task BeginDeleteAsync(this IClustersOperations operations, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default(CancellationToken))
- {
- (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, clusterName, null, cancellationToken).ConfigureAwait(false)).Dispose();
- }
-
- ///
- /// Lists all of the clusters in the given subscription.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- public static IPage ListBySubscriptionNext(this IClustersOperations operations, string nextPageLink)
- {
- return operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult();
- }
-
- ///
- /// Lists all of the clusters in the given subscription.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task> ListBySubscriptionNextAsync(this IClustersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Lists all of the clusters in the given resource group.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- public static IPage ListByResourceGroupNext(this IClustersOperations operations, string nextPageLink)
- {
- return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult();
- }
-
- ///
- /// Lists all of the clusters in the given resource group.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task> ListByResourceGroupNextAsync(this IClustersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Lists all of the streaming jobs in the given cluster.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- public static IPage ListStreamingJobsNext(this IClustersOperations operations, string nextPageLink)
- {
- return operations.ListStreamingJobsNextAsync(nextPageLink).GetAwaiter().GetResult();
- }
-
- ///
- /// Lists all of the streaming jobs in the given cluster.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task> ListStreamingJobsNextAsync(this IClustersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListStreamingJobsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- }
-}
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/FunctionsOperations.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/FunctionsOperations.cs
index c94f1fdc45bd..6b8fbda87198 100644
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/FunctionsOperations.cs
+++ b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/FunctionsOperations.cs
@@ -104,6 +104,17 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "function");
}
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -142,7 +153,6 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "functionName");
}
- string apiVersion = "2017-04-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -153,7 +163,6 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
tracingParameters.Add("function", function);
tracingParameters.Add("ifMatch", ifMatch);
tracingParameters.Add("ifNoneMatch", ifNoneMatch);
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("jobName", jobName);
tracingParameters.Add("functionName", functionName);
@@ -168,9 +177,9 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
_url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName));
_url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName));
List _queryParameters = new List();
- 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)
{
@@ -403,6 +412,17 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "function");
}
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -441,7 +461,6 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "functionName");
}
- string apiVersion = "2017-04-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -451,7 +470,6 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("function", function);
tracingParameters.Add("ifMatch", ifMatch);
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("jobName", jobName);
tracingParameters.Add("functionName", functionName);
@@ -466,9 +484,9 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
_url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName));
_url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName));
List _queryParameters = new List();
- 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)
{
@@ -654,6 +672,17 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
///
public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string jobName, string functionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -692,7 +721,6 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "functionName");
}
- string apiVersion = "2017-04-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -700,7 +728,6 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("jobName", jobName);
tracingParameters.Add("functionName", functionName);
@@ -715,9 +742,9 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
_url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName));
_url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName));
List _queryParameters = new List();
- 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)
{
@@ -861,6 +888,17 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
///
public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string jobName, string functionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -899,7 +937,6 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "functionName");
}
- string apiVersion = "2017-04-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -907,7 +944,6 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("jobName", jobName);
tracingParameters.Add("functionName", functionName);
@@ -922,9 +958,9 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
_url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName));
_url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName));
List _queryParameters = new List();
- 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)
{
@@ -1102,6 +1138,17 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
///
public async Task>> ListByStreamingJobWithHttpMessagesAsync(string resourceGroupName, string jobName, string select = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -1136,7 +1183,6 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "jobName");
}
- string apiVersion = "2017-04-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1145,7 +1191,6 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("select", select);
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("jobName", jobName);
tracingParameters.Add("cancellationToken", cancellationToken);
@@ -1162,9 +1207,9 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
{
_queryParameters.Add(string.Format("$select={0}", System.Uri.EscapeDataString(select)));
}
- 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)
{
@@ -1367,6 +1412,17 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
///
public async Task> RetrieveDefaultDefinitionWithHttpMessagesAsync(string resourceGroupName, string jobName, string functionName, FunctionRetrieveDefaultDefinitionParameters functionRetrieveDefaultDefinitionParameters = default(FunctionRetrieveDefaultDefinitionParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -1405,7 +1461,6 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "functionName");
}
- string apiVersion = "2017-04-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1414,7 +1469,6 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("functionRetrieveDefaultDefinitionParameters", functionRetrieveDefaultDefinitionParameters);
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("jobName", jobName);
tracingParameters.Add("functionName", functionName);
@@ -1429,9 +1483,9 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
_url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName));
_url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName));
List _queryParameters = new List();
- 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)
{
@@ -1610,6 +1664,17 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
///
public async Task> BeginTestWithHttpMessagesAsync(string resourceGroupName, string jobName, string functionName, Function function = default(Function), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -1648,7 +1713,6 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "functionName");
}
- string apiVersion = "2017-04-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1657,7 +1721,6 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("function", function);
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("jobName", jobName);
tracingParameters.Add("functionName", functionName);
@@ -1672,9 +1735,9 @@ internal FunctionsOperations(StreamAnalyticsManagementClient client)
_url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName));
_url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName));
List _queryParameters = new List();
- 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)
{
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/IClustersOperations.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/IClustersOperations.cs
deleted file mode 100644
index b1933f366933..000000000000
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/IClustersOperations.cs
+++ /dev/null
@@ -1,382 +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.StreamAnalytics
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// ClustersOperations operations.
- ///
- public partial interface IClustersOperations
- {
- ///
- /// Creates a Stream Analytics Cluster or replaces an already existing
- /// cluster.
- ///
- ///
- /// The definition of the cluster that will be used to create a new
- /// cluster or replace the existing one.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The ETag of the resource. Omit this value to always overwrite the
- /// current record set. Specify the last-seen ETag value to prevent
- /// accidentally overwriting concurrent changes.
- ///
- ///
- /// Set to '*' to allow a new resource to be created, but to prevent
- /// updating an existing record set. Other values will result in a 412
- /// Pre-condition Failed response.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> CreateOrUpdateWithHttpMessagesAsync(Cluster cluster, string resourceGroupName, string clusterName, string ifMatch = default(string), string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Updates an existing cluster. This can be used to partially update
- /// (ie. update one or two properties) a cluster without affecting the
- /// rest of the cluster definition.
- ///
- ///
- /// The properties specified here will overwrite the corresponding
- /// properties in the existing cluster (ie. Those properties will be
- /// updated).
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The ETag of the resource. Omit this value to always overwrite the
- /// current record set. Specify the last-seen ETag value to prevent
- /// accidentally overwriting concurrent changes.
- ///
- ///
- /// 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> UpdateWithHttpMessagesAsync(Cluster cluster, string resourceGroupName, string clusterName, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Gets information about the specified cluster.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string clusterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Deletes the specified cluster.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task DeleteWithHttpMessagesAsync(string resourceGroupName, string clusterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Lists all of the clusters in the given subscription.
- ///
- ///
- /// 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>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Lists all of the clusters in the given resource group.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// 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>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Lists all of the streaming jobs in the given cluster.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// 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>> ListStreamingJobsWithHttpMessagesAsync(string resourceGroupName, string clusterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Creates a Stream Analytics Cluster or replaces an already existing
- /// cluster.
- ///
- ///
- /// The definition of the cluster that will be used to create a new
- /// cluster or replace the existing one.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The ETag of the resource. Omit this value to always overwrite the
- /// current record set. Specify the last-seen ETag value to prevent
- /// accidentally overwriting concurrent changes.
- ///
- ///
- /// Set to '*' to allow a new resource to be created, but to prevent
- /// updating an existing record set. Other values will result in a 412
- /// Pre-condition Failed response.
- ///
- ///
- /// 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> BeginCreateOrUpdateWithHttpMessagesAsync(Cluster cluster, string resourceGroupName, string clusterName, string ifMatch = default(string), string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Updates an existing cluster. This can be used to partially update
- /// (ie. update one or two properties) a cluster without affecting the
- /// rest of the cluster definition.
- ///
- ///
- /// The properties specified here will overwrite the corresponding
- /// properties in the existing cluster (ie. Those properties will be
- /// updated).
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The ETag of the resource. Omit this value to always overwrite the
- /// current record set. Specify the last-seen ETag value to prevent
- /// accidentally overwriting concurrent changes.
- ///
- ///
- /// 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> BeginUpdateWithHttpMessagesAsync(Cluster cluster, string resourceGroupName, string clusterName, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Deletes the specified cluster.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string clusterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Lists all of the clusters in the given subscription.
- ///
- ///
- /// 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>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Lists all of the clusters in the given resource group.
- ///
- ///
- /// 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>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Lists all of the streaming jobs in the given cluster.
- ///
- ///
- /// 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>> ListStreamingJobsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/IPrivateEndpointsOperations.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/IPrivateEndpointsOperations.cs
deleted file mode 100644
index 65bb421f77bf..000000000000
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/IPrivateEndpointsOperations.cs
+++ /dev/null
@@ -1,195 +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.StreamAnalytics
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// PrivateEndpointsOperations operations.
- ///
- public partial interface IPrivateEndpointsOperations
- {
- ///
- /// Creates a Stream Analytics Private Endpoint or replaces an already
- /// existing Private Endpoint.
- ///
- ///
- /// The definition of the private endpoint that will be used to create
- /// a new cluster or replace the existing one.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The name of the private endpoint.
- ///
- ///
- /// The ETag of the resource. Omit this value to always overwrite the
- /// current record set. Specify the last-seen ETag value to prevent
- /// accidentally overwriting concurrent changes.
- ///
- ///
- /// Set to '*' to allow a new resource to be created, but to prevent
- /// updating an existing record set. Other values will result in a 412
- /// Pre-condition Failed response.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> CreateOrUpdateWithHttpMessagesAsync(PrivateEndpoint privateEndpoint, string resourceGroupName, string clusterName, string privateEndpointName, string ifMatch = default(string), string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Gets information about the specified Private Endpoint.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The name of the private endpoint.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string clusterName, string privateEndpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Delete the specified private endpoint.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The name of the private endpoint.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task DeleteWithHttpMessagesAsync(string resourceGroupName, string clusterName, string privateEndpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Lists the private endpoints in the cluster.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// 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>> ListByClusterWithHttpMessagesAsync(string resourceGroupName, string clusterName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Delete the specified private endpoint.
- ///
- ///
- /// The name of the resource group. The name is case insensitive.
- ///
- ///
- /// The name of the cluster.
- ///
- ///
- /// The name of the private endpoint.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string clusterName, string privateEndpointName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Lists the private endpoints in the cluster.
- ///
- ///
- /// 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>> ListByClusterNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/IStreamAnalyticsManagementClient.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/IStreamAnalyticsManagementClient.cs
index a2f00f15315f..149663b10ec4 100644
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/IStreamAnalyticsManagementClient.cs
+++ b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/IStreamAnalyticsManagementClient.cs
@@ -45,6 +45,11 @@ public partial interface IStreamAnalyticsManagementClient : System.IDisposable
///
string SubscriptionId { get; set; }
+ ///
+ /// The API version to use for this operation.
+ ///
+ string ApiVersion { get; }
+
///
/// The preferred language for the response.
///
@@ -74,6 +79,11 @@ public partial interface IStreamAnalyticsManagementClient : System.IDisposable
///
IInputsOperations Inputs { get; }
+ ///
+ /// Gets the IOperations.
+ ///
+ IOperations Operations { get; }
+
///
/// Gets the IOutputsOperations.
///
@@ -94,20 +104,5 @@ public partial interface IStreamAnalyticsManagementClient : System.IDisposable
///
ITransformationsOperations Transformations { get; }
- ///
- /// Gets the IOperations.
- ///
- IOperations Operations { get; }
-
- ///
- /// Gets the IClustersOperations.
- ///
- IClustersOperations Clusters { get; }
-
- ///
- /// Gets the IPrivateEndpointsOperations.
- ///
- IPrivateEndpointsOperations PrivateEndpoints { get; }
-
}
}
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/InputsOperations.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/InputsOperations.cs
index c2f98caabf86..bbe6ff8830ed 100644
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/InputsOperations.cs
+++ b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/InputsOperations.cs
@@ -108,6 +108,17 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
{
input.Validate();
}
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -146,7 +157,6 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "inputName");
}
- string apiVersion = "2017-04-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -157,7 +167,6 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
tracingParameters.Add("input", input);
tracingParameters.Add("ifMatch", ifMatch);
tracingParameters.Add("ifNoneMatch", ifNoneMatch);
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("jobName", jobName);
tracingParameters.Add("inputName", inputName);
@@ -172,9 +181,9 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
_url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName));
_url = _url.Replace("{inputName}", System.Uri.EscapeDataString(inputName));
List _queryParameters = new List();
- 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)
{
@@ -407,6 +416,17 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "input");
}
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -445,7 +465,6 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "inputName");
}
- string apiVersion = "2017-04-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -455,7 +474,6 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("input", input);
tracingParameters.Add("ifMatch", ifMatch);
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("jobName", jobName);
tracingParameters.Add("inputName", inputName);
@@ -470,9 +488,9 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
_url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName));
_url = _url.Replace("{inputName}", System.Uri.EscapeDataString(inputName));
List _queryParameters = new List();
- 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)
{
@@ -658,6 +676,17 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
///
public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string jobName, string inputName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -696,7 +725,6 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "inputName");
}
- string apiVersion = "2017-04-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -704,7 +732,6 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("jobName", jobName);
tracingParameters.Add("inputName", inputName);
@@ -719,9 +746,9 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
_url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName));
_url = _url.Replace("{inputName}", System.Uri.EscapeDataString(inputName));
List _queryParameters = new List();
- 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)
{
@@ -865,6 +892,17 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
///
public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string jobName, string inputName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -903,7 +941,6 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "inputName");
}
- string apiVersion = "2017-04-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -911,7 +948,6 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("jobName", jobName);
tracingParameters.Add("inputName", inputName);
@@ -926,9 +962,9 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
_url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName));
_url = _url.Replace("{inputName}", System.Uri.EscapeDataString(inputName));
List _queryParameters = new List();
- 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)
{
@@ -1106,6 +1142,17 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
///
public async Task>> ListByStreamingJobWithHttpMessagesAsync(string resourceGroupName, string jobName, string select = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -1140,7 +1187,6 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "jobName");
}
- string apiVersion = "2017-04-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1149,7 +1195,6 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("select", select);
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("jobName", jobName);
tracingParameters.Add("cancellationToken", cancellationToken);
@@ -1166,9 +1211,9 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
{
_queryParameters.Add(string.Format("$select={0}", System.Uri.EscapeDataString(select)));
}
- 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)
{
@@ -1377,6 +1422,17 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
{
input.Validate();
}
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -1415,7 +1471,6 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "inputName");
}
- string apiVersion = "2017-04-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -1424,7 +1479,6 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("input", input);
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("jobName", jobName);
tracingParameters.Add("inputName", inputName);
@@ -1439,9 +1493,9 @@ internal InputsOperations(StreamAnalyticsManagementClient client)
_url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName));
_url = _url.Replace("{inputName}", System.Uri.EscapeDataString(inputName));
List _queryParameters = new List();
- 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)
{
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/Cluster.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/Cluster.cs
deleted file mode 100644
index bd2976be2e5c..000000000000
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/Cluster.cs
+++ /dev/null
@@ -1,100 +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.StreamAnalytics.Models
-{
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// A Stream Analytics Cluster object
- ///
- public partial class Cluster : TrackedResource
- {
- ///
- /// Initializes a new instance of the Cluster class.
- ///
- public Cluster()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the Cluster class.
- ///
- /// Fully qualified resource Id for the resource. Ex -
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
- /// The name of the resource
- /// The type of the resource. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
- /// Resource tags.
- /// The geo-location where the resource
- /// lives
- /// The current entity tag for the cluster. This is
- /// an opaque string. You can use it to detect whether the resource has
- /// changed between requests. You can also use it in the If-Match or
- /// If-None-Match headers for write operations for optimistic
- /// concurrency.
- /// The properties associated with a Stream
- /// Analytics cluster.
- public Cluster(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string location = default(string), ClusterSku sku = default(ClusterSku), string etag = default(string), ClusterProperties properties = default(ClusterProperties))
- : base(id, name, type, tags, location)
- {
- Sku = sku;
- Etag = etag;
- Properties = properties;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- ///
- [JsonProperty(PropertyName = "sku")]
- public ClusterSku Sku { get; set; }
-
- ///
- /// Gets the current entity tag for the cluster. This is an opaque
- /// string. You can use it to detect whether the resource has changed
- /// between requests. You can also use it in the If-Match or
- /// If-None-Match headers for write operations for optimistic
- /// concurrency.
- ///
- [JsonProperty(PropertyName = "etag")]
- public string Etag { get; private set; }
-
- ///
- /// Gets or sets the properties associated with a Stream Analytics
- /// cluster.
- ///
- [JsonProperty(PropertyName = "properties")]
- public ClusterProperties Properties { get; set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public virtual void Validate()
- {
- if (Sku != null)
- {
- Sku.Validate();
- }
- }
- }
-}
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ClusterJob.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ClusterJob.cs
deleted file mode 100644
index ebe97a6f4fb6..000000000000
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ClusterJob.cs
+++ /dev/null
@@ -1,73 +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.StreamAnalytics.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// A streaming job.
- ///
- public partial class ClusterJob
- {
- ///
- /// Initializes a new instance of the ClusterJob class.
- ///
- public ClusterJob()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the ClusterJob class.
- ///
- /// Resource ID of the streaming job.
- /// The number of streaming units that are
- /// used by the streaming job.
- /// Possible values include: 'Created',
- /// 'Starting', 'Running', 'Stopping', 'Stopped', 'Deleting', 'Failed',
- /// 'Degraded', 'Restarting', 'Scaling'
- public ClusterJob(string id = default(string), int? streamingUnits = default(int?), string jobState = default(string))
- {
- Id = id;
- StreamingUnits = streamingUnits;
- JobState = jobState;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets resource ID of the streaming job.
- ///
- [JsonProperty(PropertyName = "id")]
- public string Id { get; private set; }
-
- ///
- /// Gets the number of streaming units that are used by the streaming
- /// job.
- ///
- [JsonProperty(PropertyName = "streamingUnits")]
- public int? StreamingUnits { get; private set; }
-
- ///
- /// Gets or sets possible values include: 'Created', 'Starting',
- /// 'Running', 'Stopping', 'Stopped', 'Deleting', 'Failed', 'Degraded',
- /// 'Restarting', 'Scaling'
- ///
- [JsonProperty(PropertyName = "jobState")]
- public string JobState { get; set; }
-
- }
-}
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ClusterProperties.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ClusterProperties.cs
deleted file mode 100644
index d8f8a282f599..000000000000
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ClusterProperties.cs
+++ /dev/null
@@ -1,92 +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.StreamAnalytics.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// The properties associated with a Stream Analytics cluster.
- ///
- public partial class ClusterProperties
- {
- ///
- /// Initializes a new instance of the ClusterProperties class.
- ///
- public ClusterProperties()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the ClusterProperties class.
- ///
- /// The date this cluster was
- /// created.
- /// Unique identifier for the cluster.
- /// Possible values include:
- /// 'Succeeded', 'Failed', 'Canceled', 'InProgress'
- /// Represents the number of streaming
- /// units currently being used on the cluster.
- /// Represents the sum of the SUs of all
- /// streaming jobs associated with the cluster. If all of the jobs were
- /// running, this would be the capacity allocated.
- public ClusterProperties(System.DateTime? createdDate = default(System.DateTime?), string clusterId = default(string), string provisioningState = default(string), int? capacityAllocated = default(int?), int? capacityAssigned = default(int?))
- {
- CreatedDate = createdDate;
- ClusterId = clusterId;
- ProvisioningState = provisioningState;
- CapacityAllocated = capacityAllocated;
- CapacityAssigned = capacityAssigned;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets the date this cluster was created.
- ///
- [JsonProperty(PropertyName = "createdDate")]
- public System.DateTime? CreatedDate { get; private set; }
-
- ///
- /// Gets unique identifier for the cluster.
- ///
- [JsonProperty(PropertyName = "clusterId")]
- public string ClusterId { get; private set; }
-
- ///
- /// Gets or sets possible values include: 'Succeeded', 'Failed',
- /// 'Canceled', 'InProgress'
- ///
- [JsonProperty(PropertyName = "provisioningState")]
- public string ProvisioningState { get; set; }
-
- ///
- /// Gets represents the number of streaming units currently being used
- /// on the cluster.
- ///
- [JsonProperty(PropertyName = "capacityAllocated")]
- public int? CapacityAllocated { get; private set; }
-
- ///
- /// Gets represents the sum of the SUs of all streaming jobs associated
- /// with the cluster. If all of the jobs were running, this would be
- /// the capacity allocated.
- ///
- [JsonProperty(PropertyName = "capacityAssigned")]
- public int? CapacityAssigned { get; private set; }
-
- }
-}
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ClusterProvisioningState.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ClusterProvisioningState.cs
deleted file mode 100644
index 8d4c60125ad5..000000000000
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ClusterProvisioningState.cs
+++ /dev/null
@@ -1,36 +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.StreamAnalytics.Models
-{
-
- ///
- /// Defines values for ClusterProvisioningState.
- ///
- public static class ClusterProvisioningState
- {
- ///
- /// The cluster provisioning succeeded.
- ///
- public const string Succeeded = "Succeeded";
- ///
- /// The cluster provisioning failed.
- ///
- public const string Failed = "Failed";
- ///
- /// The cluster provisioning was canceled.
- ///
- public const string Canceled = "Canceled";
- ///
- /// The cluster provisioning was inprogress.
- ///
- public const string InProgress = "InProgress";
- }
-}
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ClusterSku.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ClusterSku.cs
deleted file mode 100644
index f4243fd39f10..000000000000
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ClusterSku.cs
+++ /dev/null
@@ -1,87 +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.StreamAnalytics.Models
-{
- using Microsoft.Rest;
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// The SKU of the cluster. This determines the size/capacity of the
- /// cluster. Required on PUT (CreateOrUpdate) requests.
- ///
- public partial class ClusterSku
- {
- ///
- /// Initializes a new instance of the ClusterSku class.
- ///
- public ClusterSku()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the ClusterSku class.
- ///
- /// Specifies the SKU name of the cluster. Required
- /// on PUT (CreateOrUpdate) requests. Possible values include:
- /// 'Default'
- /// Denotes the number of streaming units the
- /// cluster can support. Valid values for this property are multiples
- /// of 36 with a minimum value of 36 and maximum value of 216. Required
- /// on PUT (CreateOrUpdate) requests.
- public ClusterSku(string name = default(string), int? capacity = default(int?))
- {
- Name = name;
- Capacity = capacity;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets specifies the SKU name of the cluster. Required on PUT
- /// (CreateOrUpdate) requests. Possible values include: 'Default'
- ///
- [JsonProperty(PropertyName = "name")]
- public string Name { get; set; }
-
- ///
- /// Gets or sets denotes the number of streaming units the cluster can
- /// support. Valid values for this property are multiples of 36 with a
- /// minimum value of 36 and maximum value of 216. Required on PUT
- /// (CreateOrUpdate) requests.
- ///
- [JsonProperty(PropertyName = "capacity")]
- public int? Capacity { get; set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public virtual void Validate()
- {
- if (Capacity > 216)
- {
- throw new ValidationException(ValidationRules.InclusiveMaximum, "Capacity", 216);
- }
- if (Capacity < 36)
- {
- throw new ValidationException(ValidationRules.InclusiveMinimum, "Capacity", 36);
- }
- }
- }
-}
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ClusterSkuName.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ClusterSkuName.cs
deleted file mode 100644
index 3137e47292f3..000000000000
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ClusterSkuName.cs
+++ /dev/null
@@ -1,24 +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.StreamAnalytics.Models
-{
-
- ///
- /// Defines values for ClusterSkuName.
- ///
- public static class ClusterSkuName
- {
- ///
- /// The default SKU.
- ///
- public const string Default = "Default";
- }
-}
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/Error.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/Error.cs
deleted file mode 100644
index 10622d367f28..000000000000
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/Error.cs
+++ /dev/null
@@ -1,51 +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.StreamAnalytics.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Common error representation.
- ///
- public partial class Error
- {
- ///
- /// Initializes a new instance of the Error class.
- ///
- public Error()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the Error class.
- ///
- /// Error definition properties.
- public Error(ErrorError errorProperty = default(ErrorError))
- {
- ErrorProperty = errorProperty;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets error definition properties.
- ///
- [JsonProperty(PropertyName = "error")]
- public ErrorError ErrorProperty { get; set; }
-
- }
-}
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ErrorDetails.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ErrorDetails.cs
deleted file mode 100644
index 7a403197eafb..000000000000
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ErrorDetails.cs
+++ /dev/null
@@ -1,67 +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.StreamAnalytics.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Common error details representation.
- ///
- public partial class ErrorDetails
- {
- ///
- /// Initializes a new instance of the ErrorDetails class.
- ///
- public ErrorDetails()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the ErrorDetails class.
- ///
- /// Error code.
- /// Error target.
- /// Error message.
- public ErrorDetails(string code = default(string), string target = default(string), string message = default(string))
- {
- Code = code;
- Target = target;
- Message = message;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets error code.
- ///
- [JsonProperty(PropertyName = "code")]
- public string Code { get; set; }
-
- ///
- /// Gets or sets error target.
- ///
- [JsonProperty(PropertyName = "target")]
- public string Target { get; set; }
-
- ///
- /// Gets or sets error message.
- ///
- [JsonProperty(PropertyName = "message")]
- public string Message { get; set; }
-
- }
-}
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ErrorError.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ErrorError.cs
deleted file mode 100644
index 646bdfe00075..000000000000
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ErrorError.cs
+++ /dev/null
@@ -1,77 +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.StreamAnalytics.Models
-{
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Error definition properties.
- ///
- public partial class ErrorError
- {
- ///
- /// Initializes a new instance of the ErrorError class.
- ///
- public ErrorError()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the ErrorError class.
- ///
- /// Error code.
- /// Error message.
- /// Error target.
- /// Error details.
- public ErrorError(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList))
- {
- Code = code;
- Message = message;
- Target = target;
- Details = details;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets error code.
- ///
- [JsonProperty(PropertyName = "code")]
- public string Code { get; set; }
-
- ///
- /// Gets or sets error message.
- ///
- [JsonProperty(PropertyName = "message")]
- public string Message { get; set; }
-
- ///
- /// Gets or sets error target.
- ///
- [JsonProperty(PropertyName = "target")]
- public string Target { get; set; }
-
- ///
- /// Gets or sets error details.
- ///
- [JsonProperty(PropertyName = "details")]
- public IList Details { get; set; }
-
- }
-}
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ErrorException.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ErrorException.cs
deleted file mode 100644
index 1447cc601969..000000000000
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ErrorException.cs
+++ /dev/null
@@ -1,61 +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.StreamAnalytics.Models
-{
- using Microsoft.Rest;
-
- ///
- /// Exception thrown for an invalid response with Error information.
- ///
- public partial class ErrorException : RestException
- {
- ///
- /// Gets information about the associated HTTP request.
- ///
- public HttpRequestMessageWrapper Request { get; set; }
-
- ///
- /// Gets information about the associated HTTP response.
- ///
- public HttpResponseMessageWrapper Response { get; set; }
-
- ///
- /// Gets or sets the body object.
- ///
- public Error Body { get; set; }
-
- ///
- /// Initializes a new instance of the ErrorException class.
- ///
- public ErrorException()
- {
- }
-
- ///
- /// Initializes a new instance of the ErrorException class.
- ///
- /// The exception message.
- public ErrorException(string message)
- : this(message, null)
- {
- }
-
- ///
- /// Initializes a new instance of the ErrorException class.
- ///
- /// The exception message.
- /// Inner exception.
- public ErrorException(string message, System.Exception innerException)
- : base(message, innerException)
- {
- }
- }
-}
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/FunctionBinding.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/FunctionBinding.cs
index fd6097c6bbbe..6fa105b54ec5 100644
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/FunctionBinding.cs
+++ b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/FunctionBinding.cs
@@ -10,14 +10,12 @@
namespace Microsoft.Azure.Management.StreamAnalytics.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// The physical binding of the function. For example, in the Azure Machine
/// Learning web service’s case, this describes the endpoint.
///
- [Newtonsoft.Json.JsonObject("FunctionBinding")]
public partial class FunctionBinding
{
///
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/FunctionProperties.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/FunctionProperties.cs
index cc6cf33a721c..c7b7748e0c35 100644
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/FunctionProperties.cs
+++ b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/FunctionProperties.cs
@@ -20,7 +20,6 @@ namespace Microsoft.Azure.Management.StreamAnalytics.Models
///
/// The properties that are associated with a function.
///
- [Newtonsoft.Json.JsonObject("FunctionProperties")]
[Rest.Serialization.JsonTransformation]
public partial class FunctionProperties
{
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/FunctionRetrieveDefaultDefinitionParameters.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/FunctionRetrieveDefaultDefinitionParameters.cs
index 093b04588198..30923e68a81c 100644
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/FunctionRetrieveDefaultDefinitionParameters.cs
+++ b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/FunctionRetrieveDefaultDefinitionParameters.cs
@@ -10,14 +10,12 @@
namespace Microsoft.Azure.Management.StreamAnalytics.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Parameters used to specify the type of function to retrieve the default
/// definition for.
///
- [Newtonsoft.Json.JsonObject("FunctionRetrieveDefaultDefinitionParameters")]
public partial class FunctionRetrieveDefaultDefinitionParameters
{
///
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/InputProperties.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/InputProperties.cs
index fd618c6effe8..747958f68cb3 100644
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/InputProperties.cs
+++ b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/InputProperties.cs
@@ -16,7 +16,6 @@ namespace Microsoft.Azure.Management.StreamAnalytics.Models
///
/// The properties that are associated with an input.
///
- [Newtonsoft.Json.JsonObject("InputProperties")]
public partial class InputProperties
{
///
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/JobState.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/JobState.cs
deleted file mode 100644
index 8c1c9f10c38d..000000000000
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/JobState.cs
+++ /dev/null
@@ -1,60 +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.StreamAnalytics.Models
-{
-
- ///
- /// Defines values for JobState.
- ///
- public static class JobState
- {
- ///
- /// The job is currently in the Created state.
- ///
- public const string Created = "Created";
- ///
- /// The job is currently in the Starting state.
- ///
- public const string Starting = "Starting";
- ///
- /// The job is currently in the Running state.
- ///
- public const string Running = "Running";
- ///
- /// The job is currently in the Stopping state.
- ///
- public const string Stopping = "Stopping";
- ///
- /// The job is currently in the Stopped state.
- ///
- public const string Stopped = "Stopped";
- ///
- /// The job is currently in the Deleting state.
- ///
- public const string Deleting = "Deleting";
- ///
- /// The job is currently in the Failed state.
- ///
- public const string Failed = "Failed";
- ///
- /// The job is currently in the Degraded state.
- ///
- public const string Degraded = "Degraded";
- ///
- /// The job is currently in the Restarting state.
- ///
- public const string Restarting = "Restarting";
- ///
- /// The job is currently in the Scaling state.
- ///
- public const string Scaling = "Scaling";
- }
-}
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/OutputDataSource.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/OutputDataSource.cs
index 4a075fdc0034..f43854f245b8 100644
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/OutputDataSource.cs
+++ b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/OutputDataSource.cs
@@ -10,13 +10,11 @@
namespace Microsoft.Azure.Management.StreamAnalytics.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Describes the data source that output will be written to.
///
- [Newtonsoft.Json.JsonObject("OutputDataSource")]
public partial class OutputDataSource
{
///
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/PrivateEndpoint.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/PrivateEndpoint.cs
deleted file mode 100644
index fa7303d10964..000000000000
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/PrivateEndpoint.cs
+++ /dev/null
@@ -1,73 +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.StreamAnalytics.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Complete information about the private endpoint.
- ///
- public partial class PrivateEndpoint : ProxyResource
- {
- ///
- /// Initializes a new instance of the PrivateEndpoint class.
- ///
- public PrivateEndpoint()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the PrivateEndpoint class.
- ///
- /// Fully qualified resource Id for the resource. Ex -
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
- /// The name of the resource
- /// The type of the resource. Ex-
- /// Microsoft.Compute/virtualMachines or
- /// Microsoft.Storage/storageAccounts.
- /// The properties associated with a private
- /// endpoint.
- /// Unique opaque string (generally a GUID) that
- /// represents the metadata state of the resource (private endpoint)
- /// and changes whenever the resource is updated. Required on PUT
- /// (CreateOrUpdate) requests.
- public PrivateEndpoint(string id = default(string), string name = default(string), string type = default(string), PrivateEndpointProperties properties = default(PrivateEndpointProperties), string etag = default(string))
- : base(id, name, type)
- {
- Properties = properties;
- Etag = etag;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the properties associated with a private endpoint.
- ///
- [JsonProperty(PropertyName = "properties")]
- public PrivateEndpointProperties Properties { get; set; }
-
- ///
- /// Gets unique opaque string (generally a GUID) that represents the
- /// metadata state of the resource (private endpoint) and changes
- /// whenever the resource is updated. Required on PUT (CreateOrUpdate)
- /// requests.
- ///
- [JsonProperty(PropertyName = "etag")]
- public string Etag { get; private set; }
-
- }
-}
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/PrivateEndpointProperties.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/PrivateEndpointProperties.cs
deleted file mode 100644
index ac3c56c8aae6..000000000000
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/PrivateEndpointProperties.cs
+++ /dev/null
@@ -1,65 +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.StreamAnalytics.Models
-{
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// The properties associated with a private endpoint.
- ///
- public partial class PrivateEndpointProperties
- {
- ///
- /// Initializes a new instance of the PrivateEndpointProperties class.
- ///
- public PrivateEndpointProperties()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the PrivateEndpointProperties class.
- ///
- /// The date when this private endpoint was
- /// created.
- /// A list of
- /// connections to the remote resource. Immutable after it is
- /// set.
- public PrivateEndpointProperties(string createdDate = default(string), IList manualPrivateLinkServiceConnections = default(IList))
- {
- CreatedDate = createdDate;
- ManualPrivateLinkServiceConnections = manualPrivateLinkServiceConnections;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets the date when this private endpoint was created.
- ///
- [JsonProperty(PropertyName = "createdDate")]
- public string CreatedDate { get; private set; }
-
- ///
- /// Gets or sets a list of connections to the remote resource.
- /// Immutable after it is set.
- ///
- [JsonProperty(PropertyName = "manualPrivateLinkServiceConnections")]
- public IList ManualPrivateLinkServiceConnections { get; set; }
-
- }
-}
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/PrivateLinkConnectionState.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/PrivateLinkConnectionState.cs
deleted file mode 100644
index a443a7ae837d..000000000000
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/PrivateLinkConnectionState.cs
+++ /dev/null
@@ -1,75 +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.StreamAnalytics.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// A collection of read-only information about the state of the connection
- /// to the private remote resource.
- ///
- public partial class PrivateLinkConnectionState
- {
- ///
- /// Initializes a new instance of the PrivateLinkConnectionState class.
- ///
- public PrivateLinkConnectionState()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the PrivateLinkConnectionState class.
- ///
- /// Indicates whether the connection has been
- /// Approved/Rejected/Removed by the owner of the remote
- /// resource/service.
- /// The reason for approval/rejection of the
- /// connection.
- /// A message indicating if changes on
- /// the service provider require any updates on the consumer.
- public PrivateLinkConnectionState(string status = default(string), string description = default(string), string actionsRequired = default(string))
- {
- Status = status;
- Description = description;
- ActionsRequired = actionsRequired;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets indicates whether the connection has been
- /// Approved/Rejected/Removed by the owner of the remote
- /// resource/service.
- ///
- [JsonProperty(PropertyName = "status")]
- public string Status { get; private set; }
-
- ///
- /// Gets the reason for approval/rejection of the connection.
- ///
- [JsonProperty(PropertyName = "description")]
- public string Description { get; private set; }
-
- ///
- /// Gets a message indicating if changes on the service provider
- /// require any updates on the consumer.
- ///
- [JsonProperty(PropertyName = "actionsRequired")]
- public string ActionsRequired { get; private set; }
-
- }
-}
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/PrivateLinkServiceConnection.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/PrivateLinkServiceConnection.cs
deleted file mode 100644
index 83523d5e77e0..000000000000
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/PrivateLinkServiceConnection.cs
+++ /dev/null
@@ -1,94 +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.StreamAnalytics.Models
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Serialization;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// A grouping of information about the connection to the remote resource.
- ///
- [Rest.Serialization.JsonTransformation]
- public partial class PrivateLinkServiceConnection
- {
- ///
- /// Initializes a new instance of the PrivateLinkServiceConnection
- /// class.
- ///
- public PrivateLinkServiceConnection()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the PrivateLinkServiceConnection
- /// class.
- ///
- /// The resource id of the private
- /// link service. Required on PUT (CreateOrUpdate) requests.
- /// The ID(s) of the group(s) obtained from the
- /// remote resource that this private endpoint should connect to.
- /// Required on PUT (CreateOrUpdate) requests.
- /// A message passed to the owner of the
- /// remote resource with this connection request. Restricted to 140
- /// chars.
- /// A collection of
- /// read-only information about the state of the connection to the
- /// private remote resource.
- public PrivateLinkServiceConnection(string privateLinkServiceId = default(string), IList groupIds = default(IList), string requestMessage = default(string), PrivateLinkConnectionState privateLinkServiceConnectionState = default(PrivateLinkConnectionState))
- {
- PrivateLinkServiceId = privateLinkServiceId;
- GroupIds = groupIds;
- RequestMessage = requestMessage;
- PrivateLinkServiceConnectionState = privateLinkServiceConnectionState;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the resource id of the private link service. Required
- /// on PUT (CreateOrUpdate) requests.
- ///
- [JsonProperty(PropertyName = "properties.privateLinkServiceId")]
- public string PrivateLinkServiceId { get; set; }
-
- ///
- /// Gets or sets the ID(s) of the group(s) obtained from the remote
- /// resource that this private endpoint should connect to. Required on
- /// PUT (CreateOrUpdate) requests.
- ///
- [JsonProperty(PropertyName = "properties.groupIds")]
- public IList GroupIds { get; set; }
-
- ///
- /// Gets or sets a message passed to the owner of the remote resource
- /// with this connection request. Restricted to 140 chars.
- ///
- [JsonProperty(PropertyName = "properties.requestMessage")]
- public string RequestMessage { get; set; }
-
- ///
- /// Gets or sets a collection of read-only information about the state
- /// of the connection to the private remote resource.
- ///
- [JsonProperty(PropertyName = "properties.privateLinkServiceConnectionState")]
- public PrivateLinkConnectionState PrivateLinkServiceConnectionState { get; set; }
-
- }
-}
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ReferenceInputDataSource.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ReferenceInputDataSource.cs
index 346e95f5a40c..32e223c231ef 100644
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ReferenceInputDataSource.cs
+++ b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/ReferenceInputDataSource.cs
@@ -10,13 +10,11 @@
namespace Microsoft.Azure.Management.StreamAnalytics.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Describes an input data source that contains reference data.
///
- [Newtonsoft.Json.JsonObject("ReferenceInputDataSource")]
public partial class ReferenceInputDataSource
{
///
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/Serialization.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/Serialization.cs
index a81f9df82872..5655cb74f349 100644
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/Serialization.cs
+++ b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/Serialization.cs
@@ -10,14 +10,12 @@
namespace Microsoft.Azure.Management.StreamAnalytics.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Describes how data from an input is serialized or how data is
/// serialized when written to an output.
///
- [Newtonsoft.Json.JsonObject("Serialization")]
public partial class Serialization
{
///
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/StreamInputDataSource.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/StreamInputDataSource.cs
index 830160b86437..0b4be6974476 100644
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/StreamInputDataSource.cs
+++ b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/StreamInputDataSource.cs
@@ -10,13 +10,11 @@
namespace Microsoft.Azure.Management.StreamAnalytics.Models
{
- using Newtonsoft.Json;
using System.Linq;
///
/// Describes an input data source that contains stream data.
///
- [Newtonsoft.Json.JsonObject("StreamInputDataSource")]
public partial class StreamInputDataSource
{
///
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/StreamingJob.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/StreamingJob.cs
index f555eac45025..f589b50324de 100644
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/StreamingJob.cs
+++ b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Models/StreamingJob.cs
@@ -350,13 +350,13 @@ public StreamingJob()
public JobStorageAccount JobStorageAccount { get; set; }
///
- /// Gets valid values are JobStorageAccount and SystemAccount. If set
- /// to JobStorageAccount, this requires the user to also specify
+ /// Gets or sets valid values are JobStorageAccount and SystemAccount.
+ /// If set to JobStorageAccount, this requires the user to also specify
/// jobStorageAccount property. Possible values include:
/// 'SystemAccount', 'JobStorageAccount'
///
[JsonProperty(PropertyName = "properties.contentStoragePolicy")]
- public string ContentStoragePolicy { get; private set; }
+ public string ContentStoragePolicy { get; set; }
///
/// Gets or sets the storage account where the custom code artifacts
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Operations.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Operations.cs
index 99665656166d..cfdaae153359 100644
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Operations.cs
+++ b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/Operations.cs
@@ -65,12 +65,28 @@ internal Operations(StreamAnalyticsManagementClient client)
///
/// Thrown when unable to deserialize the response
///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
///
/// A response object containing the response body and response headers.
///
public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
- string apiVersion = "2017-04-01-preview";
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -78,7 +94,6 @@ internal Operations(StreamAnalyticsManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
}
@@ -86,9 +101,9 @@ internal Operations(StreamAnalyticsManagementClient client)
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.StreamAnalytics/operations").ToString();
List _queryParameters = new List();
- 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)
{
diff --git a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/OutputsOperations.cs b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/OutputsOperations.cs
index 51a7d1d75512..87df84a3ea61 100644
--- a/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/OutputsOperations.cs
+++ b/sdk/streamanalytics/Microsoft.Azure.Management.StreamAnalytics/src/Generated/OutputsOperations.cs
@@ -104,6 +104,17 @@ internal OutputsOperations(StreamAnalyticsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "output");
}
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -142,7 +153,6 @@ internal OutputsOperations(StreamAnalyticsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "outputName");
}
- string apiVersion = "2017-04-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -153,7 +163,6 @@ internal OutputsOperations(StreamAnalyticsManagementClient client)
tracingParameters.Add("output", output);
tracingParameters.Add("ifMatch", ifMatch);
tracingParameters.Add("ifNoneMatch", ifNoneMatch);
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("jobName", jobName);
tracingParameters.Add("outputName", outputName);
@@ -168,9 +177,9 @@ internal OutputsOperations(StreamAnalyticsManagementClient client)
_url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName));
_url = _url.Replace("{outputName}", System.Uri.EscapeDataString(outputName));
List _queryParameters = new List();
- 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)
{
@@ -403,6 +412,17 @@ internal OutputsOperations(StreamAnalyticsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "output");
}
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -441,7 +461,6 @@ internal OutputsOperations(StreamAnalyticsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "outputName");
}
- string apiVersion = "2017-04-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -451,7 +470,6 @@ internal OutputsOperations(StreamAnalyticsManagementClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("output", output);
tracingParameters.Add("ifMatch", ifMatch);
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("jobName", jobName);
tracingParameters.Add("outputName", outputName);
@@ -466,9 +484,9 @@ internal OutputsOperations(StreamAnalyticsManagementClient client)
_url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName));
_url = _url.Replace("{outputName}", System.Uri.EscapeDataString(outputName));
List _queryParameters = new List();
- 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)
{
@@ -654,6 +672,17 @@ internal OutputsOperations(StreamAnalyticsManagementClient client)
///
public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string jobName, string outputName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -692,7 +721,6 @@ internal OutputsOperations(StreamAnalyticsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "outputName");
}
- string apiVersion = "2017-04-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -700,7 +728,6 @@ internal OutputsOperations(StreamAnalyticsManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("jobName", jobName);
tracingParameters.Add("outputName", outputName);
@@ -715,9 +742,9 @@ internal OutputsOperations(StreamAnalyticsManagementClient client)
_url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName));
_url = _url.Replace("{outputName}", System.Uri.EscapeDataString(outputName));
List _queryParameters = new List();
- 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)
{
@@ -861,6 +888,17 @@ internal OutputsOperations(StreamAnalyticsManagementClient client)
///
public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string jobName, string outputName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
@@ -899,7 +937,6 @@ internal OutputsOperations(StreamAnalyticsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "outputName");
}
- string apiVersion = "2017-04-01-preview";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -907,7 +944,6 @@ internal OutputsOperations(StreamAnalyticsManagementClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("jobName", jobName);
tracingParameters.Add("outputName", outputName);
@@ -922,9 +958,9 @@ internal OutputsOperations(StreamAnalyticsManagementClient client)
_url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName));
_url = _url.Replace("{outputName}", System.Uri.EscapeDataString(outputName));
List