diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActionGroupsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActionGroupsOperations.cs new file mode 100644 index 000000000000..ac8bca7e529f --- /dev/null +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActionGroupsOperations.cs @@ -0,0 +1,1206 @@ +// 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.Monitor.Management +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Monitor; + 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; + + /// + /// ActionGroupsOperations operations. + /// + internal partial class ActionGroupsOperations : IServiceOperations, IActionGroupsOperations + { + /// + /// Initializes a new instance of the ActionGroupsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ActionGroupsOperations(MonitorManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the MonitorManagementClient + /// + public MonitorManagementClient Client { get; private set; } + + /// + /// Create a new action group or update an existing one. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the action group. + /// + /// + /// The action group to create or use for the update. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string actionGroupName, ActionGroupResource actionGroup, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (actionGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "actionGroupName"); + } + if (actionGroup == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "actionGroup"); + } + if (actionGroup != null) + { + actionGroup.Validate(); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2017-04-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("actionGroupName", actionGroupName); + tracingParameters.Add("actionGroup", actionGroup); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{actionGroupName}", System.Uri.EscapeDataString(actionGroupName)); + _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("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(actionGroup != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(actionGroup, 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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get an action group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the action group. + /// + /// + /// 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 actionGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (actionGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "actionGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2017-04-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("actionGroupName", actionGroupName); + 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.insights/actionGroups/{actionGroupName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{actionGroupName}", System.Uri.EscapeDataString(actionGroupName)); + _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 && (int)_statusCode != 404) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Delete an action group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the action group. + /// + /// + /// 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 DeleteWithHttpMessagesAsync(string resourceGroupName, string actionGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (actionGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "actionGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2017-04-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("actionGroupName", actionGroupName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", 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.insights/actionGroups/{actionGroupName}").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{actionGroupName}", System.Uri.EscapeDataString(actionGroupName)); + _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("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 != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get a list of all action groups in a 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>> ListBySubscriptionIdWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2017-04-01"; + // 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, "ListBySubscriptionId", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/microsoft.insights/actionGroups").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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get a list of all action groups in a resource group. + /// + /// + /// The name of the resource group. + /// + /// + /// 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 (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2017-04-01"; + // 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.insights/actionGroups").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _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 CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Enable a receiver in an action group. This changes the receiver's status + /// from Disabled to Enabled. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the action group. + /// + /// + /// The name of the receiver to resubscribe. + /// + /// + /// 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 EnableReceiverWithHttpMessagesAsync(string resourceGroupName, string actionGroupName, string receiverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (actionGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "actionGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (receiverName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "receiverName"); + } + string apiVersion = "2017-04-01"; + EnableRequest enableRequest = new EnableRequest(); + if (receiverName != null) + { + enableRequest.ReceiverName = receiverName; + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("actionGroupName", actionGroupName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("enableRequest", enableRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "EnableReceiver", 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.insights/actionGroups/{actionGroupName}/subscribe").ToString(); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{actionGroupName}", System.Uri.EscapeDataString(actionGroupName)); + _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("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; + if(enableRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(enableRequest, 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 != 409 && (int)_statusCode != 404) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActionGroupsOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActionGroupsOperationsExtensions.cs new file mode 100644 index 000000000000..adf808ff3f59 --- /dev/null +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActionGroupsOperationsExtensions.cs @@ -0,0 +1,258 @@ +// 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.Monitor.Management +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Monitor; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ActionGroupsOperations. + /// + public static partial class ActionGroupsOperationsExtensions + { + /// + /// Create a new action group or update an existing one. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the action group. + /// + /// + /// The action group to create or use for the update. + /// + public static ActionGroupResource CreateOrUpdate(this IActionGroupsOperations operations, string resourceGroupName, string actionGroupName, ActionGroupResource actionGroup) + { + return operations.CreateOrUpdateAsync(resourceGroupName, actionGroupName, actionGroup).GetAwaiter().GetResult(); + } + + /// + /// Create a new action group or update an existing one. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the action group. + /// + /// + /// The action group to create or use for the update. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IActionGroupsOperations operations, string resourceGroupName, string actionGroupName, ActionGroupResource actionGroup, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, actionGroupName, actionGroup, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get an action group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the action group. + /// + public static ActionGroupResource Get(this IActionGroupsOperations operations, string resourceGroupName, string actionGroupName) + { + return operations.GetAsync(resourceGroupName, actionGroupName).GetAwaiter().GetResult(); + } + + /// + /// Get an action group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the action group. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IActionGroupsOperations operations, string resourceGroupName, string actionGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, actionGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete an action group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the action group. + /// + public static void Delete(this IActionGroupsOperations operations, string resourceGroupName, string actionGroupName) + { + operations.DeleteAsync(resourceGroupName, actionGroupName).GetAwaiter().GetResult(); + } + + /// + /// Delete an action group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the action group. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IActionGroupsOperations operations, string resourceGroupName, string actionGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, actionGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Get a list of all action groups in a subscription. + /// + /// + /// The operations group for this extension method. + /// + public static IEnumerable ListBySubscriptionId(this IActionGroupsOperations operations) + { + return operations.ListBySubscriptionIdAsync().GetAwaiter().GetResult(); + } + + /// + /// Get a list of all action groups in a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListBySubscriptionIdAsync(this IActionGroupsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionIdWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get a list of all action groups in a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + public static IEnumerable ListByResourceGroup(this IActionGroupsOperations operations, string resourceGroupName) + { + return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Get a list of all action groups in a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByResourceGroupAsync(this IActionGroupsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Enable a receiver in an action group. This changes the receiver's status + /// from Disabled to Enabled. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the action group. + /// + /// + /// The name of the receiver to resubscribe. + /// + public static void EnableReceiver(this IActionGroupsOperations operations, string resourceGroupName, string actionGroupName, string receiverName) + { + operations.EnableReceiverAsync(resourceGroupName, actionGroupName, receiverName).GetAwaiter().GetResult(); + } + + /// + /// Enable a receiver in an action group. This changes the receiver's status + /// from Disabled to Enabled. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the action group. + /// + /// + /// The name of the receiver to resubscribe. + /// + /// + /// The cancellation token. + /// + public static async Task EnableReceiverAsync(this IActionGroupsOperations operations, string resourceGroupName, string actionGroupName, string receiverName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.EnableReceiverWithHttpMessagesAsync(resourceGroupName, actionGroupName, receiverName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActivityLogAlertsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActivityLogAlertsOperations.cs new file mode 100644 index 000000000000..4fb4ef511026 --- /dev/null +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActivityLogAlertsOperations.cs @@ -0,0 +1,1192 @@ +// 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.Monitor.Management +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Monitor; + 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; + + /// + /// ActivityLogAlertsOperations operations. + /// + internal partial class ActivityLogAlertsOperations : IServiceOperations, IActivityLogAlertsOperations + { + /// + /// Initializes a new instance of the ActivityLogAlertsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal ActivityLogAlertsOperations(MonitorManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the MonitorManagementClient + /// + public MonitorManagementClient Client { get; private set; } + + /// + /// Create a new activity log alert or update an existing one. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the activity log alert. + /// + /// + /// The activity log alert to create or use for the update. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string activityLogAlertName, ActivityLogAlertResource activityLogAlert, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (activityLogAlertName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "activityLogAlertName"); + } + if (activityLogAlert == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "activityLogAlert"); + } + if (activityLogAlert != null) + { + activityLogAlert.Validate(); + } + string apiVersion = "2017-04-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("activityLogAlertName", activityLogAlertName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("activityLogAlert", activityLogAlert); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{activityLogAlertName}", System.Uri.EscapeDataString(activityLogAlertName)); + 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 (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(activityLogAlert != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(activityLogAlert, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get an activity log alert. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the activity log alert. + /// + /// + /// 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 activityLogAlertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (activityLogAlertName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "activityLogAlertName"); + } + string apiVersion = "2017-04-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("activityLogAlertName", activityLogAlertName); + 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.insights/activityLogAlerts/{activityLogAlertName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{activityLogAlertName}", System.Uri.EscapeDataString(activityLogAlertName)); + 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Delete an activity log alert. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the activity log alert. + /// + /// + /// 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 DeleteWithHttpMessagesAsync(string resourceGroupName, string activityLogAlertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (activityLogAlertName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "activityLogAlertName"); + } + string apiVersion = "2017-04-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("activityLogAlertName", activityLogAlertName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", 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.insights/activityLogAlerts/{activityLogAlertName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{activityLogAlertName}", System.Uri.EscapeDataString(activityLogAlertName)); + 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 != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + + /// + /// Updates an existing ActivityLogAlertResource's tags. To update other fields + /// use the CreateOrUpdate method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the activity log alert. + /// + /// + /// Parameters supplied to the 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> UpdateWithHttpMessagesAsync(string resourceGroupName, string activityLogAlertName, ActivityLogAlertPatchBody activityLogAlertPatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (activityLogAlertName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "activityLogAlertName"); + } + if (activityLogAlertPatch == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "activityLogAlertPatch"); + } + string apiVersion = "2017-04-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("activityLogAlertName", activityLogAlertName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("activityLogAlertPatch", activityLogAlertPatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/activityLogAlerts/{activityLogAlertName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{activityLogAlertName}", System.Uri.EscapeDataString(activityLogAlertName)); + 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 (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(activityLogAlertPatch != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(activityLogAlertPatch, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get a list of all activity log alerts in a 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>> ListBySubscriptionIdWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2017-04-01"; + // 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, "ListBySubscriptionId", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/microsoft.insights/activityLogAlerts").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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get a list of all activity log alerts in a resource group. + /// + /// + /// The name of the resource group. + /// + /// + /// 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 (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + string apiVersion = "2017-04-01"; + // 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.insights/activityLogAlerts").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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActivityLogAlertsOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActivityLogAlertsOperationsExtensions.cs new file mode 100644 index 000000000000..38f4eecf4095 --- /dev/null +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActivityLogAlertsOperationsExtensions.cs @@ -0,0 +1,261 @@ +// 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.Monitor.Management +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Monitor; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for ActivityLogAlertsOperations. + /// + public static partial class ActivityLogAlertsOperationsExtensions + { + /// + /// Create a new activity log alert or update an existing one. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the activity log alert. + /// + /// + /// The activity log alert to create or use for the update. + /// + public static ActivityLogAlertResource CreateOrUpdate(this IActivityLogAlertsOperations operations, string resourceGroupName, string activityLogAlertName, ActivityLogAlertResource activityLogAlert) + { + return operations.CreateOrUpdateAsync(resourceGroupName, activityLogAlertName, activityLogAlert).GetAwaiter().GetResult(); + } + + /// + /// Create a new activity log alert or update an existing one. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the activity log alert. + /// + /// + /// The activity log alert to create or use for the update. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IActivityLogAlertsOperations operations, string resourceGroupName, string activityLogAlertName, ActivityLogAlertResource activityLogAlert, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, activityLogAlertName, activityLogAlert, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get an activity log alert. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the activity log alert. + /// + public static ActivityLogAlertResource Get(this IActivityLogAlertsOperations operations, string resourceGroupName, string activityLogAlertName) + { + return operations.GetAsync(resourceGroupName, activityLogAlertName).GetAwaiter().GetResult(); + } + + /// + /// Get an activity log alert. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the activity log alert. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IActivityLogAlertsOperations operations, string resourceGroupName, string activityLogAlertName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, activityLogAlertName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete an activity log alert. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the activity log alert. + /// + public static void Delete(this IActivityLogAlertsOperations operations, string resourceGroupName, string activityLogAlertName) + { + operations.DeleteAsync(resourceGroupName, activityLogAlertName).GetAwaiter().GetResult(); + } + + /// + /// Delete an activity log alert. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the activity log alert. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IActivityLogAlertsOperations operations, string resourceGroupName, string activityLogAlertName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, activityLogAlertName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Updates an existing ActivityLogAlertResource's tags. To update other fields + /// use the CreateOrUpdate method. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the activity log alert. + /// + /// + /// Parameters supplied to the operation. + /// + public static ActivityLogAlertResource Update(this IActivityLogAlertsOperations operations, string resourceGroupName, string activityLogAlertName, ActivityLogAlertPatchBody activityLogAlertPatch) + { + return operations.UpdateAsync(resourceGroupName, activityLogAlertName, activityLogAlertPatch).GetAwaiter().GetResult(); + } + + /// + /// Updates an existing ActivityLogAlertResource's tags. To update other fields + /// use the CreateOrUpdate method. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the activity log alert. + /// + /// + /// Parameters supplied to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IActivityLogAlertsOperations operations, string resourceGroupName, string activityLogAlertName, ActivityLogAlertPatchBody activityLogAlertPatch, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, activityLogAlertName, activityLogAlertPatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get a list of all activity log alerts in a subscription. + /// + /// + /// The operations group for this extension method. + /// + public static IEnumerable ListBySubscriptionId(this IActivityLogAlertsOperations operations) + { + return operations.ListBySubscriptionIdAsync().GetAwaiter().GetResult(); + } + + /// + /// Get a list of all activity log alerts in a subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListBySubscriptionIdAsync(this IActivityLogAlertsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListBySubscriptionIdWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get a list of all activity log alerts in a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + public static IEnumerable ListByResourceGroup(this IActivityLogAlertsOperations operations, string resourceGroupName) + { + return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Get a list of all activity log alerts in a resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByResourceGroupAsync(this IActivityLogAlertsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRuleIncidentsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRuleIncidentsOperations.cs index 7d90f47c45ce..9a657939d0e1 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRuleIncidentsOperations.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRuleIncidentsOperations.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRuleIncidentsOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRuleIncidentsOperationsExtensions.cs index aaf037791c10..fecc3699846d 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRuleIncidentsOperationsExtensions.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRuleIncidentsOperationsExtensions.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRulesOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRulesOperations.cs index 31f59eb4b894..d68170b3a470 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRulesOperations.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRulesOperations.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -643,6 +643,228 @@ internal AlertRulesOperations(MonitorManagementClient client) return _result; } + /// + /// Updates an existing AlertRuleResource. To update other fields use the + /// CreateOrUpdate method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the rule. + /// + /// + /// Parameters supplied to the 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> UpdateWithHttpMessagesAsync(string resourceGroupName, string ruleName, AlertRuleResourcePatch alertRulesResource, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (ruleName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ruleName"); + } + if (alertRulesResource == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "alertRulesResource"); + } + string apiVersion = "2016-03-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("ruleName", ruleName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("alertRulesResource", alertRulesResource); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{ruleName}", System.Uri.EscapeDataString(ruleName)); + 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 (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(alertRulesResource != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(alertRulesResource, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + /// /// List the alert rules within a resource group. /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRulesOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRulesOperationsExtensions.cs index 7b525f3239e7..f72e2eba7ce6 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRulesOperationsExtensions.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRulesOperationsExtensions.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -147,6 +147,54 @@ public static AlertRuleResource Get(this IAlertRulesOperations operations, strin } } + /// + /// Updates an existing AlertRuleResource. To update other fields use the + /// CreateOrUpdate method. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the rule. + /// + /// + /// Parameters supplied to the operation. + /// + public static AlertRuleResource Update(this IAlertRulesOperations operations, string resourceGroupName, string ruleName, AlertRuleResourcePatch alertRulesResource) + { + return operations.UpdateAsync(resourceGroupName, ruleName, alertRulesResource).GetAwaiter().GetResult(); + } + + /// + /// Updates an existing AlertRuleResource. To update other fields use the + /// CreateOrUpdate method. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the rule. + /// + /// + /// Parameters supplied to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IAlertRulesOperations operations, string resourceGroupName, string ruleName, AlertRuleResourcePatch alertRulesResource, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, ruleName, alertRulesResource, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// List the alert rules within a resource group. /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AutoscaleSettingsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AutoscaleSettingsOperations.cs index 45b50e6f4b42..8b51f3e1765d 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AutoscaleSettingsOperations.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AutoscaleSettingsOperations.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -813,6 +813,210 @@ internal AutoscaleSettingsOperations(MonitorManagementClient client) return _result; } + /// + /// Updates an existing AutoscaleSettingsResource. To update other fields use + /// the CreateOrUpdate method. + /// + /// + /// The name of the resource group. + /// + /// + /// The autoscale setting name. + /// + /// + /// Parameters supplied to the 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> UpdateWithHttpMessagesAsync(string resourceGroupName, string autoscaleSettingName, AutoscaleSettingResourcePatch autoscaleSettingResource, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (autoscaleSettingName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "autoscaleSettingName"); + } + if (autoscaleSettingResource == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "autoscaleSettingResource"); + } + string apiVersion = "2015-04-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("autoscaleSettingName", autoscaleSettingName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("autoscaleSettingResource", autoscaleSettingResource); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{autoscaleSettingName}", System.Uri.EscapeDataString(autoscaleSettingName)); + 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 (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(autoscaleSettingResource != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(autoscaleSettingResource, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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 the autoscale settings for a resource group /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AutoscaleSettingsOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AutoscaleSettingsOperationsExtensions.cs index cc9b8385113e..fe70a79aafbe 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AutoscaleSettingsOperationsExtensions.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AutoscaleSettingsOperationsExtensions.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -179,6 +179,54 @@ public static AutoscaleSettingResource Get(this IAutoscaleSettingsOperations ope } } + /// + /// Updates an existing AutoscaleSettingsResource. To update other fields use + /// the CreateOrUpdate method. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The autoscale setting name. + /// + /// + /// Parameters supplied to the operation. + /// + public static AutoscaleSettingResource Update(this IAutoscaleSettingsOperations operations, string resourceGroupName, string autoscaleSettingName, AutoscaleSettingResourcePatch autoscaleSettingResource) + { + return operations.UpdateAsync(resourceGroupName, autoscaleSettingName, autoscaleSettingResource).GetAwaiter().GetResult(); + } + + /// + /// Updates an existing AutoscaleSettingsResource. To update other fields use + /// the CreateOrUpdate method. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The autoscale setting name. + /// + /// + /// Parameters supplied to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IAutoscaleSettingsOperations operations, string resourceGroupName, string autoscaleSettingName, AutoscaleSettingResourcePatch autoscaleSettingResource, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, autoscaleSettingName, autoscaleSettingResource, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Lists the autoscale settings for a resource group /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IActionGroupsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IActionGroupsOperations.cs new file mode 100644 index 000000000000..7955c38f906d --- /dev/null +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IActionGroupsOperations.cs @@ -0,0 +1,170 @@ +// 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.Monitor.Management +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Monitor; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ActionGroupsOperations operations. + /// + public partial interface IActionGroupsOperations + { + /// + /// Create a new action group or update an existing one. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the action group. + /// + /// + /// The action group to create or use for the update. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string actionGroupName, ActionGroupResource actionGroup, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get an action group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the action group. + /// + /// + /// 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 actionGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete an action group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the action group. + /// + /// + /// 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 actionGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a list of all action groups in a 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>> ListBySubscriptionIdWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a list of all action groups in a resource group. + /// + /// + /// The name of the resource group. + /// + /// + /// 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)); + /// + /// Enable a receiver in an action group. This changes the receiver's + /// status from Disabled to Enabled. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the action group. + /// + /// + /// The name of the receiver to resubscribe. + /// + /// + /// 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 EnableReceiverWithHttpMessagesAsync(string resourceGroupName, string actionGroupName, string receiverName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IActivityLogAlertsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IActivityLogAlertsOperations.cs new file mode 100644 index 000000000000..c1f7b6075ea0 --- /dev/null +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IActivityLogAlertsOperations.cs @@ -0,0 +1,173 @@ +// 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.Monitor.Management +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Monitor; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// ActivityLogAlertsOperations operations. + /// + public partial interface IActivityLogAlertsOperations + { + /// + /// Create a new activity log alert or update an existing one. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the activity log alert. + /// + /// + /// The activity log alert to create or use for the update. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string activityLogAlertName, ActivityLogAlertResource activityLogAlert, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get an activity log alert. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the activity log alert. + /// + /// + /// 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 activityLogAlertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Delete an activity log alert. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the activity log alert. + /// + /// + /// 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 activityLogAlertName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates an existing ActivityLogAlertResource's tags. To update + /// other fields use the CreateOrUpdate method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the activity log alert. + /// + /// + /// Parameters supplied to the 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> UpdateWithHttpMessagesAsync(string resourceGroupName, string activityLogAlertName, ActivityLogAlertPatchBody activityLogAlertPatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a list of all activity log alerts in a 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>> ListBySubscriptionIdWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a list of all activity log alerts in a resource group. + /// + /// + /// The name of the resource group. + /// + /// + /// 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)); + } +} diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IAlertRuleIncidentsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IAlertRuleIncidentsOperations.cs index c7310d2999cb..405f39fc74f5 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IAlertRuleIncidentsOperations.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IAlertRuleIncidentsOperations.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IAlertRulesOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IAlertRulesOperations.cs index 865e9941a078..b3612ad8e017 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IAlertRulesOperations.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IAlertRulesOperations.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -100,6 +100,35 @@ public partial interface IAlertRulesOperations /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string ruleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Updates an existing AlertRuleResource. To update other fields use + /// the CreateOrUpdate method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the rule. + /// + /// + /// Parameters supplied to the 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> UpdateWithHttpMessagesAsync(string resourceGroupName, string ruleName, AlertRuleResourcePatch alertRulesResource, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// List the alert rules within a resource group. /// /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IAutoscaleSettingsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IAutoscaleSettingsOperations.cs index 4ae998016a58..1e005021284a 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IAutoscaleSettingsOperations.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IAutoscaleSettingsOperations.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -122,6 +122,35 @@ public partial interface IAutoscaleSettingsOperations /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string autoscaleSettingName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Updates an existing AutoscaleSettingsResource. To update other + /// fields use the CreateOrUpdate method. + /// + /// + /// The name of the resource group. + /// + /// + /// The autoscale setting name. + /// + /// + /// Parameters supplied to the 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> UpdateWithHttpMessagesAsync(string resourceGroupName, string autoscaleSettingName, AutoscaleSettingResourcePatch autoscaleSettingResource, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Lists the autoscale settings for a resource group /// /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ILogProfilesOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ILogProfilesOperations.cs index cc7def846eae..d38ab961c815 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ILogProfilesOperations.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ILogProfilesOperations.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -91,6 +91,32 @@ public partial interface ILogProfilesOperations /// Task> CreateOrUpdateWithHttpMessagesAsync(string logProfileName, LogProfileResource parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Updates an existing LogProfilesResource. To update other fields use + /// the CreateOrUpdate method. + /// + /// + /// The name of the log profile. + /// + /// + /// Parameters supplied to the 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> UpdateWithHttpMessagesAsync(string logProfileName, LogProfileResourcePatch logProfilesResource, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// List the log profiles. /// /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IMonitorManagementClient.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IMonitorManagementClient.cs index 0f8555364170..d62aaa694188 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IMonitorManagementClient.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IMonitorManagementClient.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -17,7 +17,7 @@ namespace Microsoft.Azure.Management.Monitor.Management using Newtonsoft.Json; /// - /// Composite Swagger for Monitor Management Client + /// Monitor Management Client /// public partial interface IMonitorManagementClient : System.IDisposable { @@ -70,14 +70,14 @@ public partial interface IMonitorManagementClient : System.IDisposable IAutoscaleSettingsOperations AutoscaleSettings { get; } /// - /// Gets the IAlertRulesOperations. + /// Gets the IAlertRuleIncidentsOperations. /// - IAlertRulesOperations AlertRules { get; } + IAlertRuleIncidentsOperations AlertRuleIncidents { get; } /// - /// Gets the IAlertRuleIncidentsOperations. + /// Gets the IAlertRulesOperations. /// - IAlertRuleIncidentsOperations AlertRuleIncidents { get; } + IAlertRulesOperations AlertRules { get; } /// /// Gets the ILogProfilesOperations. @@ -89,5 +89,15 @@ public partial interface IMonitorManagementClient : System.IDisposable /// IServiceDiagnosticSettingsOperations ServiceDiagnosticSettings { get; } + /// + /// Gets the IActionGroupsOperations. + /// + IActionGroupsOperations ActionGroups { get; } + + /// + /// Gets the IActivityLogAlertsOperations. + /// + IActivityLogAlertsOperations ActivityLogAlerts { get; } + } } diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IServiceDiagnosticSettingsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IServiceDiagnosticSettingsOperations.cs index 448d06067ff1..06d771b34732 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IServiceDiagnosticSettingsOperations.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IServiceDiagnosticSettingsOperations.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -100,6 +100,6 @@ public partial interface IServiceDiagnosticSettingsOperations /// /// Thrown when a required parameter is null /// - Task> UpdateWithHttpMessagesAsync(string resourceUri, ServiceDiagnosticSettingsResource serviceDiagnosticSettingsResource, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> UpdateWithHttpMessagesAsync(string resourceUri, ServiceDiagnosticSettingsResourcePatch serviceDiagnosticSettingsResource, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/LogProfilesOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/LogProfilesOperations.cs index 07af14beefdd..71d6c51de8e5 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/LogProfilesOperations.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/LogProfilesOperations.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -598,6 +598,201 @@ internal LogProfilesOperations(MonitorManagementClient client) return _result; } + /// + /// Updates an existing LogProfilesResource. To update other fields use the + /// CreateOrUpdate method. + /// + /// + /// The name of the log profile. + /// + /// + /// Parameters supplied to the 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> UpdateWithHttpMessagesAsync(string logProfileName, LogProfileResourcePatch logProfilesResource, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (logProfileName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "logProfileName"); + } + if (logProfilesResource == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "logProfilesResource"); + } + string apiVersion = "2016-03-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("logProfileName", logProfileName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("logProfilesResource", logProfilesResource); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{logProfileName}", System.Uri.EscapeDataString(logProfileName)); + 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 (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(logProfilesResource != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(logProfilesResource, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _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; + } + /// /// List the log profiles. /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/LogProfilesOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/LogProfilesOperationsExtensions.cs index 6801faa0a15f..53cf2287f32d 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/LogProfilesOperationsExtensions.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/LogProfilesOperationsExtensions.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -129,6 +129,48 @@ public static LogProfileResource CreateOrUpdate(this ILogProfilesOperations oper } } + /// + /// Updates an existing LogProfilesResource. To update other fields use the + /// CreateOrUpdate method. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the log profile. + /// + /// + /// Parameters supplied to the operation. + /// + public static LogProfileResource Update(this ILogProfilesOperations operations, string logProfileName, LogProfileResourcePatch logProfilesResource) + { + return operations.UpdateAsync(logProfileName, logProfilesResource).GetAwaiter().GetResult(); + } + + /// + /// Updates an existing LogProfilesResource. To update other fields use the + /// CreateOrUpdate method. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the log profile. + /// + /// + /// Parameters supplied to the operation. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this ILogProfilesOperations operations, string logProfileName, LogProfileResourcePatch logProfilesResource, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(logProfileName, logProfilesResource, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// List the log profiles. /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActionGroupResource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActionGroupResource.cs new file mode 100644 index 000000000000..e67be2ac5bd5 --- /dev/null +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActionGroupResource.cs @@ -0,0 +1,159 @@ +// 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.Monitor.Management.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Monitor; + using Microsoft.Azure.Management.Monitor.Management; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// An action group resource. + /// + [Rest.Serialization.JsonTransformation] + public partial class ActionGroupResource : Resource + { + /// + /// Initializes a new instance of the ActionGroupResource class. + /// + public ActionGroupResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ActionGroupResource class. + /// + /// Resource location + /// The short name of the action group. + /// This will be used in SMS messages. + /// Indicates whether this action group is + /// enabled. If an action group is not enabled, then none of its + /// receviers will receive communications. + /// Azure resource Id + /// Azure resource name + /// Azure resource type + /// Resource tags + /// The list of email receivers that are + /// part of this action group. + /// The list of SMS receivers that are part + /// of this action group. + /// The list of webhook receivers that + /// are part of this action group. + public ActionGroupResource(string location, string groupShortName, bool enabled, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), IList emailReceivers = default(IList), IList smsReceivers = default(IList), IList webhookReceivers = default(IList)) + : base(location, id, name, type, tags) + { + GroupShortName = groupShortName; + Enabled = enabled; + EmailReceivers = emailReceivers; + SmsReceivers = smsReceivers; + WebhookReceivers = webhookReceivers; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the short name of the action group. This will be used + /// in SMS messages. + /// + [JsonProperty(PropertyName = "properties.groupShortName")] + public string GroupShortName { get; set; } + + /// + /// Gets or sets indicates whether this action group is enabled. If an + /// action group is not enabled, then none of its receviers will + /// receive communications. + /// + [JsonProperty(PropertyName = "properties.enabled")] + public bool Enabled { get; set; } + + /// + /// Gets or sets the list of email receivers that are part of this + /// action group. + /// + [JsonProperty(PropertyName = "properties.emailReceivers")] + public IList EmailReceivers { get; set; } + + /// + /// Gets or sets the list of SMS receivers that are part of this action + /// group. + /// + [JsonProperty(PropertyName = "properties.smsReceivers")] + public IList SmsReceivers { get; set; } + + /// + /// Gets or sets the list of webhook receivers that are part of this + /// action group. + /// + [JsonProperty(PropertyName = "properties.webhookReceivers")] + public IList WebhookReceivers { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (GroupShortName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "GroupShortName"); + } + if (GroupShortName != null) + { + if (GroupShortName.Length > 15) + { + throw new ValidationException(ValidationRules.MaxLength, "GroupShortName", 15); + } + } + if (EmailReceivers != null) + { + foreach (var element in EmailReceivers) + { + if (element != null) + { + element.Validate(); + } + } + } + if (SmsReceivers != null) + { + foreach (var element1 in SmsReceivers) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + if (WebhookReceivers != null) + { + foreach (var element2 in WebhookReceivers) + { + if (element2 != null) + { + element2.Validate(); + } + } + } + } + } +} diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertActionGroup.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertActionGroup.cs new file mode 100644 index 000000000000..6fcfb91bc2f5 --- /dev/null +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertActionGroup.cs @@ -0,0 +1,84 @@ +// 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.Monitor.Management.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Monitor; + using Microsoft.Azure.Management.Monitor.Management; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A pointer to an Azure Action Group. + /// + public partial class ActivityLogAlertActionGroup + { + /// + /// Initializes a new instance of the ActivityLogAlertActionGroup + /// class. + /// + public ActivityLogAlertActionGroup() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ActivityLogAlertActionGroup + /// class. + /// + /// The resourceId of the action group. + /// This cannot be null or empty. + /// the dictionary of custom properties + /// to include with the post operation. These data are appended to the + /// webhook payload. + public ActivityLogAlertActionGroup(string actionGroupId, IDictionary webhookProperties = default(IDictionary)) + { + ActionGroupId = actionGroupId; + WebhookProperties = webhookProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the resourceId of the action group. This cannot be + /// null or empty. + /// + [JsonProperty(PropertyName = "actionGroupId")] + public string ActionGroupId { get; set; } + + /// + /// Gets or sets the dictionary of custom properties to include with + /// the post operation. These data are appended to the webhook payload. + /// + [JsonProperty(PropertyName = "webhookProperties")] + public IDictionary WebhookProperties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ActionGroupId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ActionGroupId"); + } + } + } +} diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertActionList.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertActionList.cs new file mode 100644 index 000000000000..3a6929e7bcf8 --- /dev/null +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertActionList.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Monitor.Management.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Monitor; + using Microsoft.Azure.Management.Monitor.Management; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A list of activity log alert actions. + /// + public partial class ActivityLogAlertActionList + { + /// + /// Initializes a new instance of the ActivityLogAlertActionList class. + /// + public ActivityLogAlertActionList() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ActivityLogAlertActionList class. + /// + /// The list of activity log alerts. + public ActivityLogAlertActionList(IList actionGroups = default(IList)) + { + ActionGroups = actionGroups; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the list of activity log alerts. + /// + [JsonProperty(PropertyName = "actionGroups")] + public IList ActionGroups { get; set; } + + } +} diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertAllOfCondition.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertAllOfCondition.cs new file mode 100644 index 000000000000..4baf4af4c540 --- /dev/null +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertAllOfCondition.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Monitor.Management.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Monitor; + using Microsoft.Azure.Management.Monitor.Management; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// An Activity Log alert condition that is met when all its member + /// conditions are met. + /// + public partial class ActivityLogAlertAllOfCondition + { + /// + /// Initializes a new instance of the ActivityLogAlertAllOfCondition + /// class. + /// + public ActivityLogAlertAllOfCondition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ActivityLogAlertAllOfCondition + /// class. + /// + /// The list of activity log alert + /// conditions. + public ActivityLogAlertAllOfCondition(IList allOf) + { + AllOf = allOf; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the list of activity log alert conditions. + /// + [JsonProperty(PropertyName = "allOf")] + public IList AllOf { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (AllOf == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "AllOf"); + } + if (AllOf != null) + { + foreach (var element in AllOf) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertLeafCondition.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertLeafCondition.cs new file mode 100644 index 000000000000..ec5af6a93398 --- /dev/null +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertLeafCondition.cs @@ -0,0 +1,92 @@ +// 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.Monitor.Management.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Monitor; + using Microsoft.Azure.Management.Monitor.Management; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// An Activity Log alert condition that is met by comparing an activity + /// log field and value. + /// + public partial class ActivityLogAlertLeafCondition + { + /// + /// Initializes a new instance of the ActivityLogAlertLeafCondition + /// class. + /// + public ActivityLogAlertLeafCondition() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ActivityLogAlertLeafCondition + /// class. + /// + /// The name of the field that this condition will + /// examine. The possible values for this field are (case-insensitive): + /// 'resourceId', 'category', 'caller', 'level', 'operationName', + /// 'resourceGroup', 'resourceProvider', 'status', 'subStatus', + /// 'resourceType', or anything beginning with 'properties.'. + /// The field value will be compared to this value + /// (case-insensitive) to determine if the condition is met. + public ActivityLogAlertLeafCondition(string field, string equals) + { + Field = field; + Equals = equals; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the field that this condition will + /// examine. The possible values for this field are (case-insensitive): + /// 'resourceId', 'category', 'caller', 'level', 'operationName', + /// 'resourceGroup', 'resourceProvider', 'status', 'subStatus', + /// 'resourceType', or anything beginning with 'properties.'. + /// + [JsonProperty(PropertyName = "field")] + public string Field { get; set; } + + /// + /// Gets or sets the field value will be compared to this value + /// (case-insensitive) to determine if the condition is met. + /// + [JsonProperty(PropertyName = "equals")] + public string Equals { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Field == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Field"); + } + if (Equals == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Equals"); + } + } + } +} diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertPatchBody.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertPatchBody.cs new file mode 100644 index 000000000000..b9acfc5140a2 --- /dev/null +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertPatchBody.cs @@ -0,0 +1,70 @@ +// 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.Monitor.Management.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Monitor; + using Microsoft.Azure.Management.Monitor.Management; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// An activity log alert object for the body of patch operations. + /// + [Rest.Serialization.JsonTransformation] + public partial class ActivityLogAlertPatchBody + { + /// + /// Initializes a new instance of the ActivityLogAlertPatchBody class. + /// + public ActivityLogAlertPatchBody() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ActivityLogAlertPatchBody class. + /// + /// Resource tags + /// Indicates whether this activity log alert is + /// enabled. If an activity log alert is not enabled, then none of its + /// actions will be activated. + public ActivityLogAlertPatchBody(IDictionary tags = default(IDictionary), bool? enabled = default(bool?)) + { + Tags = tags; + Enabled = enabled; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resource tags + /// + [JsonProperty(PropertyName = "tags")] + public IDictionary Tags { get; set; } + + /// + /// Gets or sets indicates whether this activity log alert is enabled. + /// If an activity log alert is not enabled, then none of its actions + /// will be activated. + /// + [JsonProperty(PropertyName = "properties.enabled")] + public bool? Enabled { get; set; } + + } +} diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertResource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertResource.cs new file mode 100644 index 000000000000..de21e07e2048 --- /dev/null +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertResource.cs @@ -0,0 +1,136 @@ +// 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.Monitor.Management.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Monitor; + using Microsoft.Azure.Management.Monitor.Management; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// An activity log alert resource. + /// + [Rest.Serialization.JsonTransformation] + public partial class ActivityLogAlertResource : Resource + { + /// + /// Initializes a new instance of the ActivityLogAlertResource class. + /// + public ActivityLogAlertResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ActivityLogAlertResource class. + /// + /// Resource location + /// A list of resourceIds that will be used as + /// prefixes. The alert will only apply to activityLogs with + /// resourceIds that fall under one of these prefixes. This list must + /// include at least one item. + /// The conditon that will cause this alert to + /// activate. + /// The actions that will activate when the + /// condition is met. + /// Azure resource Id + /// Azure resource name + /// Azure resource type + /// Resource tags + /// Indicates whether this activity log alert is + /// enabled. If an activity log alert is not enabled, then none of its + /// actions will be activated. + /// A description of this activity log + /// alert. + public ActivityLogAlertResource(string location, IList scopes, ActivityLogAlertAllOfCondition condition, ActivityLogAlertActionList actions, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), bool? enabled = default(bool?), string description = default(string)) + : base(location, id, name, type, tags) + { + Scopes = scopes; + Enabled = enabled; + Condition = condition; + Actions = actions; + Description = description; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a list of resourceIds that will be used as prefixes. + /// The alert will only apply to activityLogs with resourceIds that + /// fall under one of these prefixes. This list must include at least + /// one item. + /// + [JsonProperty(PropertyName = "properties.scopes")] + public IList Scopes { get; set; } + + /// + /// Gets or sets indicates whether this activity log alert is enabled. + /// If an activity log alert is not enabled, then none of its actions + /// will be activated. + /// + [JsonProperty(PropertyName = "properties.enabled")] + public bool? Enabled { get; set; } + + /// + /// Gets or sets the conditon that will cause this alert to activate. + /// + [JsonProperty(PropertyName = "properties.condition")] + public ActivityLogAlertAllOfCondition Condition { get; set; } + + /// + /// Gets or sets the actions that will activate when the condition is + /// met. + /// + [JsonProperty(PropertyName = "properties.actions")] + public ActivityLogAlertActionList Actions { get; set; } + + /// + /// Gets or sets a description of this activity log alert. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Scopes == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Scopes"); + } + if (Condition == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Condition"); + } + if (Actions == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Actions"); + } + if (Condition != null) + { + Condition.Validate(); + } + } + } +} diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AlertRuleResource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AlertRuleResource.cs index 5237bb632457..126a838160a0 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AlertRuleResource.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AlertRuleResource.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -28,7 +28,10 @@ public partial class AlertRuleResource : Resource /// /// Initializes a new instance of the AlertRuleResource class. /// - public AlertRuleResource() { } + public AlertRuleResource() + { + CustomInit(); + } /// /// Initializes a new instance of the AlertRuleResource class. @@ -60,8 +63,14 @@ public AlertRuleResource() { } Condition = condition; Actions = actions; LastUpdatedTime = lastUpdatedTime; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the name of the alert rule. /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AlertRuleResourcePatch.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AlertRuleResourcePatch.cs new file mode 100644 index 000000000000..7d7cca1e07ca --- /dev/null +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AlertRuleResourcePatch.cs @@ -0,0 +1,133 @@ +// 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.Monitor.Management.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Monitor; + using Microsoft.Azure.Management.Monitor.Management; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The alert rule object for patch operations. + /// + [Rest.Serialization.JsonTransformation] + public partial class AlertRuleResourcePatch + { + /// + /// Initializes a new instance of the AlertRuleResourcePatch class. + /// + public AlertRuleResourcePatch() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AlertRuleResourcePatch class. + /// + /// the name of the alert rule. + /// the flag that indicates whether the alert + /// rule is enabled. + /// the condition that results in the alert + /// rule being activated. + /// Resource tags + /// the description of the alert rule that + /// will be included in the alert email. + /// the array of actions that are performed when + /// the alert rule becomes active, and when an alert condition is + /// resolved. + /// Last time the rule was updated in + /// ISO8601 format. + public AlertRuleResourcePatch(string name, bool isEnabled, RuleCondition condition, IDictionary tags = default(IDictionary), string description = default(string), IList actions = default(IList), System.DateTime? lastUpdatedTime = default(System.DateTime?)) + { + Tags = tags; + Name = name; + Description = description; + IsEnabled = isEnabled; + Condition = condition; + Actions = actions; + LastUpdatedTime = lastUpdatedTime; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resource tags + /// + [JsonProperty(PropertyName = "tags")] + public IDictionary Tags { get; set; } + + /// + /// Gets or sets the name of the alert rule. + /// + [JsonProperty(PropertyName = "properties.name")] + public string Name { get; set; } + + /// + /// Gets or sets the description of the alert rule that will be + /// included in the alert email. + /// + [JsonProperty(PropertyName = "properties.description")] + public string Description { get; set; } + + /// + /// Gets or sets the flag that indicates whether the alert rule is + /// enabled. + /// + [JsonProperty(PropertyName = "properties.isEnabled")] + public bool IsEnabled { get; set; } + + /// + /// Gets or sets the condition that results in the alert rule being + /// activated. + /// + [JsonProperty(PropertyName = "properties.condition")] + public RuleCondition Condition { get; set; } + + /// + /// Gets or sets the array of actions that are performed when the alert + /// rule becomes active, and when an alert condition is resolved. + /// + [JsonProperty(PropertyName = "properties.actions")] + public IList Actions { get; set; } + + /// + /// Gets last time the rule was updated in ISO8601 format. + /// + [JsonProperty(PropertyName = "properties.lastUpdatedTime")] + public System.DateTime? LastUpdatedTime { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (Condition == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Condition"); + } + } + } +} diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleNotification.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleNotification.cs index e9a9cb96aa10..e924e0bbd6a6 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleNotification.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleNotification.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -25,7 +25,10 @@ public partial class AutoscaleNotification /// /// Initializes a new instance of the AutoscaleNotification class. /// - public AutoscaleNotification() { } + public AutoscaleNotification() + { + CustomInit(); + } /// /// Initializes a new instance of the AutoscaleNotification class. @@ -37,6 +40,7 @@ public AutoscaleNotification() { } { Email = email; Webhooks = webhooks; + CustomInit(); } /// /// Static constructor for AutoscaleNotification class. @@ -46,6 +50,11 @@ static AutoscaleNotification() Operation = "Scale"; } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the email notification. /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleProfile.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleProfile.cs index 36a75a9bd535..0f7b62895217 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleProfile.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleProfile.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -26,7 +26,10 @@ public partial class AutoscaleProfile /// /// Initializes a new instance of the AutoscaleProfile class. /// - public AutoscaleProfile() { } + public AutoscaleProfile() + { + CustomInit(); + } /// /// Initializes a new instance of the AutoscaleProfile class. @@ -49,8 +52,14 @@ public AutoscaleProfile() { } Rules = rules; FixedDate = fixedDate; Recurrence = recurrence; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the name of the profile. /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleSettingResource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleSettingResource.cs index 629b7f278181..c5a53f0ea6f4 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleSettingResource.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleSettingResource.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -28,7 +28,10 @@ public partial class AutoscaleSettingResource : Resource /// /// Initializes a new instance of the AutoscaleSettingResource class. /// - public AutoscaleSettingResource() { } + public AutoscaleSettingResource() + { + CustomInit(); + } /// /// Initializes a new instance of the AutoscaleSettingResource class. @@ -58,8 +61,14 @@ public AutoscaleSettingResource() { } Enabled = enabled; AutoscaleSettingResourceName = autoscaleSettingResourceName; TargetResourceUri = targetResourceUri; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the collection of automatic scaling profiles that /// specify different scaling parameters for different time periods. A diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleSettingResourcePatch.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleSettingResourcePatch.cs new file mode 100644 index 000000000000..2dca10d46c53 --- /dev/null +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleSettingResourcePatch.cs @@ -0,0 +1,137 @@ +// 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.Monitor.Management.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Monitor; + using Microsoft.Azure.Management.Monitor.Management; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The autoscale setting object for patch operations. + /// + [Rest.Serialization.JsonTransformation] + public partial class AutoscaleSettingResourcePatch + { + /// + /// Initializes a new instance of the AutoscaleSettingResourcePatch + /// class. + /// + public AutoscaleSettingResourcePatch() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AutoscaleSettingResourcePatch + /// class. + /// + /// the collection of automatic scaling profiles + /// that specify different scaling parameters for different time + /// periods. A maximum of 20 profiles can be specified. + /// Resource tags + /// the collection of + /// notifications. + /// the enabled flag. Specifies whether automatic + /// scaling is enabled for the resource. The default value is + /// 'true'. + /// the name of the autoscale setting. + /// the resource identifier of the + /// resource that the autoscale setting should be added to. + public AutoscaleSettingResourcePatch(IList profiles, IDictionary tags = default(IDictionary), IList notifications = default(IList), bool? enabled = default(bool?), string name = default(string), string targetResourceUri = default(string)) + { + Tags = tags; + Profiles = profiles; + Notifications = notifications; + Enabled = enabled; + Name = name; + TargetResourceUri = targetResourceUri; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resource tags + /// + [JsonProperty(PropertyName = "tags")] + public IDictionary Tags { get; set; } + + /// + /// Gets or sets the collection of automatic scaling profiles that + /// specify different scaling parameters for different time periods. A + /// maximum of 20 profiles can be specified. + /// + [JsonProperty(PropertyName = "properties.profiles")] + public IList Profiles { get; set; } + + /// + /// Gets or sets the collection of notifications. + /// + [JsonProperty(PropertyName = "properties.notifications")] + public IList Notifications { get; set; } + + /// + /// Gets or sets the enabled flag. Specifies whether automatic scaling + /// is enabled for the resource. The default value is 'true'. + /// + [JsonProperty(PropertyName = "properties.enabled")] + public bool? Enabled { get; set; } + + /// + /// Gets or sets the name of the autoscale setting. + /// + [JsonProperty(PropertyName = "properties.name")] + public string Name { get; set; } + + /// + /// Gets or sets the resource identifier of the resource that the + /// autoscale setting should be added to. + /// + [JsonProperty(PropertyName = "properties.targetResourceUri")] + public string TargetResourceUri { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Profiles == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Profiles"); + } + if (Profiles != null) + { + if (Profiles.Count > 20) + { + throw new ValidationException(ValidationRules.MaxItems, "Profiles", 20); + } + foreach (var element in Profiles) + { + if (element != null) + { + element.Validate(); + } + } + } + } + } +} diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ComparisonOperationType.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ComparisonOperationType.cs index 2184b893c906..f76142fac19a 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ComparisonOperationType.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ComparisonOperationType.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -36,4 +36,49 @@ public enum ComparisonOperationType [EnumMember(Value = "LessThanOrEqual")] LessThanOrEqual } + internal static class ComparisonOperationTypeEnumExtension + { + internal static string ToSerializedValue(this ComparisonOperationType? value) => + value == null ? null : ((ComparisonOperationType)value).ToSerializedValue(); + + internal static string ToSerializedValue(this ComparisonOperationType value) + { + switch( value ) + { + case ComparisonOperationType.Equals: + return "Equals"; + case ComparisonOperationType.NotEquals: + return "NotEquals"; + case ComparisonOperationType.GreaterThan: + return "GreaterThan"; + case ComparisonOperationType.GreaterThanOrEqual: + return "GreaterThanOrEqual"; + case ComparisonOperationType.LessThan: + return "LessThan"; + case ComparisonOperationType.LessThanOrEqual: + return "LessThanOrEqual"; + } + return null; + } + + internal static ComparisonOperationType? ParseComparisonOperationType(this string value) + { + switch( value ) + { + case "Equals": + return ComparisonOperationType.Equals; + case "NotEquals": + return ComparisonOperationType.NotEquals; + case "GreaterThan": + return ComparisonOperationType.GreaterThan; + case "GreaterThanOrEqual": + return ComparisonOperationType.GreaterThanOrEqual; + case "LessThan": + return ComparisonOperationType.LessThan; + case "LessThanOrEqual": + return ComparisonOperationType.LessThanOrEqual; + } + return null; + } + } } diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ConditionOperator.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ConditionOperator.cs index 3ef16b35bf3e..730b548d0940 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ConditionOperator.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ConditionOperator.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -32,4 +32,41 @@ public enum ConditionOperator [EnumMember(Value = "LessThanOrEqual")] LessThanOrEqual } + internal static class ConditionOperatorEnumExtension + { + internal static string ToSerializedValue(this ConditionOperator? value) => + value == null ? null : ((ConditionOperator)value).ToSerializedValue(); + + internal static string ToSerializedValue(this ConditionOperator value) + { + switch( value ) + { + case ConditionOperator.GreaterThan: + return "GreaterThan"; + case ConditionOperator.GreaterThanOrEqual: + return "GreaterThanOrEqual"; + case ConditionOperator.LessThan: + return "LessThan"; + case ConditionOperator.LessThanOrEqual: + return "LessThanOrEqual"; + } + return null; + } + + internal static ConditionOperator? ParseConditionOperator(this string value) + { + switch( value ) + { + case "GreaterThan": + return ConditionOperator.GreaterThan; + case "GreaterThanOrEqual": + return ConditionOperator.GreaterThanOrEqual; + case "LessThan": + return ConditionOperator.LessThan; + case "LessThanOrEqual": + return ConditionOperator.LessThanOrEqual; + } + return null; + } + } } diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/EmailNotification.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/EmailNotification.cs index 7e1f1c8542d7..2e0a41b14557 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/EmailNotification.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/EmailNotification.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -25,7 +25,10 @@ public partial class EmailNotification /// /// Initializes a new instance of the EmailNotification class. /// - public EmailNotification() { } + public EmailNotification() + { + CustomInit(); + } /// /// Initializes a new instance of the EmailNotification class. @@ -42,8 +45,14 @@ public EmailNotification() { } SendToSubscriptionAdministrator = sendToSubscriptionAdministrator; SendToSubscriptionCoAdministrators = sendToSubscriptionCoAdministrators; CustomEmails = customEmails; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets a value indicating whether to send email to /// subscription administrator. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/EmailReceiver.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/EmailReceiver.cs new file mode 100644 index 000000000000..74ea59154c67 --- /dev/null +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/EmailReceiver.cs @@ -0,0 +1,91 @@ +// 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.Monitor.Management.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Monitor; + using Microsoft.Azure.Management.Monitor.Management; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// An email receiver. + /// + public partial class EmailReceiver + { + /// + /// Initializes a new instance of the EmailReceiver class. + /// + public EmailReceiver() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EmailReceiver class. + /// + /// The name of the email receiver. Names must be + /// unique across all receivers within an action group. + /// The email address of this + /// receiver. + /// Possible values include: 'NotSpecified', + /// 'Enabled', 'Disabled' + public EmailReceiver(string name, string emailAddress, ReceiverStatus? status = default(ReceiverStatus?)) + { + Name = name; + EmailAddress = emailAddress; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the email receiver. Names must be unique + /// across all receivers within an action group. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the email address of this receiver. + /// + [JsonProperty(PropertyName = "emailAddress")] + public string EmailAddress { get; set; } + + /// + /// Gets possible values include: 'NotSpecified', 'Enabled', 'Disabled' + /// + [JsonProperty(PropertyName = "status")] + public ReceiverStatus? Status { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (EmailAddress == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "EmailAddress"); + } + } + } +} diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/EnableRequest.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/EnableRequest.cs new file mode 100644 index 000000000000..9159921aaacc --- /dev/null +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/EnableRequest.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. + +namespace Microsoft.Azure.Management.Monitor.Management.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Monitor; + using Microsoft.Azure.Management.Monitor.Management; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Describes a receiver that should be resubscribed. + /// + public partial class EnableRequest + { + /// + /// Initializes a new instance of the EnableRequest class. + /// + public EnableRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EnableRequest class. + /// + /// The name of the receiver to + /// resubscribe. + public EnableRequest(string receiverName) + { + ReceiverName = receiverName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the receiver to resubscribe. + /// + [JsonProperty(PropertyName = "receiverName")] + public string ReceiverName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ReceiverName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ReceiverName"); + } + } + } +} diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ErrorResponse.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ErrorResponse.cs index c753131d8a67..38e824a80ded 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ErrorResponse.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ErrorResponse.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -23,7 +23,10 @@ public partial class ErrorResponse /// /// Initializes a new instance of the ErrorResponse class. /// - public ErrorResponse() { } + public ErrorResponse() + { + CustomInit(); + } /// /// Initializes a new instance of the ErrorResponse class. @@ -35,8 +38,14 @@ public ErrorResponse() { } { Code = code; Message = message; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets error code /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ErrorResponseException.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ErrorResponseException.cs index 78e8024f51fa..746eb871c4de 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ErrorResponseException.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ErrorResponseException.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -18,9 +18,6 @@ namespace Microsoft.Azure.Management.Monitor.Management.Models /// Exception thrown for an invalid response with ErrorResponse /// information. /// -#if LEGACY - [System.Serializable] -#endif public class ErrorResponseException : RestException { /// @@ -63,39 +60,5 @@ public ErrorResponseException(string message, System.Exception innerException) : base(message, innerException) { } - -#if LEGACY - /// - /// Initializes a new instance of the ErrorResponseException class. - /// - /// Serialization info. - /// Streaming context. - protected ErrorResponseException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) - : base(info, context) - { - } - - /// - /// Serializes content of the exception. - /// - /// Serialization info. - /// Streaming context. - /// - /// Thrown when a required parameter is null - /// - [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, SerializationFormatter = true)] - public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) - { - base.GetObjectData(info, context); - if (info == null) - { - throw new System.ArgumentNullException("info"); - } - - info.AddValue("Request", Request); - info.AddValue("Response", Response); - info.AddValue("Body", Body); - } -#endif } } diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Incident.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Incident.cs index 8effcf3f8462..61558b61f733 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Incident.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Incident.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -23,7 +23,10 @@ public partial class Incident /// /// Initializes a new instance of the Incident class. /// - public Incident() { } + public Incident() + { + CustomInit(); + } /// /// Initializes a new instance of the Incident class. @@ -45,8 +48,14 @@ public Incident() { } IsActive = isActive; ActivatedTime = activatedTime; ResolvedTime = resolvedTime; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets incident name. /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LocationThresholdRuleCondition.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LocationThresholdRuleCondition.cs index f215e8d9bf99..9e53d3de1325 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LocationThresholdRuleCondition.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LocationThresholdRuleCondition.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -12,6 +12,7 @@ namespace Microsoft.Azure.Management.Monitor.Management.Models using Microsoft.Azure.Management; using Microsoft.Azure.Management.Monitor; using Microsoft.Azure.Management.Monitor.Management; + using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -25,7 +26,10 @@ public partial class LocationThresholdRuleCondition : RuleCondition /// Initializes a new instance of the LocationThresholdRuleCondition /// class. /// - public LocationThresholdRuleCondition() { } + public LocationThresholdRuleCondition() + { + CustomInit(); + } /// /// Initializes a new instance of the LocationThresholdRuleCondition @@ -45,8 +49,14 @@ public LocationThresholdRuleCondition() { } { WindowSize = windowSize; FailedLocationCount = failedLocationCount; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the period of time (in ISO 8601 duration format) that /// is used to monitor alert activity based on the threshold. If @@ -65,12 +75,15 @@ public LocationThresholdRuleCondition() { } /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { - //Nothing to validate + if (FailedLocationCount < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "FailedLocationCount", 0); + } } } } diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LogProfileResource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LogProfileResource.cs index c76ca0045be4..fa5ffe9fc05a 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LogProfileResource.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LogProfileResource.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -28,7 +28,10 @@ public partial class LogProfileResource : Resource /// /// Initializes a new instance of the LogProfileResource class. /// - public LogProfileResource() { } + public LogProfileResource() + { + CustomInit(); + } /// /// Initializes a new instance of the LogProfileResource class. @@ -61,8 +64,14 @@ public LogProfileResource() { } Locations = locations; Categories = categories; RetentionPolicy = retentionPolicy; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the resource id of the storage account to which you /// would like to send the Activity Log. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LogProfileResourcePatch.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LogProfileResourcePatch.cs new file mode 100644 index 000000000000..8a8dfbbe7447 --- /dev/null +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LogProfileResourcePatch.cs @@ -0,0 +1,141 @@ +// 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.Monitor.Management.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Monitor; + using Microsoft.Azure.Management.Monitor.Management; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The log profile resource for patch operations. + /// + [Rest.Serialization.JsonTransformation] + public partial class LogProfileResourcePatch + { + /// + /// Initializes a new instance of the LogProfileResourcePatch class. + /// + public LogProfileResourcePatch() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LogProfileResourcePatch class. + /// + /// List of regions for which Activity Log + /// events should be stored or streamed. It is a comma separated list + /// of valid ARM locations including the 'global' location. + /// the categories of the logs. These + /// categories are created as is convenient to the user. Some values + /// are: 'Write', 'Delete', and/or 'Action.' + /// the retention policy for the events + /// in the log. + /// Resource tags + /// the resource id of the storage + /// account to which you would like to send the Activity Log. + /// The service bus rule ID of the + /// service bus namespace in which you would like to have Event Hubs + /// created for streaming the Activity Log. The rule ID is of the + /// format: '{service bus resource ID}/authorizationrules/{key + /// name}'. + public LogProfileResourcePatch(IList locations, IList categories, RetentionPolicy retentionPolicy, IDictionary tags = default(IDictionary), string storageAccountId = default(string), string serviceBusRuleId = default(string)) + { + Tags = tags; + StorageAccountId = storageAccountId; + ServiceBusRuleId = serviceBusRuleId; + Locations = locations; + Categories = categories; + RetentionPolicy = retentionPolicy; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resource tags + /// + [JsonProperty(PropertyName = "tags")] + public IDictionary Tags { get; set; } + + /// + /// Gets or sets the resource id of the storage account to which you + /// would like to send the Activity Log. + /// + [JsonProperty(PropertyName = "properties.storageAccountId")] + public string StorageAccountId { get; set; } + + /// + /// Gets or sets the service bus rule ID of the service bus namespace + /// in which you would like to have Event Hubs created for streaming + /// the Activity Log. The rule ID is of the format: '{service bus + /// resource ID}/authorizationrules/{key name}'. + /// + [JsonProperty(PropertyName = "properties.serviceBusRuleId")] + public string ServiceBusRuleId { get; set; } + + /// + /// Gets or sets list of regions for which Activity Log events should + /// be stored or streamed. It is a comma separated list of valid ARM + /// locations including the 'global' location. + /// + [JsonProperty(PropertyName = "properties.locations")] + public IList Locations { get; set; } + + /// + /// Gets or sets the categories of the logs. These categories are + /// created as is convenient to the user. Some values are: 'Write', + /// 'Delete', and/or 'Action.' + /// + [JsonProperty(PropertyName = "properties.categories")] + public IList Categories { get; set; } + + /// + /// Gets or sets the retention policy for the events in the log. + /// + [JsonProperty(PropertyName = "properties.retentionPolicy")] + public RetentionPolicy RetentionPolicy { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Locations == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Locations"); + } + if (Categories == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Categories"); + } + if (RetentionPolicy == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RetentionPolicy"); + } + if (RetentionPolicy != null) + { + RetentionPolicy.Validate(); + } + } + } +} diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LogSettings.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LogSettings.cs index 6be7f29a2b61..56ec479b513e 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LogSettings.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LogSettings.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -24,7 +24,10 @@ public partial class LogSettings /// /// Initializes a new instance of the LogSettings class. /// - public LogSettings() { } + public LogSettings() + { + CustomInit(); + } /// /// Initializes a new instance of the LogSettings class. @@ -42,8 +45,14 @@ public LogSettings() { } Category = category; Enabled = enabled; RetentionPolicy = retentionPolicy; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets name of a Diagnostic Log category for a resource type /// this setting is applied to. To obtain the list of Diagnostic Log diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ManagementEventAggregationCondition.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ManagementEventAggregationCondition.cs index e0c331d5442c..89d7c733f16e 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ManagementEventAggregationCondition.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ManagementEventAggregationCondition.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -24,7 +24,10 @@ public partial class ManagementEventAggregationCondition /// Initializes a new instance of the /// ManagementEventAggregationCondition class. /// - public ManagementEventAggregationCondition() { } + public ManagementEventAggregationCondition() + { + CustomInit(); + } /// /// Initializes a new instance of the @@ -44,8 +47,14 @@ public ManagementEventAggregationCondition() { } OperatorProperty = operatorProperty; Threshold = threshold; WindowSize = windowSize; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the condition operator. Possible values include: /// 'GreaterThan', 'GreaterThanOrEqual', 'LessThan', 'LessThanOrEqual' diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ManagementEventRuleCondition.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ManagementEventRuleCondition.cs index 4ba6d03feba1..6f6e857ed2f5 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ManagementEventRuleCondition.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ManagementEventRuleCondition.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -25,7 +25,10 @@ public partial class ManagementEventRuleCondition : RuleCondition /// Initializes a new instance of the ManagementEventRuleCondition /// class. /// - public ManagementEventRuleCondition() { } + public ManagementEventRuleCondition() + { + CustomInit(); + } /// /// Initializes a new instance of the ManagementEventRuleCondition @@ -42,8 +45,14 @@ public ManagementEventRuleCondition() { } : base(dataSource) { Aggregation = aggregation; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets how the data that is collected should be combined over /// time and when the alert is activated. Note that for management diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/MetricSettings.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/MetricSettings.cs index 04a9a5e3437e..f874dd9cdb03 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/MetricSettings.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/MetricSettings.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -24,7 +24,10 @@ public partial class MetricSettings /// /// Initializes a new instance of the MetricSettings class. /// - public MetricSettings() { } + public MetricSettings() + { + CustomInit(); + } /// /// Initializes a new instance of the MetricSettings class. @@ -40,8 +43,14 @@ public MetricSettings() { } TimeGrain = timeGrain; Enabled = enabled; RetentionPolicy = retentionPolicy; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the timegrain of the metric in ISO8601 format. /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/MetricStatisticType.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/MetricStatisticType.cs index 494a6e8e37ae..7ee5134306b4 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/MetricStatisticType.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/MetricStatisticType.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -32,4 +32,41 @@ public enum MetricStatisticType [EnumMember(Value = "Sum")] Sum } + internal static class MetricStatisticTypeEnumExtension + { + internal static string ToSerializedValue(this MetricStatisticType? value) => + value == null ? null : ((MetricStatisticType)value).ToSerializedValue(); + + internal static string ToSerializedValue(this MetricStatisticType value) + { + switch( value ) + { + case MetricStatisticType.Average: + return "Average"; + case MetricStatisticType.Min: + return "Min"; + case MetricStatisticType.Max: + return "Max"; + case MetricStatisticType.Sum: + return "Sum"; + } + return null; + } + + internal static MetricStatisticType? ParseMetricStatisticType(this string value) + { + switch( value ) + { + case "Average": + return MetricStatisticType.Average; + case "Min": + return MetricStatisticType.Min; + case "Max": + return MetricStatisticType.Max; + case "Sum": + return MetricStatisticType.Sum; + } + return null; + } + } } diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/MetricTrigger.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/MetricTrigger.cs index bc3469aba69b..8b8350772a70 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/MetricTrigger.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/MetricTrigger.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -24,7 +24,10 @@ public partial class MetricTrigger /// /// Initializes a new instance of the MetricTrigger class. /// - public MetricTrigger() { } + public MetricTrigger() + { + CustomInit(); + } /// /// Initializes a new instance of the MetricTrigger class. @@ -64,8 +67,14 @@ public MetricTrigger(string metricName, string metricResourceUri, System.TimeSpa TimeAggregation = timeAggregation; OperatorProperty = operatorProperty; Threshold = threshold; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the name of the metric that defines what the rule /// monitors. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Page.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Page.cs index 408b9e0bb1ca..830bedba0c87 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Page.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Page.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Page1.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Page1.cs index 68f4aad4a4c3..df3027b61878 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Page1.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Page1.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ReceiverStatus.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ReceiverStatus.cs new file mode 100644 index 000000000000..690584c0816c --- /dev/null +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ReceiverStatus.cs @@ -0,0 +1,66 @@ +// 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.Monitor.Management.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Monitor; + using Microsoft.Azure.Management.Monitor.Management; + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for ReceiverStatus. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum ReceiverStatus + { + [EnumMember(Value = "NotSpecified")] + NotSpecified, + [EnumMember(Value = "Enabled")] + Enabled, + [EnumMember(Value = "Disabled")] + Disabled + } + internal static class ReceiverStatusEnumExtension + { + internal static string ToSerializedValue(this ReceiverStatus? value) => + value == null ? null : ((ReceiverStatus)value).ToSerializedValue(); + + internal static string ToSerializedValue(this ReceiverStatus value) + { + switch( value ) + { + case ReceiverStatus.NotSpecified: + return "NotSpecified"; + case ReceiverStatus.Enabled: + return "Enabled"; + case ReceiverStatus.Disabled: + return "Disabled"; + } + return null; + } + + internal static ReceiverStatus? ParseReceiverStatus(this string value) + { + switch( value ) + { + case "NotSpecified": + return ReceiverStatus.NotSpecified; + case "Enabled": + return ReceiverStatus.Enabled; + case "Disabled": + return ReceiverStatus.Disabled; + } + return null; + } + } +} diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Recurrence.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Recurrence.cs index cf58ba7ef110..f21ea0955590 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Recurrence.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Recurrence.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -25,7 +25,10 @@ public partial class Recurrence /// /// Initializes a new instance of the Recurrence class. /// - public Recurrence() { } + public Recurrence() + { + CustomInit(); + } /// /// Initializes a new instance of the Recurrence class. @@ -41,8 +44,14 @@ public Recurrence(RecurrenceFrequency frequency, RecurrentSchedule schedule) { Frequency = frequency; Schedule = schedule; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the recurrence frequency. How often the schedule /// profile should take effect. This value must be Week, meaning each diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RecurrenceFrequency.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RecurrenceFrequency.cs index 9e56a4995298..834742573103 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RecurrenceFrequency.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RecurrenceFrequency.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -40,4 +40,57 @@ public enum RecurrenceFrequency [EnumMember(Value = "Year")] Year } + internal static class RecurrenceFrequencyEnumExtension + { + internal static string ToSerializedValue(this RecurrenceFrequency? value) => + value == null ? null : ((RecurrenceFrequency)value).ToSerializedValue(); + + internal static string ToSerializedValue(this RecurrenceFrequency value) + { + switch( value ) + { + case RecurrenceFrequency.None: + return "None"; + case RecurrenceFrequency.Second: + return "Second"; + case RecurrenceFrequency.Minute: + return "Minute"; + case RecurrenceFrequency.Hour: + return "Hour"; + case RecurrenceFrequency.Day: + return "Day"; + case RecurrenceFrequency.Week: + return "Week"; + case RecurrenceFrequency.Month: + return "Month"; + case RecurrenceFrequency.Year: + return "Year"; + } + return null; + } + + internal static RecurrenceFrequency? ParseRecurrenceFrequency(this string value) + { + switch( value ) + { + case "None": + return RecurrenceFrequency.None; + case "Second": + return RecurrenceFrequency.Second; + case "Minute": + return RecurrenceFrequency.Minute; + case "Hour": + return RecurrenceFrequency.Hour; + case "Day": + return RecurrenceFrequency.Day; + case "Week": + return RecurrenceFrequency.Week; + case "Month": + return RecurrenceFrequency.Month; + case "Year": + return RecurrenceFrequency.Year; + } + return null; + } + } } diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RecurrentSchedule.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RecurrentSchedule.cs index d599fdb1ae14..0f05c74e4363 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RecurrentSchedule.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RecurrentSchedule.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -26,7 +26,10 @@ public partial class RecurrentSchedule /// /// Initializes a new instance of the RecurrentSchedule class. /// - public RecurrentSchedule() { } + public RecurrentSchedule() + { + CustomInit(); + } /// /// Initializes a new instance of the RecurrentSchedule class. @@ -87,8 +90,14 @@ public RecurrentSchedule(string timeZone, IList days, IList hours, Days = days; Hours = hours; Minutes = minutes; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the timezone for the hours of the profile. Some /// examples of valid timezones are: Dateline Standard Time, UTC-11, diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Resource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Resource.cs index 60d2843cb160..9f6a5684dfcf 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Resource.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Resource.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -27,7 +27,10 @@ public partial class Resource : IResource /// /// Initializes a new instance of the Resource class. /// - public Resource() { } + public Resource() + { + CustomInit(); + } /// /// Initializes a new instance of the Resource class. @@ -44,8 +47,14 @@ public Resource() { } Type = type; Location = location; Tags = tags; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets azure resource Id /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RetentionPolicy.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RetentionPolicy.cs index 5727f98cf864..6bb1495e19bd 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RetentionPolicy.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RetentionPolicy.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -24,7 +24,10 @@ public partial class RetentionPolicy /// /// Initializes a new instance of the RetentionPolicy class. /// - public RetentionPolicy() { } + public RetentionPolicy() + { + CustomInit(); + } /// /// Initializes a new instance of the RetentionPolicy class. @@ -37,8 +40,14 @@ public RetentionPolicy(bool enabled, int days) { Enabled = enabled; Days = days; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets a value indicating whether the retention policy is /// enabled. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleAction.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleAction.cs index 83ffa67d021a..0250fea579b2 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleAction.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleAction.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -23,8 +23,16 @@ public partial class RuleAction /// /// Initializes a new instance of the RuleAction class. /// - public RuleAction() { } + public RuleAction() + { + CustomInit(); + } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + } } diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleCondition.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleCondition.cs index 24a95e8b3395..48ffdccdf466 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleCondition.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleCondition.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -23,7 +23,10 @@ public partial class RuleCondition /// /// Initializes a new instance of the RuleCondition class. /// - public RuleCondition() { } + public RuleCondition() + { + CustomInit(); + } /// /// Initializes a new instance of the RuleCondition class. @@ -34,8 +37,14 @@ public RuleCondition() { } public RuleCondition(RuleDataSource dataSource = default(RuleDataSource)) { DataSource = dataSource; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the resource from which the rule collects its data. /// For this type dataSource will always be of type diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleDataSource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleDataSource.cs index 49989f658278..0ba640a3c1b0 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleDataSource.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleDataSource.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -23,7 +23,10 @@ public partial class RuleDataSource /// /// Initializes a new instance of the RuleDataSource class. /// - public RuleDataSource() { } + public RuleDataSource() + { + CustomInit(); + } /// /// Initializes a new instance of the RuleDataSource class. @@ -33,8 +36,14 @@ public RuleDataSource() { } public RuleDataSource(string resourceUri = default(string)) { ResourceUri = resourceUri; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the resource identifier of the resource the rule /// monitors. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleEmailAction.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleEmailAction.cs index 64903ebb348f..7e266177f49a 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleEmailAction.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleEmailAction.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -27,7 +27,10 @@ public partial class RuleEmailAction : RuleAction /// /// Initializes a new instance of the RuleEmailAction class. /// - public RuleEmailAction() { } + public RuleEmailAction() + { + CustomInit(); + } /// /// Initializes a new instance of the RuleEmailAction class. @@ -41,8 +44,14 @@ public RuleEmailAction() { } { SendToServiceOwners = sendToServiceOwners; CustomEmails = customEmails; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets whether the administrators (service and /// co-adiminstrators) of the service should be notified when the alert diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleManagementEventClaimsDataSource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleManagementEventClaimsDataSource.cs index c8839e8efd68..56de5a0d0ebc 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleManagementEventClaimsDataSource.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleManagementEventClaimsDataSource.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -24,7 +24,10 @@ public partial class RuleManagementEventClaimsDataSource /// Initializes a new instance of the /// RuleManagementEventClaimsDataSource class. /// - public RuleManagementEventClaimsDataSource() { } + public RuleManagementEventClaimsDataSource() + { + CustomInit(); + } /// /// Initializes a new instance of the @@ -34,8 +37,14 @@ public RuleManagementEventClaimsDataSource() { } public RuleManagementEventClaimsDataSource(string emailAddress = default(string)) { EmailAddress = emailAddress; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the email address. /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleManagementEventDataSource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleManagementEventDataSource.cs index 89a196840f04..3d0dc2e439bd 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleManagementEventDataSource.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleManagementEventDataSource.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -26,7 +26,10 @@ public partial class RuleManagementEventDataSource : RuleDataSource /// Initializes a new instance of the RuleManagementEventDataSource /// class. /// - public RuleManagementEventDataSource() { } + public RuleManagementEventDataSource() + { + CustomInit(); + } /// /// Initializes a new instance of the RuleManagementEventDataSource @@ -60,8 +63,14 @@ public RuleManagementEventDataSource() { } Status = status; SubStatus = subStatus; Claims = claims; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the event name. /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleMetricDataSource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleMetricDataSource.cs index ffb2d68b081b..ea042dcf8190 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleMetricDataSource.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleMetricDataSource.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -25,7 +25,10 @@ public partial class RuleMetricDataSource : RuleDataSource /// /// Initializes a new instance of the RuleMetricDataSource class. /// - public RuleMetricDataSource() { } + public RuleMetricDataSource() + { + CustomInit(); + } /// /// Initializes a new instance of the RuleMetricDataSource class. @@ -38,8 +41,14 @@ public RuleMetricDataSource() { } : base(resourceUri) { MetricName = metricName; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the name of the metric that defines what the rule /// monitors. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleWebhookAction.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleWebhookAction.cs index 12f3eb3f515f..f2d583404cae 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleWebhookAction.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleWebhookAction.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -27,7 +27,10 @@ public partial class RuleWebhookAction : RuleAction /// /// Initializes a new instance of the RuleWebhookAction class. /// - public RuleWebhookAction() { } + public RuleWebhookAction() + { + CustomInit(); + } /// /// Initializes a new instance of the RuleWebhookAction class. @@ -41,8 +44,14 @@ public RuleWebhookAction() { } { ServiceUri = serviceUri; Properties = properties; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the service uri to Post the notitication when the /// alert activates or resolves. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleAction.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleAction.cs index 2361169df41c..66df78509995 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleAction.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleAction.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -23,7 +23,10 @@ public partial class ScaleAction /// /// Initializes a new instance of the ScaleAction class. /// - public ScaleAction() { } + public ScaleAction() + { + CustomInit(); + } /// /// Initializes a new instance of the ScaleAction class. @@ -46,8 +49,14 @@ public ScaleAction() { } Type = type; Value = value; Cooldown = cooldown; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the scale direction. Whether the scaling action /// increases or decreases the number of instances. Possible values diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleCapacity.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleCapacity.cs index 38a9ef25bd74..de4097089222 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleCapacity.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleCapacity.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -24,7 +24,10 @@ public partial class ScaleCapacity /// /// Initializes a new instance of the ScaleCapacity class. /// - public ScaleCapacity() { } + public ScaleCapacity() + { + CustomInit(); + } /// /// Initializes a new instance of the ScaleCapacity class. @@ -43,8 +46,14 @@ public ScaleCapacity(string minimum, string maximum, string defaultProperty) Minimum = minimum; Maximum = maximum; DefaultProperty = defaultProperty; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the minimum number of instances for the resource. /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleDirection.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleDirection.cs index 4c01f081199c..4d4d16f0b1ae 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleDirection.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleDirection.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -30,4 +30,37 @@ public enum ScaleDirection [EnumMember(Value = "Decrease")] Decrease } + internal static class ScaleDirectionEnumExtension + { + internal static string ToSerializedValue(this ScaleDirection? value) => + value == null ? null : ((ScaleDirection)value).ToSerializedValue(); + + internal static string ToSerializedValue(this ScaleDirection value) + { + switch( value ) + { + case ScaleDirection.None: + return "None"; + case ScaleDirection.Increase: + return "Increase"; + case ScaleDirection.Decrease: + return "Decrease"; + } + return null; + } + + internal static ScaleDirection? ParseScaleDirection(this string value) + { + switch( value ) + { + case "None": + return ScaleDirection.None; + case "Increase": + return ScaleDirection.Increase; + case "Decrease": + return ScaleDirection.Decrease; + } + return null; + } + } } diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleRule.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleRule.cs index 473182613f00..f662f126aa45 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleRule.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleRule.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -24,7 +24,10 @@ public partial class ScaleRule /// /// Initializes a new instance of the ScaleRule class. /// - public ScaleRule() { } + public ScaleRule() + { + CustomInit(); + } /// /// Initializes a new instance of the ScaleRule class. @@ -37,8 +40,14 @@ public ScaleRule(MetricTrigger metricTrigger, ScaleAction scaleAction) { MetricTrigger = metricTrigger; ScaleAction = scaleAction; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the trigger that results in a scaling action. /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleType.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleType.cs index b8a78e5c8d73..06548d7caee3 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleType.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleType.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -30,4 +30,37 @@ public enum ScaleType [EnumMember(Value = "ExactCount")] ExactCount } + internal static class ScaleTypeEnumExtension + { + internal static string ToSerializedValue(this ScaleType? value) => + value == null ? null : ((ScaleType)value).ToSerializedValue(); + + internal static string ToSerializedValue(this ScaleType value) + { + switch( value ) + { + case ScaleType.ChangeCount: + return "ChangeCount"; + case ScaleType.PercentChangeCount: + return "PercentChangeCount"; + case ScaleType.ExactCount: + return "ExactCount"; + } + return null; + } + + internal static ScaleType? ParseScaleType(this string value) + { + switch( value ) + { + case "ChangeCount": + return ScaleType.ChangeCount; + case "PercentChangeCount": + return ScaleType.PercentChangeCount; + case "ExactCount": + return ScaleType.ExactCount; + } + return null; + } + } } diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ServiceDiagnosticSettingsResource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ServiceDiagnosticSettingsResource.cs index bbe5944ea918..f738bdb8c71d 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ServiceDiagnosticSettingsResource.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ServiceDiagnosticSettingsResource.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -29,7 +29,10 @@ public partial class ServiceDiagnosticSettingsResource : Resource /// Initializes a new instance of the ServiceDiagnosticSettingsResource /// class. /// - public ServiceDiagnosticSettingsResource() { } + public ServiceDiagnosticSettingsResource() + { + CustomInit(); + } /// /// Initializes a new instance of the ServiceDiagnosticSettingsResource @@ -64,8 +67,14 @@ public ServiceDiagnosticSettingsResource() { } Metrics = metrics; Logs = logs; WorkspaceId = workspaceId; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the resource ID of the storage account to which you /// would like to send Diagnostic Logs. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ServiceDiagnosticSettingsResourcePatch.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ServiceDiagnosticSettingsResourcePatch.cs new file mode 100644 index 000000000000..0d73d18e2459 --- /dev/null +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ServiceDiagnosticSettingsResourcePatch.cs @@ -0,0 +1,124 @@ +// 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.Monitor.Management.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Monitor; + using Microsoft.Azure.Management.Monitor.Management; + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Service diagnostic setting resource for patch operations + /// + [Rest.Serialization.JsonTransformation] + public partial class ServiceDiagnosticSettingsResourcePatch + { + /// + /// Initializes a new instance of the + /// ServiceDiagnosticSettingsResourcePatch class. + /// + public ServiceDiagnosticSettingsResourcePatch() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ServiceDiagnosticSettingsResourcePatch class. + /// + /// Resource tags + /// The resource ID of the storage + /// account to which you would like to send Diagnostic Logs. + /// The service bus rule ID of the + /// service bus namespace in which you would like to have Event Hubs + /// created for streaming Diagnostic Logs. The rule ID is of the + /// format: '{service bus resource ID}/authorizationrules/{key + /// name}'. + /// The resource Id for the + /// event hub authorization rule. + /// the list of metric settings. + /// the list of logs settings. + /// The workspace ID (resource ID of a Log + /// Analytics workspace) for a Log Analytics workspace to which you + /// would like to send Diagnostic Logs. Example: + /// /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2 + public ServiceDiagnosticSettingsResourcePatch(IDictionary tags = default(IDictionary), string storageAccountId = default(string), string serviceBusRuleId = default(string), string eventHubAuthorizationRuleId = default(string), IList metrics = default(IList), IList logs = default(IList), string workspaceId = default(string)) + { + Tags = tags; + StorageAccountId = storageAccountId; + ServiceBusRuleId = serviceBusRuleId; + EventHubAuthorizationRuleId = eventHubAuthorizationRuleId; + Metrics = metrics; + Logs = logs; + WorkspaceId = workspaceId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resource tags + /// + [JsonProperty(PropertyName = "tags")] + public IDictionary Tags { get; set; } + + /// + /// Gets or sets the resource ID of the storage account to which you + /// would like to send Diagnostic Logs. + /// + [JsonProperty(PropertyName = "properties.storageAccountId")] + public string StorageAccountId { get; set; } + + /// + /// Gets or sets the service bus rule ID of the service bus namespace + /// in which you would like to have Event Hubs created for streaming + /// Diagnostic Logs. The rule ID is of the format: '{service bus + /// resource ID}/authorizationrules/{key name}'. + /// + [JsonProperty(PropertyName = "properties.serviceBusRuleId")] + public string ServiceBusRuleId { get; set; } + + /// + /// Gets or sets the resource Id for the event hub authorization rule. + /// + [JsonProperty(PropertyName = "properties.eventHubAuthorizationRuleId")] + public string EventHubAuthorizationRuleId { get; set; } + + /// + /// Gets or sets the list of metric settings. + /// + [JsonProperty(PropertyName = "properties.metrics")] + public IList Metrics { get; set; } + + /// + /// Gets or sets the list of logs settings. + /// + [JsonProperty(PropertyName = "properties.logs")] + public IList Logs { get; set; } + + /// + /// Gets or sets the workspace ID (resource ID of a Log Analytics + /// workspace) for a Log Analytics workspace to which you would like to + /// send Diagnostic Logs. Example: + /// /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2 + /// + [JsonProperty(PropertyName = "properties.workspaceId")] + public string WorkspaceId { get; set; } + + } +} diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/SmsReceiver.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/SmsReceiver.cs new file mode 100644 index 000000000000..d75b7ecea194 --- /dev/null +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/SmsReceiver.cs @@ -0,0 +1,104 @@ +// 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.Monitor.Management.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Monitor; + using Microsoft.Azure.Management.Monitor.Management; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// An SMS receiver. + /// + public partial class SmsReceiver + { + /// + /// Initializes a new instance of the SmsReceiver class. + /// + public SmsReceiver() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SmsReceiver class. + /// + /// The name of the SMS receiver. Names must be + /// unique across all receivers within an action group. + /// The country code of the SMS + /// receiver. + /// The phone number of the SMS + /// receiver. + /// Possible values include: 'NotSpecified', + /// 'Enabled', 'Disabled' + public SmsReceiver(string name, string countryCode, string phoneNumber, ReceiverStatus? status = default(ReceiverStatus?)) + { + Name = name; + CountryCode = countryCode; + PhoneNumber = phoneNumber; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the SMS receiver. Names must be unique + /// across all receivers within an action group. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the country code of the SMS receiver. + /// + [JsonProperty(PropertyName = "countryCode")] + public string CountryCode { get; set; } + + /// + /// Gets or sets the phone number of the SMS receiver. + /// + [JsonProperty(PropertyName = "phoneNumber")] + public string PhoneNumber { get; set; } + + /// + /// Gets possible values include: 'NotSpecified', 'Enabled', 'Disabled' + /// + [JsonProperty(PropertyName = "status")] + public ReceiverStatus? Status { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (CountryCode == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "CountryCode"); + } + if (PhoneNumber == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PhoneNumber"); + } + } + } +} diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ThresholdRuleCondition.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ThresholdRuleCondition.cs index a63f2780e9f8..881912768dbe 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ThresholdRuleCondition.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ThresholdRuleCondition.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -24,7 +24,10 @@ public partial class ThresholdRuleCondition : RuleCondition /// /// Initializes a new instance of the ThresholdRuleCondition class. /// - public ThresholdRuleCondition() { } + public ThresholdRuleCondition() + { + CustomInit(); + } /// /// Initializes a new instance of the ThresholdRuleCondition class. @@ -53,8 +56,14 @@ public ThresholdRuleCondition() { } Threshold = threshold; WindowSize = windowSize; TimeAggregation = timeAggregation; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the operator used to compare the data and the /// threshold. Possible values include: 'GreaterThan', diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/TimeAggregationOperator.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/TimeAggregationOperator.cs index d2d1e250efb7..dbda98883d55 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/TimeAggregationOperator.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/TimeAggregationOperator.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -34,4 +34,45 @@ public enum TimeAggregationOperator [EnumMember(Value = "Last")] Last } + internal static class TimeAggregationOperatorEnumExtension + { + internal static string ToSerializedValue(this TimeAggregationOperator? value) => + value == null ? null : ((TimeAggregationOperator)value).ToSerializedValue(); + + internal static string ToSerializedValue(this TimeAggregationOperator value) + { + switch( value ) + { + case TimeAggregationOperator.Average: + return "Average"; + case TimeAggregationOperator.Minimum: + return "Minimum"; + case TimeAggregationOperator.Maximum: + return "Maximum"; + case TimeAggregationOperator.Total: + return "Total"; + case TimeAggregationOperator.Last: + return "Last"; + } + return null; + } + + internal static TimeAggregationOperator? ParseTimeAggregationOperator(this string value) + { + switch( value ) + { + case "Average": + return TimeAggregationOperator.Average; + case "Minimum": + return TimeAggregationOperator.Minimum; + case "Maximum": + return TimeAggregationOperator.Maximum; + case "Total": + return TimeAggregationOperator.Total; + case "Last": + return TimeAggregationOperator.Last; + } + return null; + } + } } diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/TimeAggregationType.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/TimeAggregationType.cs index 76bb1d476f91..007966cec29e 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/TimeAggregationType.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/TimeAggregationType.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -34,4 +34,45 @@ public enum TimeAggregationType [EnumMember(Value = "Count")] Count } + internal static class TimeAggregationTypeEnumExtension + { + internal static string ToSerializedValue(this TimeAggregationType? value) => + value == null ? null : ((TimeAggregationType)value).ToSerializedValue(); + + internal static string ToSerializedValue(this TimeAggregationType value) + { + switch( value ) + { + case TimeAggregationType.Average: + return "Average"; + case TimeAggregationType.Minimum: + return "Minimum"; + case TimeAggregationType.Maximum: + return "Maximum"; + case TimeAggregationType.Total: + return "Total"; + case TimeAggregationType.Count: + return "Count"; + } + return null; + } + + internal static TimeAggregationType? ParseTimeAggregationType(this string value) + { + switch( value ) + { + case "Average": + return TimeAggregationType.Average; + case "Minimum": + return TimeAggregationType.Minimum; + case "Maximum": + return TimeAggregationType.Maximum; + case "Total": + return TimeAggregationType.Total; + case "Count": + return TimeAggregationType.Count; + } + return null; + } + } } diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/TimeWindow.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/TimeWindow.cs index 384a166c45e0..bd74e471a10e 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/TimeWindow.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/TimeWindow.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -23,7 +23,10 @@ public partial class TimeWindow /// /// Initializes a new instance of the TimeWindow class. /// - public TimeWindow() { } + public TimeWindow() + { + CustomInit(); + } /// /// Initializes a new instance of the TimeWindow class. @@ -80,8 +83,14 @@ public TimeWindow() { } TimeZone = timeZone; Start = start; End = end; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the timezone of the start and end times for the /// profile. Some examples of valid timezones are: Dateline Standard diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/WebhookNotification.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/WebhookNotification.cs index 62750688dd79..6205162f0322 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/WebhookNotification.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/WebhookNotification.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -25,7 +25,10 @@ public partial class WebhookNotification /// /// Initializes a new instance of the WebhookNotification class. /// - public WebhookNotification() { } + public WebhookNotification() + { + CustomInit(); + } /// /// Initializes a new instance of the WebhookNotification class. @@ -38,8 +41,14 @@ public WebhookNotification() { } { ServiceUri = serviceUri; Properties = properties; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the service address to receive the notification. /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/WebhookReceiver.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/WebhookReceiver.cs new file mode 100644 index 000000000000..a94a6059bb89 --- /dev/null +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/WebhookReceiver.cs @@ -0,0 +1,82 @@ +// 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.Monitor.Management.Models +{ + using Microsoft.Azure; + using Microsoft.Azure.Management; + using Microsoft.Azure.Management.Monitor; + using Microsoft.Azure.Management.Monitor.Management; + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A webhook receiver. + /// + public partial class WebhookReceiver + { + /// + /// Initializes a new instance of the WebhookReceiver class. + /// + public WebhookReceiver() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WebhookReceiver class. + /// + /// The name of the webhook receiver. Names must be + /// unique across all receivers within an action group. + /// The URI where webhooks should be + /// sent. + public WebhookReceiver(string name, string serviceUri) + { + Name = name; + ServiceUri = serviceUri; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the webhook receiver. Names must be unique + /// across all receivers within an action group. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the URI where webhooks should be sent. + /// + [JsonProperty(PropertyName = "serviceUri")] + public string ServiceUri { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + if (ServiceUri == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ServiceUri"); + } + } + } +} diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/MonitorManagementClient.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/MonitorManagementClient.cs index dad9917e3114..0e7e433eb24b 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/MonitorManagementClient.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/MonitorManagementClient.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -23,7 +23,7 @@ namespace Microsoft.Azure.Management.Monitor.Management using System.Net.Http; /// - /// Composite Swagger for Monitor Management Client + /// Monitor Management Client /// public partial class MonitorManagementClient : ServiceClient, IMonitorManagementClient, IAzureClient { @@ -75,14 +75,14 @@ public partial class MonitorManagementClient : ServiceClient - /// Gets the IAlertRulesOperations. + /// Gets the IAlertRuleIncidentsOperations. /// - public virtual IAlertRulesOperations AlertRules { get; private set; } + public virtual IAlertRuleIncidentsOperations AlertRuleIncidents { get; private set; } /// - /// Gets the IAlertRuleIncidentsOperations. + /// Gets the IAlertRulesOperations. /// - public virtual IAlertRuleIncidentsOperations AlertRuleIncidents { get; private set; } + public virtual IAlertRulesOperations AlertRules { get; private set; } /// /// Gets the ILogProfilesOperations. @@ -94,6 +94,16 @@ public partial class MonitorManagementClient : ServiceClient public virtual IServiceDiagnosticSettingsOperations ServiceDiagnosticSettings { get; private set; } + /// + /// Gets the IActionGroupsOperations. + /// + public virtual IActionGroupsOperations ActionGroups { get; private set; } + + /// + /// Gets the IActivityLogAlertsOperations. + /// + public virtual IActivityLogAlertsOperations ActivityLogAlerts { get; private set; } + /// /// Initializes a new instance of the MonitorManagementClient class. /// @@ -296,10 +306,12 @@ public MonitorManagementClient(System.Uri baseUri, ServiceClientCredentials cred private void Initialize() { AutoscaleSettings = new AutoscaleSettingsOperations(this); - AlertRules = new AlertRulesOperations(this); AlertRuleIncidents = new AlertRuleIncidentsOperations(this); + AlertRules = new AlertRulesOperations(this); LogProfiles = new LogProfilesOperations(this); ServiceDiagnosticSettings = new ServiceDiagnosticSettingsOperations(this); + ActionGroups = new ActionGroupsOperations(this); + ActivityLogAlerts = new ActivityLogAlertsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ServiceDiagnosticSettingsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ServiceDiagnosticSettingsOperations.cs index b1c72ff89052..9dc17c29714c 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ServiceDiagnosticSettingsOperations.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ServiceDiagnosticSettingsOperations.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -458,7 +458,7 @@ internal ServiceDiagnosticSettingsOperations(MonitorManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> UpdateWithHttpMessagesAsync(string resourceUri, ServiceDiagnosticSettingsResource serviceDiagnosticSettingsResource, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpdateWithHttpMessagesAsync(string resourceUri, ServiceDiagnosticSettingsResourcePatch serviceDiagnosticSettingsResource, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceUri == null) { diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ServiceDiagnosticSettingsOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ServiceDiagnosticSettingsOperationsExtensions.cs index fd69889bc068..baab2bfa487e 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ServiceDiagnosticSettingsOperationsExtensions.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ServiceDiagnosticSettingsOperationsExtensions.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -114,7 +114,7 @@ public static ServiceDiagnosticSettingsResource CreateOrUpdate(this IServiceDiag /// /// Parameters supplied to the operation. /// - public static ServiceDiagnosticSettingsResource Update(this IServiceDiagnosticSettingsOperations operations, string resourceUri, ServiceDiagnosticSettingsResource serviceDiagnosticSettingsResource) + public static ServiceDiagnosticSettingsResource Update(this IServiceDiagnosticSettingsOperations operations, string resourceUri, ServiceDiagnosticSettingsResourcePatch serviceDiagnosticSettingsResource) { return operations.UpdateAsync(resourceUri, serviceDiagnosticSettingsResource).GetAwaiter().GetResult(); } @@ -136,7 +136,7 @@ public static ServiceDiagnosticSettingsResource Update(this IServiceDiagnosticSe /// /// The cancellation token. /// - public static async Task UpdateAsync(this IServiceDiagnosticSettingsOperations operations, string resourceUri, ServiceDiagnosticSettingsResource serviceDiagnosticSettingsResource, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task UpdateAsync(this IServiceDiagnosticSettingsOperations operations, string resourceUri, ServiceDiagnosticSettingsResourcePatch serviceDiagnosticSettingsResource, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceUri, serviceDiagnosticSettingsResource, null, cancellationToken).ConfigureAwait(false)) { diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/ActivityLogsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/ActivityLogsOperations.cs index ee13b672beaa..7ef78eba979e 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/ActivityLogsOperations.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/ActivityLogsOperations.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -52,37 +52,19 @@ internal ActivityLogsOperations(MonitorClient client) public MonitorClient Client { get; private set; } /// - /// Provides the list of records from the activity logs.<br>The - /// **$filter** is very restricted and allows only the following - /// patterns.<br>- List events for a resource group: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le - /// '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceGroupName eq '<ResourceGroupName>'.<br>- List events - /// for resource: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation' and resourceUri eq '<ResourceURI>'.<br>- List events - /// for a subscription: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation'.<br>-List events for a resource provider: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le - /// '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceProvider eq '<ResourceProviderName>'.<br>- List events - /// for a correlation Id: api-version=2014-04-01&$filter=eventTimestamp ge - /// '2014-07-16T04:36:37.6407898Z' and eventTimestamp le - /// '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and - /// correlationId eq '<CorrelationID>'.<br><br>**NOTE**: No - /// other syntax is allowed. + /// Provides the list of records from the activity logs. /// /// /// OData parameters to apply to the operation. /// /// - /// Used to fetch events with only the given properties. The filter is a comma - /// separated list of property names to be returned. Possible values are: - /// authorization, channels, claims, correlationId, description, eventDataId, - /// eventName, eventTimestamp, httpRequest, level, operationId, operationName, - /// properties, resourceGroupName, resourceProviderName, resourceId, status, - /// submissionTimestamp, subStatus, subscriptionId + /// Used to fetch events with only the given properties.<br>The + /// **$select** argument is a comma separated list of property names to be + /// returned. Possible values are: *authorization*, *claims*, *correlationId*, + /// *description*, *eventDataId*, *eventName*, *eventTimestamp*, *httpRequest*, + /// *level*, *operationId*, *operationName*, *properties*, *resourceGroupName*, + /// *resourceProviderName*, *resourceId*, *status*, *submissionTimestamp*, + /// *subStatus*, *subscriptionId* /// /// /// Headers that will be added to request. @@ -267,26 +249,7 @@ internal ActivityLogsOperations(MonitorClient client) } /// - /// Provides the list of records from the activity logs.<br>The - /// **$filter** is very restricted and allows only the following - /// patterns.<br>- List events for a resource group: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le - /// '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceGroupName eq '<ResourceGroupName>'.<br>- List events - /// for resource: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation' and resourceUri eq '<ResourceURI>'.<br>- List events - /// for a subscription: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation'.<br>-List events for a resource provider: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le - /// '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceProvider eq '<ResourceProviderName>'.<br>- List events - /// for a correlation Id: api-version=2014-04-01&$filter=eventTimestamp ge - /// '2014-07-16T04:36:37.6407898Z' and eventTimestamp le - /// '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and - /// correlationId eq '<CorrelationID>'.<br><br>**NOTE**: No - /// other syntax is allowed. + /// Provides the list of records from the activity logs. /// /// /// The NextLink from the previous successful call to List operation. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/ActivityLogsOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/ActivityLogsOperationsExtensions.cs index 3ee582d91815..9318e1dae378 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/ActivityLogsOperationsExtensions.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/ActivityLogsOperationsExtensions.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -23,26 +23,7 @@ namespace Microsoft.Azure.Management.Monitor public static partial class ActivityLogsOperationsExtensions { /// - /// Provides the list of records from the activity logs.<br>The - /// **$filter** is very restricted and allows only the following - /// patterns.<br>- List events for a resource group: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le - /// '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceGroupName eq '<ResourceGroupName>'.<br>- List events - /// for resource: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation' and resourceUri eq '<ResourceURI>'.<br>- List events - /// for a subscription: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation'.<br>-List events for a resource provider: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le - /// '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceProvider eq '<ResourceProviderName>'.<br>- List events - /// for a correlation Id: api-version=2014-04-01&$filter=eventTimestamp ge - /// '2014-07-16T04:36:37.6407898Z' and eventTimestamp le - /// '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and - /// correlationId eq '<CorrelationID>'.<br><br>**NOTE**: No - /// other syntax is allowed. + /// Provides the list of records from the activity logs. /// /// /// The operations group for this extension method. @@ -51,12 +32,13 @@ public static partial class ActivityLogsOperationsExtensions /// OData parameters to apply to the operation. /// /// - /// Used to fetch events with only the given properties. The filter is a comma - /// separated list of property names to be returned. Possible values are: - /// authorization, channels, claims, correlationId, description, eventDataId, - /// eventName, eventTimestamp, httpRequest, level, operationId, operationName, - /// properties, resourceGroupName, resourceProviderName, resourceId, status, - /// submissionTimestamp, subStatus, subscriptionId + /// Used to fetch events with only the given properties.<br>The + /// **$select** argument is a comma separated list of property names to be + /// returned. Possible values are: *authorization*, *claims*, *correlationId*, + /// *description*, *eventDataId*, *eventName*, *eventTimestamp*, *httpRequest*, + /// *level*, *operationId*, *operationName*, *properties*, *resourceGroupName*, + /// *resourceProviderName*, *resourceId*, *status*, *submissionTimestamp*, + /// *subStatus*, *subscriptionId* /// public static IPage List(this IActivityLogsOperations operations, ODataQuery odataQuery = default(ODataQuery), string select = default(string)) { @@ -64,26 +46,7 @@ public static partial class ActivityLogsOperationsExtensions } /// - /// Provides the list of records from the activity logs.<br>The - /// **$filter** is very restricted and allows only the following - /// patterns.<br>- List events for a resource group: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le - /// '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceGroupName eq '<ResourceGroupName>'.<br>- List events - /// for resource: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation' and resourceUri eq '<ResourceURI>'.<br>- List events - /// for a subscription: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation'.<br>-List events for a resource provider: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le - /// '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceProvider eq '<ResourceProviderName>'.<br>- List events - /// for a correlation Id: api-version=2014-04-01&$filter=eventTimestamp ge - /// '2014-07-16T04:36:37.6407898Z' and eventTimestamp le - /// '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and - /// correlationId eq '<CorrelationID>'.<br><br>**NOTE**: No - /// other syntax is allowed. + /// Provides the list of records from the activity logs. /// /// /// The operations group for this extension method. @@ -92,12 +55,13 @@ public static partial class ActivityLogsOperationsExtensions /// OData parameters to apply to the operation. /// /// - /// Used to fetch events with only the given properties. The filter is a comma - /// separated list of property names to be returned. Possible values are: - /// authorization, channels, claims, correlationId, description, eventDataId, - /// eventName, eventTimestamp, httpRequest, level, operationId, operationName, - /// properties, resourceGroupName, resourceProviderName, resourceId, status, - /// submissionTimestamp, subStatus, subscriptionId + /// Used to fetch events with only the given properties.<br>The + /// **$select** argument is a comma separated list of property names to be + /// returned. Possible values are: *authorization*, *claims*, *correlationId*, + /// *description*, *eventDataId*, *eventName*, *eventTimestamp*, *httpRequest*, + /// *level*, *operationId*, *operationName*, *properties*, *resourceGroupName*, + /// *resourceProviderName*, *resourceId*, *status*, *submissionTimestamp*, + /// *subStatus*, *subscriptionId* /// /// /// The cancellation token. @@ -111,26 +75,7 @@ public static partial class ActivityLogsOperationsExtensions } /// - /// Provides the list of records from the activity logs.<br>The - /// **$filter** is very restricted and allows only the following - /// patterns.<br>- List events for a resource group: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le - /// '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceGroupName eq '<ResourceGroupName>'.<br>- List events - /// for resource: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation' and resourceUri eq '<ResourceURI>'.<br>- List events - /// for a subscription: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation'.<br>-List events for a resource provider: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le - /// '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceProvider eq '<ResourceProviderName>'.<br>- List events - /// for a correlation Id: api-version=2014-04-01&$filter=eventTimestamp ge - /// '2014-07-16T04:36:37.6407898Z' and eventTimestamp le - /// '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and - /// correlationId eq '<CorrelationID>'.<br><br>**NOTE**: No - /// other syntax is allowed. + /// Provides the list of records from the activity logs. /// /// /// The operations group for this extension method. @@ -144,26 +89,7 @@ public static IPage ListNext(this IActivityLogsOperations operations, } /// - /// Provides the list of records from the activity logs.<br>The - /// **$filter** is very restricted and allows only the following - /// patterns.<br>- List events for a resource group: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le - /// '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceGroupName eq '<ResourceGroupName>'.<br>- List events - /// for resource: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation' and resourceUri eq '<ResourceURI>'.<br>- List events - /// for a subscription: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation'.<br>-List events for a resource provider: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le - /// '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceProvider eq '<ResourceProviderName>'.<br>- List events - /// for a correlation Id: api-version=2014-04-01&$filter=eventTimestamp ge - /// '2014-07-16T04:36:37.6407898Z' and eventTimestamp le - /// '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and - /// correlationId eq '<CorrelationID>'.<br><br>**NOTE**: No - /// other syntax is allowed. + /// Provides the list of records from the activity logs. /// /// /// The operations group for this extension method. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/EventCategoriesOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/EventCategoriesOperations.cs index 668ab8facaa5..d93d00c96d2a 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/EventCategoriesOperations.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/EventCategoriesOperations.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/EventCategoriesOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/EventCategoriesOperationsExtensions.cs index cf60aa81c791..556ccfe3ac9e 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/EventCategoriesOperationsExtensions.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/EventCategoriesOperationsExtensions.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IActivityLogsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IActivityLogsOperations.cs index 13a9fd76d3fa..51debc7e5b57 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IActivityLogsOperations.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IActivityLogsOperations.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -25,41 +25,20 @@ namespace Microsoft.Azure.Management.Monitor public partial interface IActivityLogsOperations { /// - /// Provides the list of records from the activity logs.<br>The - /// **$filter** is very restricted and allows only the following - /// patterns.<br>- List events for a resource group: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp - /// le '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceGroupName eq '<ResourceGroupName>'.<br>- List - /// events for resource: $filter=eventTimestamp ge '<Start Time>' - /// and eventTimestamp le '<End Time>' and eventChannels eq - /// 'Admin, Operation' and resourceUri eq - /// '<ResourceURI>'.<br>- List events for a subscription: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp - /// le '<End Time>' and eventChannels eq 'Admin, - /// Operation'.<br>-List events for a resource provider: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp - /// le '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceProvider eq '<ResourceProviderName>'.<br>- List - /// events for a correlation Id: - /// api-version=2014-04-01&$filter=eventTimestamp ge - /// '2014-07-16T04:36:37.6407898Z' and eventTimestamp le - /// '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, - /// Operation' and correlationId eq - /// '<CorrelationID>'.<br><br>**NOTE**: No other - /// syntax is allowed. + /// Provides the list of records from the activity logs. /// /// /// OData parameters to apply to the operation. /// /// - /// Used to fetch events with only the given properties. The filter is - /// a comma separated list of property names to be returned. Possible - /// values are: authorization, channels, claims, correlationId, - /// description, eventDataId, eventName, eventTimestamp, httpRequest, - /// level, operationId, operationName, properties, resourceGroupName, - /// resourceProviderName, resourceId, status, submissionTimestamp, - /// subStatus, subscriptionId + /// Used to fetch events with only the given properties.<br>The + /// **$select** argument is a comma separated list of property names to + /// be returned. Possible values are: *authorization*, *claims*, + /// *correlationId*, *description*, *eventDataId*, *eventName*, + /// *eventTimestamp*, *httpRequest*, *level*, *operationId*, + /// *operationName*, *properties*, *resourceGroupName*, + /// *resourceProviderName*, *resourceId*, *status*, + /// *submissionTimestamp*, *subStatus*, *subscriptionId* /// /// /// The headers that will be added to request. @@ -78,29 +57,7 @@ public partial interface IActivityLogsOperations /// Task>> ListWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), string select = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Provides the list of records from the activity logs.<br>The - /// **$filter** is very restricted and allows only the following - /// patterns.<br>- List events for a resource group: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp - /// le '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceGroupName eq '<ResourceGroupName>'.<br>- List - /// events for resource: $filter=eventTimestamp ge '<Start Time>' - /// and eventTimestamp le '<End Time>' and eventChannels eq - /// 'Admin, Operation' and resourceUri eq - /// '<ResourceURI>'.<br>- List events for a subscription: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp - /// le '<End Time>' and eventChannels eq 'Admin, - /// Operation'.<br>-List events for a resource provider: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp - /// le '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceProvider eq '<ResourceProviderName>'.<br>- List - /// events for a correlation Id: - /// api-version=2014-04-01&$filter=eventTimestamp ge - /// '2014-07-16T04:36:37.6407898Z' and eventTimestamp le - /// '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, - /// Operation' and correlationId eq - /// '<CorrelationID>'.<br><br>**NOTE**: No other - /// syntax is allowed. + /// Provides the list of records from the activity logs. /// /// /// The NextLink from the previous successful call to List operation. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IEventCategoriesOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IEventCategoriesOperations.cs index 289cc5aae09b..52969d4e2361 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IEventCategoriesOperations.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IEventCategoriesOperations.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IMetricDefinitionsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IMetricDefinitionsOperations.cs index 34ad354c9200..9f08a27de635 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IMetricDefinitionsOperations.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IMetricDefinitionsOperations.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -25,14 +25,7 @@ namespace Microsoft.Azure.Management.Monitor public partial interface IMetricDefinitionsOperations { /// - /// Lists the metric definitions for the resource.<br>The - /// **$filter** parameter is optional, and can be used to only retrieve - /// certain metric definitions.<br>For example, get just the - /// definition for the CPU percentage counter: $filter=name.value eq - /// '\Processor(_Total)\% Processor Time'.<br>This **$filter** is - /// very restricted and allows only clauses of the form **'name eq - /// <value>'** separated by **or** logical - /// operators.<br>**NOTE**: No other syntax is allowed. + /// Lists the metric definitions for the resource. /// /// /// The identifier of the resource. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IMetricsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IMetricsOperations.cs index edcb0d334673..36f739236870 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IMetricsOperations.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IMetricsOperations.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -25,28 +25,7 @@ namespace Microsoft.Azure.Management.Monitor public partial interface IMetricsOperations { /// - /// Lists the metric values for a resource.<br>The **$filter** is - /// used to reduce the set of metric data returned. Some common - /// properties for this expression will be: name.value, - /// aggregationType, startTime, endTime, timeGrain.<br>The filter - /// expression uses these properties with comparison operators (eg. eq, - /// gt, lt) and multiple expressions can be combined with parentheses - /// and 'and/or' logical operators.<br>Some example filter - /// expressions are:<br>- $filter=(name.value eq 'RunsSucceeded') - /// and aggregationType eq 'Total' and startTime eq 2016-02-20 and - /// endTime eq 2016-02-21 and timeGrain eq duration'PT1M',<br>- - /// $filter=(name.value eq 'RunsSucceeded') and (aggregationType eq - /// 'Total' or aggregationType eq 'Average') and startTime eq - /// 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq - /// duration'PT1H',<br>- $filter=(name.value eq - /// 'ActionsCompleted' or name.value eq 'RunsSucceeded') and - /// (aggregationType eq 'Total' or aggregationType eq 'Average') and - /// startTime eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq - /// duration'PT1M'.<br><br> >**NOTE**: When a metrics - /// query comes in with multiple metrics, but with no aggregation types - /// defined, the service will pick the Primary aggregation type of the - /// first metrics to be used as the default aggregation type for all - /// the metrics. + /// Lists the metric values for a resource. /// /// /// The identifier of the resource. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IMonitorClient.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IMonitorClient.cs index 23bad4baa67f..6ec69f8f88eb 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IMonitorClient.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IMonitorClient.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.Monitor using Newtonsoft.Json; /// - /// Composite Swagger for Monitor Client + /// Monitor Client /// public partial interface IMonitorClient : System.IDisposable { @@ -69,14 +69,14 @@ public partial interface IMonitorClient : System.IDisposable IUsageMetricsOperations UsageMetrics { get; } /// - /// Gets the IEventCategoriesOperations. + /// Gets the IActivityLogsOperations. /// - IEventCategoriesOperations EventCategories { get; } + IActivityLogsOperations ActivityLogs { get; } /// - /// Gets the IActivityLogsOperations. + /// Gets the IEventCategoriesOperations. /// - IActivityLogsOperations ActivityLogs { get; } + IEventCategoriesOperations EventCategories { get; } /// /// Gets the ITenantActivityLogsOperations. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/ITenantActivityLogsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/ITenantActivityLogsOperations.cs index 59786e256ae2..169f8c29bcf5 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/ITenantActivityLogsOperations.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/ITenantActivityLogsOperations.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -31,40 +31,20 @@ public partial interface ITenantActivityLogsOperations /// etc.).<br>One thing to point out here is that this API does /// *not* retrieve the logs at the individual subscription of the /// tenant but only surfaces the logs that were generated at the tenant - /// level.<br>The **$filter** is very restricted and allows only - /// the following patterns.<br>- List events for a resource - /// group: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation' and resourceGroupName eq - /// '<ResourceGroupName>'.<br>- List events for resource: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp - /// le '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceUri eq '<ResourceURI>'.<br>- List events for a - /// subscription: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation'.<br>- List evetns for a resource provider: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp - /// le '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceProvider eq '<ResourceProviderName>'.<br>- List - /// events for a correlation Id: - /// api-version=2014-04-01&$filter=eventTimestamp ge - /// '2014-07-16T04:36:37.6407898Z' and eventTimestamp le - /// '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, - /// Operation' and correlationId eq - /// '<CorrelationID>'.<br>**NOTE**: No other syntax is - /// allowed. + /// level. /// /// /// OData parameters to apply to the operation. /// /// - /// Used to fetch events with only the given properties. The filter is - /// a comma separated list of property names to be returned. Possible - /// values are: authorization, channels, claims, correlationId, - /// description, eventDataId, eventName, eventTimestamp, httpRequest, - /// level, operationId, operationName, properties, resourceGroupName, - /// resourceProviderName, resourceId, status, submissionTimestamp, - /// subStatus, subscriptionId + /// Used to fetch events with only the given properties.<br>The + /// **$select** argument is a comma separated list of property names to + /// be returned. Possible values are: *authorization*, *claims*, + /// *correlationId*, *description*, *eventDataId*, *eventName*, + /// *eventTimestamp*, *httpRequest*, *level*, *operationId*, + /// *operationName*, *properties*, *resourceGroupName*, + /// *resourceProviderName*, *resourceId*, *status*, + /// *submissionTimestamp*, *subStatus*, *subscriptionId* /// /// /// The headers that will be added to request. @@ -89,28 +69,7 @@ public partial interface ITenantActivityLogsOperations /// etc.).<br>One thing to point out here is that this API does /// *not* retrieve the logs at the individual subscription of the /// tenant but only surfaces the logs that were generated at the tenant - /// level.<br>The **$filter** is very restricted and allows only - /// the following patterns.<br>- List events for a resource - /// group: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation' and resourceGroupName eq - /// '<ResourceGroupName>'.<br>- List events for resource: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp - /// le '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceUri eq '<ResourceURI>'.<br>- List events for a - /// subscription: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation'.<br>- List evetns for a resource provider: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp - /// le '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceProvider eq '<ResourceProviderName>'.<br>- List - /// events for a correlation Id: - /// api-version=2014-04-01&$filter=eventTimestamp ge - /// '2014-07-16T04:36:37.6407898Z' and eventTimestamp le - /// '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, - /// Operation' and correlationId eq - /// '<CorrelationID>'.<br>**NOTE**: No other syntax is - /// allowed. + /// level. /// /// /// The NextLink from the previous successful call to List operation. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IUsageMetricsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IUsageMetricsOperations.cs index d9eea0bec7d0..8b5268022e2e 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IUsageMetricsOperations.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IUsageMetricsOperations.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricDefinitionsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricDefinitionsOperations.cs index b0207515a84e..25062fdab1e5 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricDefinitionsOperations.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricDefinitionsOperations.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -52,13 +52,7 @@ internal MetricDefinitionsOperations(MonitorClient client) public MonitorClient Client { get; private set; } /// - /// Lists the metric definitions for the resource.<br>The **$filter** - /// parameter is optional, and can be used to only retrieve certain metric - /// definitions.<br>For example, get just the definition for the CPU - /// percentage counter: $filter=name.value eq '\Processor(_Total)\% Processor - /// Time'.<br>This **$filter** is very restricted and allows only clauses - /// of the form **'name eq <value>'** separated by **or** logical - /// operators.<br>**NOTE**: No other syntax is allowed. + /// Lists the metric definitions for the resource. /// /// /// The identifier of the resource. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricDefinitionsOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricDefinitionsOperationsExtensions.cs index 4321f0a78cc0..23c7910e9ff5 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricDefinitionsOperationsExtensions.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricDefinitionsOperationsExtensions.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -25,13 +25,7 @@ namespace Microsoft.Azure.Management.Monitor public static partial class MetricDefinitionsOperationsExtensions { /// - /// Lists the metric definitions for the resource.<br>The **$filter** - /// parameter is optional, and can be used to only retrieve certain metric - /// definitions.<br>For example, get just the definition for the CPU - /// percentage counter: $filter=name.value eq '\Processor(_Total)\% Processor - /// Time'.<br>This **$filter** is very restricted and allows only clauses - /// of the form **'name eq <value>'** separated by **or** logical - /// operators.<br>**NOTE**: No other syntax is allowed. + /// Lists the metric definitions for the resource. /// /// /// The operations group for this extension method. @@ -48,13 +42,7 @@ public static partial class MetricDefinitionsOperationsExtensions } /// - /// Lists the metric definitions for the resource.<br>The **$filter** - /// parameter is optional, and can be used to only retrieve certain metric - /// definitions.<br>For example, get just the definition for the CPU - /// percentage counter: $filter=name.value eq '\Processor(_Total)\% Processor - /// Time'.<br>This **$filter** is very restricted and allows only clauses - /// of the form **'name eq <value>'** separated by **or** logical - /// operators.<br>**NOTE**: No other syntax is allowed. + /// Lists the metric definitions for the resource. /// /// /// The operations group for this extension method. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricsOperations.cs index f72b7d4ba40d..942ae1e0d030 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricsOperations.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricsOperations.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -52,25 +52,7 @@ internal MetricsOperations(MonitorClient client) public MonitorClient Client { get; private set; } /// - /// Lists the metric values for a resource.<br>The **$filter** is used to - /// reduce the set of metric data returned. Some common properties for this - /// expression will be: name.value, aggregationType, startTime, endTime, - /// timeGrain.<br>The filter expression uses these properties with - /// comparison operators (eg. eq, gt, lt) and multiple expressions can be - /// combined with parentheses and 'and/or' logical operators.<br>Some - /// example filter expressions are:<br>- $filter=(name.value eq - /// 'RunsSucceeded') and aggregationType eq 'Total' and startTime eq 2016-02-20 - /// and endTime eq 2016-02-21 and timeGrain eq duration'PT1M',<br>- - /// $filter=(name.value eq 'RunsSucceeded') and (aggregationType eq 'Total' or - /// aggregationType eq 'Average') and startTime eq 2016-02-20 and endTime eq - /// 2016-02-21 and timeGrain eq duration'PT1H',<br>- $filter=(name.value - /// eq 'ActionsCompleted' or name.value eq 'RunsSucceeded') and - /// (aggregationType eq 'Total' or aggregationType eq 'Average') and startTime - /// eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq - /// duration'PT1M'.<br><br> >**NOTE**: When a metrics query - /// comes in with multiple metrics, but with no aggregation types defined, the - /// service will pick the Primary aggregation type of the first metrics to be - /// used as the default aggregation type for all the metrics. + /// Lists the metric values for a resource. /// /// /// The identifier of the resource. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricsOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricsOperationsExtensions.cs index 225269d53283..e28c98161408 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricsOperationsExtensions.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricsOperationsExtensions.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -25,25 +25,7 @@ namespace Microsoft.Azure.Management.Monitor public static partial class MetricsOperationsExtensions { /// - /// Lists the metric values for a resource.<br>The **$filter** is used to - /// reduce the set of metric data returned. Some common properties for this - /// expression will be: name.value, aggregationType, startTime, endTime, - /// timeGrain.<br>The filter expression uses these properties with - /// comparison operators (eg. eq, gt, lt) and multiple expressions can be - /// combined with parentheses and 'and/or' logical operators.<br>Some - /// example filter expressions are:<br>- $filter=(name.value eq - /// 'RunsSucceeded') and aggregationType eq 'Total' and startTime eq 2016-02-20 - /// and endTime eq 2016-02-21 and timeGrain eq duration'PT1M',<br>- - /// $filter=(name.value eq 'RunsSucceeded') and (aggregationType eq 'Total' or - /// aggregationType eq 'Average') and startTime eq 2016-02-20 and endTime eq - /// 2016-02-21 and timeGrain eq duration'PT1H',<br>- $filter=(name.value - /// eq 'ActionsCompleted' or name.value eq 'RunsSucceeded') and - /// (aggregationType eq 'Total' or aggregationType eq 'Average') and startTime - /// eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq - /// duration'PT1M'.<br><br> >**NOTE**: When a metrics query - /// comes in with multiple metrics, but with no aggregation types defined, the - /// service will pick the Primary aggregation type of the first metrics to be - /// used as the default aggregation type for all the metrics. + /// Lists the metric values for a resource. /// /// /// The operations group for this extension method. @@ -60,25 +42,7 @@ public static partial class MetricsOperationsExtensions } /// - /// Lists the metric values for a resource.<br>The **$filter** is used to - /// reduce the set of metric data returned. Some common properties for this - /// expression will be: name.value, aggregationType, startTime, endTime, - /// timeGrain.<br>The filter expression uses these properties with - /// comparison operators (eg. eq, gt, lt) and multiple expressions can be - /// combined with parentheses and 'and/or' logical operators.<br>Some - /// example filter expressions are:<br>- $filter=(name.value eq - /// 'RunsSucceeded') and aggregationType eq 'Total' and startTime eq 2016-02-20 - /// and endTime eq 2016-02-21 and timeGrain eq duration'PT1M',<br>- - /// $filter=(name.value eq 'RunsSucceeded') and (aggregationType eq 'Total' or - /// aggregationType eq 'Average') and startTime eq 2016-02-20 and endTime eq - /// 2016-02-21 and timeGrain eq duration'PT1H',<br>- $filter=(name.value - /// eq 'ActionsCompleted' or name.value eq 'RunsSucceeded') and - /// (aggregationType eq 'Total' or aggregationType eq 'Average') and startTime - /// eq 2016-02-20 and endTime eq 2016-02-21 and timeGrain eq - /// duration'PT1M'.<br><br> >**NOTE**: When a metrics query - /// comes in with multiple metrics, but with no aggregation types defined, the - /// service will pick the Primary aggregation type of the first metrics to be - /// used as the default aggregation type for all the metrics. + /// Lists the metric values for a resource. /// /// /// The operations group for this extension method. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/AggregationType.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/AggregationType.cs index 8256447c8e2a..c20da177a949 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/AggregationType.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/AggregationType.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -35,4 +35,49 @@ public enum AggregationType [EnumMember(Value = "Total")] Total } + internal static class AggregationTypeEnumExtension + { + internal static string ToSerializedValue(this AggregationType? value) => + value == null ? null : ((AggregationType)value).ToSerializedValue(); + + internal static string ToSerializedValue(this AggregationType value) + { + switch( value ) + { + case AggregationType.None: + return "None"; + case AggregationType.Average: + return "Average"; + case AggregationType.Count: + return "Count"; + case AggregationType.Minimum: + return "Minimum"; + case AggregationType.Maximum: + return "Maximum"; + case AggregationType.Total: + return "Total"; + } + return null; + } + + internal static AggregationType? ParseAggregationType(this string value) + { + switch( value ) + { + case "None": + return AggregationType.None; + case "Average": + return AggregationType.Average; + case "Count": + return AggregationType.Count; + case "Minimum": + return AggregationType.Minimum; + case "Maximum": + return AggregationType.Maximum; + case "Total": + return AggregationType.Total; + } + return null; + } + } } diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/ErrorResponse.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/ErrorResponse.cs index ced714be7bee..78682c9b31c1 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/ErrorResponse.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/ErrorResponse.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -22,7 +22,10 @@ public partial class ErrorResponse /// /// Initializes a new instance of the ErrorResponse class. /// - public ErrorResponse() { } + public ErrorResponse() + { + CustomInit(); + } /// /// Initializes a new instance of the ErrorResponse class. @@ -34,8 +37,14 @@ public ErrorResponse() { } { Code = code; Message = message; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets error code /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/ErrorResponseException.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/ErrorResponseException.cs index 2439206b6f43..31565c3466ae 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/ErrorResponseException.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/ErrorResponseException.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -17,9 +17,6 @@ namespace Microsoft.Azure.Management.Monitor.Models /// Exception thrown for an invalid response with ErrorResponse /// information. /// -#if LEGACY - [System.Serializable] -#endif public class ErrorResponseException : RestException { /// @@ -62,39 +59,5 @@ public ErrorResponseException(string message, System.Exception innerException) : base(message, innerException) { } - -#if LEGACY - /// - /// Initializes a new instance of the ErrorResponseException class. - /// - /// Serialization info. - /// Streaming context. - protected ErrorResponseException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) - : base(info, context) - { - } - - /// - /// Serializes content of the exception. - /// - /// Serialization info. - /// Streaming context. - /// - /// Thrown when a required parameter is null - /// - [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, SerializationFormatter = true)] - public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) - { - base.GetObjectData(info, context); - if (info == null) - { - throw new System.ArgumentNullException("info"); - } - - info.AddValue("Request", Request); - info.AddValue("Response", Response); - info.AddValue("Body", Body); - } -#endif } } diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/EventData.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/EventData.cs index 63212278a9e1..68f813aa32d5 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/EventData.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/EventData.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -24,7 +24,10 @@ public partial class EventData /// /// Initializes a new instance of the EventData class. /// - public EventData() { } + public EventData() + { + CustomInit(); + } /// /// Initializes a new instance of the EventData class. @@ -115,8 +118,14 @@ public EventData() { } SubmissionTimestamp = submissionTimestamp; SubscriptionId = subscriptionId; TenantId = tenantId; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// [JsonProperty(PropertyName = "authorization")] diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/EventLevel.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/EventLevel.cs index 5bf35a030d79..e9c95d149f58 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/EventLevel.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/EventLevel.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -33,4 +33,45 @@ public enum EventLevel [EnumMember(Value = "Verbose")] Verbose } + internal static class EventLevelEnumExtension + { + internal static string ToSerializedValue(this EventLevel? value) => + value == null ? null : ((EventLevel)value).ToSerializedValue(); + + internal static string ToSerializedValue(this EventLevel value) + { + switch( value ) + { + case EventLevel.Critical: + return "Critical"; + case EventLevel.Error: + return "Error"; + case EventLevel.Warning: + return "Warning"; + case EventLevel.Informational: + return "Informational"; + case EventLevel.Verbose: + return "Verbose"; + } + return null; + } + + internal static EventLevel? ParseEventLevel(this string value) + { + switch( value ) + { + case "Critical": + return EventLevel.Critical; + case "Error": + return EventLevel.Error; + case "Warning": + return EventLevel.Warning; + case "Informational": + return EventLevel.Informational; + case "Verbose": + return EventLevel.Verbose; + } + return null; + } + } } diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/HttpRequestInfo.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/HttpRequestInfo.cs index 185564c09107..45fdff160335 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/HttpRequestInfo.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/HttpRequestInfo.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -22,7 +22,10 @@ public partial class HttpRequestInfo /// /// Initializes a new instance of the HttpRequestInfo class. /// - public HttpRequestInfo() { } + public HttpRequestInfo() + { + CustomInit(); + } /// /// Initializes a new instance of the HttpRequestInfo class. @@ -37,8 +40,14 @@ public HttpRequestInfo() { } ClientIpAddress = clientIpAddress; Method = method; Uri = uri; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the client request id. /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/LocalizableString.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/LocalizableString.cs index 801304330e4e..73d636b65462 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/LocalizableString.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/LocalizableString.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -23,7 +23,10 @@ public partial class LocalizableString /// /// Initializes a new instance of the LocalizableString class. /// - public LocalizableString() { } + public LocalizableString() + { + CustomInit(); + } /// /// Initializes a new instance of the LocalizableString class. @@ -34,8 +37,14 @@ public LocalizableString() { } { Value = value; LocalizedValue = localizedValue; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the invariant value. /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Metric.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Metric.cs index 8b5d27f25621..607b83c09307 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Metric.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Metric.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -25,7 +25,10 @@ public partial class Metric /// /// Initializes a new instance of the Metric class. /// - public Metric() { } + public Metric() + { + CustomInit(); + } /// /// Initializes a new instance of the Metric class. @@ -47,8 +50,14 @@ public Metric() { } Name = name; Unit = unit; Data = data; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the id, resourceId, of the metric. /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetricAvailability.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetricAvailability.cs index b972942b911b..512659d82f5c 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetricAvailability.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetricAvailability.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -23,7 +23,10 @@ public partial class MetricAvailability /// /// Initializes a new instance of the MetricAvailability class. /// - public MetricAvailability() { } + public MetricAvailability() + { + CustomInit(); + } /// /// Initializes a new instance of the MetricAvailability class. @@ -38,8 +41,14 @@ public MetricAvailability() { } { TimeGrain = timeGrain; Retention = retention; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the time grain specifies the aggregation interval for /// the metric. Expressed as a duration 'PT1M', 'P1D', etc. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetricDefinition.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetricDefinition.cs index fa2e99d9e81e..4ae6f49b6992 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetricDefinition.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetricDefinition.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -24,7 +24,10 @@ public partial class MetricDefinition /// /// Initializes a new instance of the MetricDefinition class. /// - public MetricDefinition() { } + public MetricDefinition() + { + CustomInit(); + } /// /// Initializes a new instance of the MetricDefinition class. @@ -52,8 +55,14 @@ public MetricDefinition() { } PrimaryAggregationType = primaryAggregationType; MetricAvailabilities = metricAvailabilities; Id = id; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the resource identifier of the resource that emitted /// the metric. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetricValue.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetricValue.cs index 53ee6ee5e9cf..dc11a56d7fbc 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetricValue.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetricValue.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -22,7 +22,10 @@ public partial class MetricValue /// /// Initializes a new instance of the MetricValue class. /// - public MetricValue() { } + public MetricValue() + { + CustomInit(); + } /// /// Initializes a new instance of the MetricValue class. @@ -45,8 +48,14 @@ public MetricValue() { } Maximum = maximum; Total = total; Count = count; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the timestamp for the metric value in ISO 8601 format. /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Page.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Page.cs index 6df5765ee359..491c2292921b 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Page.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Page.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Page1.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Page1.cs index c3dd3ccbf7f6..f2c140b2c31d 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Page1.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Page1.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/SenderAuthorization.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/SenderAuthorization.cs index 255bc083a135..745980c70adb 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/SenderAuthorization.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/SenderAuthorization.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -24,7 +24,10 @@ public partial class SenderAuthorization /// /// Initializes a new instance of the SenderAuthorization class. /// - public SenderAuthorization() { } + public SenderAuthorization() + { + CustomInit(); + } /// /// Initializes a new instance of the SenderAuthorization class. @@ -39,8 +42,14 @@ public SenderAuthorization() { } Action = action; Role = role; Scope = scope; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the permissible actions. For instance: /// microsoft.support/supporttickets/write diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Unit.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Unit.cs index 3153eb627428..eb71b4240537 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Unit.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Unit.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -37,4 +37,53 @@ public enum Unit [EnumMember(Value = "MilliSeconds")] MilliSeconds } + internal static class UnitEnumExtension + { + internal static string ToSerializedValue(this Unit? value) => + value == null ? null : ((Unit)value).ToSerializedValue(); + + internal static string ToSerializedValue(this Unit value) + { + switch( value ) + { + case Unit.Count: + return "Count"; + case Unit.Bytes: + return "Bytes"; + case Unit.Seconds: + return "Seconds"; + case Unit.CountPerSecond: + return "CountPerSecond"; + case Unit.BytesPerSecond: + return "BytesPerSecond"; + case Unit.Percent: + return "Percent"; + case Unit.MilliSeconds: + return "MilliSeconds"; + } + return null; + } + + internal static Unit? ParseUnit(this string value) + { + switch( value ) + { + case "Count": + return Unit.Count; + case "Bytes": + return Unit.Bytes; + case "Seconds": + return Unit.Seconds; + case "CountPerSecond": + return Unit.CountPerSecond; + case "BytesPerSecond": + return Unit.BytesPerSecond; + case "Percent": + return Unit.Percent; + case "MilliSeconds": + return Unit.MilliSeconds; + } + return null; + } + } } diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/UsageMetric.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/UsageMetric.cs index b35a4a7d458f..0768915573c3 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/UsageMetric.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/UsageMetric.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -22,7 +22,10 @@ public partial class UsageMetric /// /// Initializes a new instance of the UsageMetric class. /// - public UsageMetric() { } + public UsageMetric() + { + CustomInit(); + } /// /// Initializes a new instance of the UsageMetric class. @@ -46,8 +49,14 @@ public UsageMetric() { } Unit = unit; NextResetTime = nextResetTime; QuotaPeriod = quotaPeriod; + CustomInit(); } + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + /// /// Gets or sets the usage metric name and display name. /// diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MonitorClient.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MonitorClient.cs index 47d30a3ef944..cee3e5e685dd 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MonitorClient.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MonitorClient.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -22,7 +22,7 @@ namespace Microsoft.Azure.Management.Monitor using System.Net.Http; /// - /// Composite Swagger for Monitor Client + /// Monitor Client /// public partial class MonitorClient : ServiceClient, IMonitorClient, IAzureClient { @@ -74,14 +74,14 @@ public partial class MonitorClient : ServiceClient, IMonitorClien public virtual IUsageMetricsOperations UsageMetrics { get; private set; } /// - /// Gets the IEventCategoriesOperations. + /// Gets the IActivityLogsOperations. /// - public virtual IEventCategoriesOperations EventCategories { get; private set; } + public virtual IActivityLogsOperations ActivityLogs { get; private set; } /// - /// Gets the IActivityLogsOperations. + /// Gets the IEventCategoriesOperations. /// - public virtual IActivityLogsOperations ActivityLogs { get; private set; } + public virtual IEventCategoriesOperations EventCategories { get; private set; } /// /// Gets the ITenantActivityLogsOperations. @@ -300,8 +300,8 @@ public MonitorClient(System.Uri baseUri, ServiceClientCredentials credentials, H private void Initialize() { UsageMetrics = new UsageMetricsOperations(this); - EventCategories = new EventCategoriesOperations(this); ActivityLogs = new ActivityLogsOperations(this); + EventCategories = new EventCategoriesOperations(this); TenantActivityLogs = new TenantActivityLogsOperations(this); MetricDefinitions = new MetricDefinitionsOperations(this); Metrics = new MetricsOperations(this); diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/TenantActivityLogsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/TenantActivityLogsOperations.cs index f783b24c5bc3..427a775e0027 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/TenantActivityLogsOperations.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/TenantActivityLogsOperations.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -57,36 +57,19 @@ internal TenantActivityLogsOperations(MonitorClient client) /// applicable to this API (the parameters, $filter, etc.).<br>One thing /// to point out here is that this API does *not* retrieve the logs at the /// individual subscription of the tenant but only surfaces the logs that were - /// generated at the tenant level.<br>The **$filter** is very restricted - /// and allows only the following patterns.<br>- List events for a - /// resource group: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation' and resourceGroupName eq '<ResourceGroupName>'.<br>- - /// List events for resource: $filter=eventTimestamp ge '<Start Time>' - /// and eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation' and resourceUri eq '<ResourceURI>'.<br>- List events - /// for a subscription: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation'.<br>- List evetns for a resource provider: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le - /// '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceProvider eq '<ResourceProviderName>'.<br>- List events - /// for a correlation Id: api-version=2014-04-01&$filter=eventTimestamp ge - /// '2014-07-16T04:36:37.6407898Z' and eventTimestamp le - /// '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and - /// correlationId eq '<CorrelationID>'.<br>**NOTE**: No other - /// syntax is allowed. + /// generated at the tenant level. /// /// /// OData parameters to apply to the operation. /// /// - /// Used to fetch events with only the given properties. The filter is a comma - /// separated list of property names to be returned. Possible values are: - /// authorization, channels, claims, correlationId, description, eventDataId, - /// eventName, eventTimestamp, httpRequest, level, operationId, operationName, - /// properties, resourceGroupName, resourceProviderName, resourceId, status, - /// submissionTimestamp, subStatus, subscriptionId + /// Used to fetch events with only the given properties.<br>The + /// **$select** argument is a comma separated list of property names to be + /// returned. Possible values are: *authorization*, *claims*, *correlationId*, + /// *description*, *eventDataId*, *eventName*, *eventTimestamp*, *httpRequest*, + /// *level*, *operationId*, *operationName*, *properties*, *resourceGroupName*, + /// *resourceProviderName*, *resourceId*, *status*, *submissionTimestamp*, + /// *subStatus*, *subscriptionId* /// /// /// Headers that will be added to request. @@ -265,25 +248,7 @@ internal TenantActivityLogsOperations(MonitorClient client) /// applicable to this API (the parameters, $filter, etc.).<br>One thing /// to point out here is that this API does *not* retrieve the logs at the /// individual subscription of the tenant but only surfaces the logs that were - /// generated at the tenant level.<br>The **$filter** is very restricted - /// and allows only the following patterns.<br>- List events for a - /// resource group: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation' and resourceGroupName eq '<ResourceGroupName>'.<br>- - /// List events for resource: $filter=eventTimestamp ge '<Start Time>' - /// and eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation' and resourceUri eq '<ResourceURI>'.<br>- List events - /// for a subscription: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation'.<br>- List evetns for a resource provider: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le - /// '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceProvider eq '<ResourceProviderName>'.<br>- List events - /// for a correlation Id: api-version=2014-04-01&$filter=eventTimestamp ge - /// '2014-07-16T04:36:37.6407898Z' and eventTimestamp le - /// '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and - /// correlationId eq '<CorrelationID>'.<br>**NOTE**: No other - /// syntax is allowed. + /// generated at the tenant level. /// /// /// The NextLink from the previous successful call to List operation. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/TenantActivityLogsOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/TenantActivityLogsOperationsExtensions.cs index 9e674c436af2..e0335cd3b16c 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/TenantActivityLogsOperationsExtensions.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/TenantActivityLogsOperationsExtensions.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. @@ -28,25 +28,7 @@ public static partial class TenantActivityLogsOperationsExtensions /// applicable to this API (the parameters, $filter, etc.).<br>One thing /// to point out here is that this API does *not* retrieve the logs at the /// individual subscription of the tenant but only surfaces the logs that were - /// generated at the tenant level.<br>The **$filter** is very restricted - /// and allows only the following patterns.<br>- List events for a - /// resource group: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation' and resourceGroupName eq '<ResourceGroupName>'.<br>- - /// List events for resource: $filter=eventTimestamp ge '<Start Time>' - /// and eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation' and resourceUri eq '<ResourceURI>'.<br>- List events - /// for a subscription: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation'.<br>- List evetns for a resource provider: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le - /// '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceProvider eq '<ResourceProviderName>'.<br>- List events - /// for a correlation Id: api-version=2014-04-01&$filter=eventTimestamp ge - /// '2014-07-16T04:36:37.6407898Z' and eventTimestamp le - /// '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and - /// correlationId eq '<CorrelationID>'.<br>**NOTE**: No other - /// syntax is allowed. + /// generated at the tenant level. /// /// /// The operations group for this extension method. @@ -55,12 +37,13 @@ public static partial class TenantActivityLogsOperationsExtensions /// OData parameters to apply to the operation. /// /// - /// Used to fetch events with only the given properties. The filter is a comma - /// separated list of property names to be returned. Possible values are: - /// authorization, channels, claims, correlationId, description, eventDataId, - /// eventName, eventTimestamp, httpRequest, level, operationId, operationName, - /// properties, resourceGroupName, resourceProviderName, resourceId, status, - /// submissionTimestamp, subStatus, subscriptionId + /// Used to fetch events with only the given properties.<br>The + /// **$select** argument is a comma separated list of property names to be + /// returned. Possible values are: *authorization*, *claims*, *correlationId*, + /// *description*, *eventDataId*, *eventName*, *eventTimestamp*, *httpRequest*, + /// *level*, *operationId*, *operationName*, *properties*, *resourceGroupName*, + /// *resourceProviderName*, *resourceId*, *status*, *submissionTimestamp*, + /// *subStatus*, *subscriptionId* /// public static IPage List(this ITenantActivityLogsOperations operations, ODataQuery odataQuery = default(ODataQuery), string select = default(string)) { @@ -73,25 +56,7 @@ public static partial class TenantActivityLogsOperationsExtensions /// applicable to this API (the parameters, $filter, etc.).<br>One thing /// to point out here is that this API does *not* retrieve the logs at the /// individual subscription of the tenant but only surfaces the logs that were - /// generated at the tenant level.<br>The **$filter** is very restricted - /// and allows only the following patterns.<br>- List events for a - /// resource group: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation' and resourceGroupName eq '<ResourceGroupName>'.<br>- - /// List events for resource: $filter=eventTimestamp ge '<Start Time>' - /// and eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation' and resourceUri eq '<ResourceURI>'.<br>- List events - /// for a subscription: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation'.<br>- List evetns for a resource provider: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le - /// '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceProvider eq '<ResourceProviderName>'.<br>- List events - /// for a correlation Id: api-version=2014-04-01&$filter=eventTimestamp ge - /// '2014-07-16T04:36:37.6407898Z' and eventTimestamp le - /// '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and - /// correlationId eq '<CorrelationID>'.<br>**NOTE**: No other - /// syntax is allowed. + /// generated at the tenant level. /// /// /// The operations group for this extension method. @@ -100,12 +65,13 @@ public static partial class TenantActivityLogsOperationsExtensions /// OData parameters to apply to the operation. /// /// - /// Used to fetch events with only the given properties. The filter is a comma - /// separated list of property names to be returned. Possible values are: - /// authorization, channels, claims, correlationId, description, eventDataId, - /// eventName, eventTimestamp, httpRequest, level, operationId, operationName, - /// properties, resourceGroupName, resourceProviderName, resourceId, status, - /// submissionTimestamp, subStatus, subscriptionId + /// Used to fetch events with only the given properties.<br>The + /// **$select** argument is a comma separated list of property names to be + /// returned. Possible values are: *authorization*, *claims*, *correlationId*, + /// *description*, *eventDataId*, *eventName*, *eventTimestamp*, *httpRequest*, + /// *level*, *operationId*, *operationName*, *properties*, *resourceGroupName*, + /// *resourceProviderName*, *resourceId*, *status*, *submissionTimestamp*, + /// *subStatus*, *subscriptionId* /// /// /// The cancellation token. @@ -124,25 +90,7 @@ public static partial class TenantActivityLogsOperationsExtensions /// applicable to this API (the parameters, $filter, etc.).<br>One thing /// to point out here is that this API does *not* retrieve the logs at the /// individual subscription of the tenant but only surfaces the logs that were - /// generated at the tenant level.<br>The **$filter** is very restricted - /// and allows only the following patterns.<br>- List events for a - /// resource group: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation' and resourceGroupName eq '<ResourceGroupName>'.<br>- - /// List events for resource: $filter=eventTimestamp ge '<Start Time>' - /// and eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation' and resourceUri eq '<ResourceURI>'.<br>- List events - /// for a subscription: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation'.<br>- List evetns for a resource provider: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le - /// '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceProvider eq '<ResourceProviderName>'.<br>- List events - /// for a correlation Id: api-version=2014-04-01&$filter=eventTimestamp ge - /// '2014-07-16T04:36:37.6407898Z' and eventTimestamp le - /// '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and - /// correlationId eq '<CorrelationID>'.<br>**NOTE**: No other - /// syntax is allowed. + /// generated at the tenant level. /// /// /// The operations group for this extension method. @@ -161,25 +109,7 @@ public static IPage ListNext(this ITenantActivityLogsOperations opera /// applicable to this API (the parameters, $filter, etc.).<br>One thing /// to point out here is that this API does *not* retrieve the logs at the /// individual subscription of the tenant but only surfaces the logs that were - /// generated at the tenant level.<br>The **$filter** is very restricted - /// and allows only the following patterns.<br>- List events for a - /// resource group: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation' and resourceGroupName eq '<ResourceGroupName>'.<br>- - /// List events for resource: $filter=eventTimestamp ge '<Start Time>' - /// and eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation' and resourceUri eq '<ResourceURI>'.<br>- List events - /// for a subscription: $filter=eventTimestamp ge '<Start Time>' and - /// eventTimestamp le '<End Time>' and eventChannels eq 'Admin, - /// Operation'.<br>- List evetns for a resource provider: - /// $filter=eventTimestamp ge '<Start Time>' and eventTimestamp le - /// '<End Time>' and eventChannels eq 'Admin, Operation' and - /// resourceProvider eq '<ResourceProviderName>'.<br>- List events - /// for a correlation Id: api-version=2014-04-01&$filter=eventTimestamp ge - /// '2014-07-16T04:36:37.6407898Z' and eventTimestamp le - /// '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and - /// correlationId eq '<CorrelationID>'.<br>**NOTE**: No other - /// syntax is allowed. + /// generated at the tenant level. /// /// /// The operations group for this extension method. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/UsageMetricsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/UsageMetricsOperations.cs index bc12560e01be..2c1213866f7f 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/UsageMetricsOperations.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/UsageMetricsOperations.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/UsageMetricsOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/UsageMetricsOperationsExtensions.cs index 51d6d42b84c5..b492482fbff7 100644 --- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/UsageMetricsOperationsExtensions.cs +++ b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/UsageMetricsOperationsExtensions.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See License.txt in the project root for // license information. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is // regenerated. diff --git a/src/SDKs/Monitor/Management.Monitor/Microsoft.Azure.Management.Monitor.csproj b/src/SDKs/Monitor/Management.Monitor/Microsoft.Azure.Management.Monitor.csproj index d2e1c7d848b2..9768403b35ca 100644 --- a/src/SDKs/Monitor/Management.Monitor/Microsoft.Azure.Management.Monitor.csproj +++ b/src/SDKs/Monitor/Management.Monitor/Microsoft.Azure.Management.Monitor.csproj @@ -2,9 +2,8 @@ Microsoft Azure Monitor Library - 0.16.0-preview Microsoft.Azure.Management.Monitor - + 0.16.1-preview Microsoft.Azure.Management.Monitor Management.Monitor;Management.Monitoring;metrics;alerts;autoscale;activityLogs;events;operations;logs diff --git a/src/SDKs/Monitor/Management.Monitor/Properties/AssemblyInfo.cs b/src/SDKs/Monitor/Management.Monitor/Properties/AssemblyInfo.cs index 1b7356e8f398..8ac46bc0d8c0 100644 --- a/src/SDKs/Monitor/Management.Monitor/Properties/AssemblyInfo.cs +++ b/src/SDKs/Monitor/Management.Monitor/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ [assembly: AssemblyTitle("Microsoft Azure Monitor Library")] [assembly: AssemblyDescription("Provides Microsoft Azure Monitor operations.")] -[assembly: AssemblyVersion("0.16.0.0")] -[assembly: AssemblyFileVersion("0.16.0.0")] +[assembly: AssemblyVersion("0.16.1.0")] +[assembly: AssemblyFileVersion("0.16.1.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] [assembly: AssemblyProduct("Microsoft Azure .NET SDK")] diff --git a/src/SDKs/Monitor/Monitor.Tests/BasicTests/ActionGroupsTests.cs b/src/SDKs/Monitor/Monitor.Tests/BasicTests/ActionGroupsTests.cs new file mode 100644 index 000000000000..600c6e864506 --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/BasicTests/ActionGroupsTests.cs @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using Monitor.Tests.Helpers; +using Microsoft.Azure.Management.Monitor.Management; +using Microsoft.Azure.Management.Monitor.Management.Models; +using Xunit; +using Microsoft.Rest.Azure; + +namespace Monitor.Tests.BasicTests +{ + public class ActionGroupsTests : TestBase + { + [Fact] + [Trait("Category", "Mock")] + public void CreateOrUpdateActionGroupTest() + { + ActionGroupResource expectedParameters = GetCreateOrUpdateActionGroupParameter(); + + var handler = new RecordedDelegatingHandler(); + var insightsClient = GetMonitorManagementClient(handler); + var serializedObject = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(expectedParameters, insightsClient.SerializationSettings); + serializedObject = serializedObject.Replace("{", "{\"name\":\"" + expectedParameters.Name + "\",\"id\":\"" + expectedParameters.Id + "\","); + var expectedResponse = new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new StringContent(serializedObject) + }; + + handler = new RecordedDelegatingHandler(expectedResponse); + insightsClient = GetMonitorManagementClient(handler); + + var result = insightsClient.ActionGroups.CreateOrUpdate(resourceGroupName: "rg1", actionGroupName: expectedParameters.Name, actionGroup: expectedParameters); + + AreEqual(expectedParameters, result); + } + + [Fact] + [Trait("Category", "Mock")] + public void GetActionGroupTest() + { + var expectedActionGroup = GetCreateOrUpdateActionGroupParameter(name: "name4"); + + var handler = new RecordedDelegatingHandler(); + var insightsClient = GetMonitorManagementClient(handler); + var serializedObject = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(expectedActionGroup, insightsClient.SerializationSettings); + serializedObject = serializedObject.Replace("{", "{\"name\":\"" + expectedActionGroup.Name + "\",\"id\":\"" + expectedActionGroup.Id + "\","); + var expectedResponse = new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new StringContent(serializedObject) + }; + + handler = new RecordedDelegatingHandler(expectedResponse); + insightsClient = GetMonitorManagementClient(handler); + + var actionGroup = insightsClient.ActionGroups.Get( + resourceGroupName: "rg1", + actionGroupName: "name4"); + + AreEqual(expectedActionGroup, actionGroup); + } + + [Fact] + [Trait("Category", "Mock")] + public void ListActionGroupsBySusbscriptionTest() + { + List expectedParameters = GetActionGroups(); + + var handler = new RecordedDelegatingHandler(); + var insightsClient = GetMonitorManagementClient(handler); + var serializedObject = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(expectedParameters, insightsClient.SerializationSettings); + serializedObject = serializedObject.Replace("{", "{\"name\":\"" + expectedParameters[0].Name + "\",\"id\":\"" + expectedParameters[0].Id + "\","); + var expectedResponse = new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new StringContent(string.Concat("{ \"value\":", serializedObject, "}")) + }; + + handler = new RecordedDelegatingHandler(expectedResponse); + insightsClient = GetMonitorManagementClient(handler); + + var actualGroups = insightsClient.ActionGroups.ListBySubscriptionId(); + + AreEqual(expectedParameters.ToList(), actualGroups.ToList()); + } + + [Fact] + [Trait("Category", "Mock")] + public void ListActionGroupsByResourceGroupTest() + { + List expectedParameters = GetActionGroups(); + + var handler = new RecordedDelegatingHandler(); + var insightsClient = GetMonitorManagementClient(handler); + var serializedObject = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(expectedParameters, insightsClient.SerializationSettings); + serializedObject = serializedObject.Replace("{", "{\"name\":\"" + expectedParameters[0].Name + "\",\"id\":\"" + expectedParameters[0].Id + "\","); + var expectedResponse = new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new StringContent(string.Concat("{ \"value\":", serializedObject, "}")) + }; + + handler = new RecordedDelegatingHandler(expectedResponse); + insightsClient = GetMonitorManagementClient(handler); + + var actualGroups = insightsClient.ActionGroups.ListByResourceGroup(resourceGroupName: "rg1"); + + AreEqual(expectedParameters.ToList(), actualGroups.ToList()); + } + + [Fact] + [Trait("Category", "Mock")] + public void DeleteActionGroupTest() + { + var handler = new RecordedDelegatingHandler(); + var monitorManagementClient = GetMonitorManagementClient(handler); + var expectedResponse = new HttpResponseMessage(HttpStatusCode.OK); + + handler = new RecordedDelegatingHandler(expectedResponse); + monitorManagementClient = GetMonitorManagementClient(handler); + + AzureOperationResponse response = monitorManagementClient.ActionGroups.DeleteWithHttpMessagesAsync( + resourceGroupName: " rg1", + actionGroupName: "name1").Result; + + Assert.Equal(HttpStatusCode.OK, response.Response.StatusCode); + } + + [Fact] + [Trait("Category", "Mock")] + public void EnableActionGroupTest() + { + var handler = new RecordedDelegatingHandler(); + var monitorManagementClient = GetMonitorManagementClient(handler); + var expectedResponse = new HttpResponseMessage(HttpStatusCode.OK); + + handler = new RecordedDelegatingHandler(expectedResponse); + monitorManagementClient = GetMonitorManagementClient(handler); + + AzureOperationResponse response = monitorManagementClient.ActionGroups.EnableReceiverWithHttpMessagesAsync( + resourceGroupName: " rg1", + actionGroupName: "name1", + receiverName: "receiverName1").Result; + + Assert.Equal(HttpStatusCode.OK, response.Response.StatusCode); + } + + private static List GetActionGroups() + { + return new List + { + GetCreateOrUpdateActionGroupParameter(), + GetCreateOrUpdateActionGroupParameter(), + GetCreateOrUpdateActionGroupParameter() + }; + } + + private static void AreEqual(ActionGroupResource exp, ActionGroupResource act) + { + if (exp != null) + { + Assert.Equal(exp.Id, act.Id); + Assert.Equal(exp.Name, act.Name); + Assert.Equal(exp.Location, act.Location); + Assert.Equal(exp.GroupShortName, act.GroupShortName); + Assert.Equal(exp.Enabled, act.Enabled); + Utilities.AreEqual(exp.Tags, act.Tags); + AreEqual(exp.EmailReceivers, act.EmailReceivers); + AreEqual(exp.SmsReceivers, act.SmsReceivers); + AreEqual(exp.WebhookReceivers, act.WebhookReceivers); + } + } + + private static void AreEqual(IList exp, IList act) + { + if (exp != null) + { + for (int i = 0; i < exp.Count; i++) + { + AreEqual(exp[i], act[i]); + } + } + } + + private static void AreEqual(IList exp, IList act) + { + if (exp != null) + { + for (int i = 0; i < exp.Count; i++) + { + AreEqual(exp[i], act[i]); + } + } + } + + private static void AreEqual(IList exp, IList act) + { + if (exp != null) + { + for (int i = 0; i < exp.Count; i++) + { + AreEqual(exp[i], act[i]); + } + } + } + + private static void AreEqual(IList exp, IList act) + { + if (exp != null) + { + for (int i = 0; i < exp.Count; i++) + { + AreEqual(exp[i], act[i]); + } + } + } + + private static void AreEqual(EmailReceiver exp, EmailReceiver act) + { + if (exp != null) + { + Assert.Equal(exp.EmailAddress, act.EmailAddress); + Assert.Equal(exp.Name, act.Name); + Assert.Equal(exp.Status, act.Status); + } + } + + private static void AreEqual(SmsReceiver exp, SmsReceiver act) + { + if (exp != null) + { + Assert.Equal(exp.PhoneNumber, act.PhoneNumber); + Assert.Equal(exp.Name, act.Name); + Assert.Equal(exp.Status, act.Status); + } + } + + private static void AreEqual(WebhookReceiver exp, WebhookReceiver act) + { + if (exp != null) + { + Assert.Equal(exp.ServiceUri, act.ServiceUri); + Assert.Equal(exp.Name, act.Name); + } + } + + private static ActionGroupResource GetCreateOrUpdateActionGroupParameter( + string name = "name1", + List emailReceivers = null, + List smsReceivers = null, + List webhookReceivers = null) + { + // Name and id won't be serialized since they are readonly + return new ActionGroupResource( + id: "long name", + name: name, + location: "location", + groupShortName: name, + enabled: true, + tags: new Dictionary() + { + {"key1", "val1"} + }, + emailReceivers: emailReceivers, + smsReceivers: smsReceivers, + webhookReceivers: webhookReceivers + ); + } + } +} diff --git a/src/SDKs/Monitor/Monitor.Tests/BasicTests/ActivityLogAlertsTests.cs b/src/SDKs/Monitor/Monitor.Tests/BasicTests/ActivityLogAlertsTests.cs new file mode 100644 index 000000000000..c2221c67d7fe --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/BasicTests/ActivityLogAlertsTests.cs @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using Monitor.Tests.Helpers; +using Microsoft.Azure.Management.Monitor.Management; +using Microsoft.Azure.Management.Monitor.Management.Models; +using Xunit; +using Microsoft.Rest.Azure; + +namespace Monitor.Tests.BasicTests +{ + public class ActivityLogAlertsTests : TestBase + { + [Fact] + [Trait("Category", "Mock")] + public void CreateOrUpdateActivityLogAlertsTest() + { + ActivityLogAlertResource expectedParameters = GetCreateOrUpdateActivityLogAlertParameter(); + + var handler = new RecordedDelegatingHandler(); + var insightsClient = GetMonitorManagementClient(handler); + var serializedObject = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(expectedParameters, insightsClient.SerializationSettings); + serializedObject = serializedObject.Replace("{", "{\"name\":\"" + expectedParameters.Name + "\",\"id\":\"" + expectedParameters.Id + "\","); + var expectedResponse = new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new StringContent(serializedObject) + }; + + handler = new RecordedDelegatingHandler(expectedResponse); + insightsClient = GetMonitorManagementClient(handler); + + var result = insightsClient.ActivityLogAlerts.CreateOrUpdate(resourceGroupName: "rg1", activityLogAlertName: expectedParameters.Name, activityLogAlert: expectedParameters); + + AreEqual(expectedParameters, result); + } + + [Fact] + [Trait("Category", "Mock")] + public void GetActivityLogAlertTest() + { + var expectedActionGroup = GetCreateOrUpdateActivityLogAlertParameter(name: "name4"); + + var handler = new RecordedDelegatingHandler(); + var insightsClient = GetMonitorManagementClient(handler); + var serializedObject = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(expectedActionGroup, insightsClient.SerializationSettings); + serializedObject = serializedObject.Replace("{", "{\"name\":\"" + expectedActionGroup.Name + "\",\"id\":\"" + expectedActionGroup.Id + "\","); + var expectedResponse = new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new StringContent(serializedObject) + }; + + handler = new RecordedDelegatingHandler(expectedResponse); + insightsClient = GetMonitorManagementClient(handler); + + var activityLogAlert = insightsClient.ActivityLogAlerts.Get( + resourceGroupName: "rg1", + activityLogAlertName: "name4"); + + AreEqual(expectedActionGroup, activityLogAlert); + } + + [Fact] + [Trait("Category", "Mock")] + public void ListActivityLogAlertsBySusbscriptionTest() + { + List expectedParameters = GetActionGroups(); + + var handler = new RecordedDelegatingHandler(); + var insightsClient = GetMonitorManagementClient(handler); + var serializedObject = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(expectedParameters, insightsClient.SerializationSettings); + serializedObject = serializedObject.Replace("{", "{\"name\":\"" + expectedParameters[0].Name + "\",\"id\":\"" + expectedParameters[0].Id + "\","); + var expectedResponse = new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new StringContent(string.Concat("{ \"value\":", serializedObject, "}")) + }; + + handler = new RecordedDelegatingHandler(expectedResponse); + insightsClient = GetMonitorManagementClient(handler); + + var actualGroups = insightsClient.ActivityLogAlerts.ListBySubscriptionId(); + + AreEqual(expectedParameters, actualGroups.ToList()); + } + + [Fact] + [Trait("Category", "Mock")] + public void ListActivityLogAlertsByResourceGroupTest() + { + List expectedParameters = GetActionGroups(); + + var handler = new RecordedDelegatingHandler(); + var insightsClient = GetMonitorManagementClient(handler); + var serializedObject = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(expectedParameters, insightsClient.SerializationSettings); + serializedObject = serializedObject.Replace("{", "{\"name\":\"" + expectedParameters[0].Name + "\",\"id\":\"" + expectedParameters[0].Id + "\","); + var expectedResponse = new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new StringContent(string.Concat("{ \"value\":", serializedObject, "}")) + }; + + handler = new RecordedDelegatingHandler(expectedResponse); + insightsClient = GetMonitorManagementClient(handler); + + var actualGroups = insightsClient.ActivityLogAlerts.ListByResourceGroup(resourceGroupName: "rg1"); + + AreEqual(expectedParameters, actualGroups.ToList()); + } + + [Fact] + [Trait("Category", "Mock")] + public void DeleteActivityLogAlertTest() + { + var handler = new RecordedDelegatingHandler(); + var monitorManagementClient = GetMonitorManagementClient(handler); + var expectedResponse = new HttpResponseMessage(HttpStatusCode.OK); + + handler = new RecordedDelegatingHandler(expectedResponse); + monitorManagementClient = GetMonitorManagementClient(handler); + + AzureOperationResponse response = monitorManagementClient.ActivityLogAlerts.DeleteWithHttpMessagesAsync( + resourceGroupName: " rg1", + activityLogAlertName: "name1").Result; + + Assert.Equal(HttpStatusCode.OK, response.Response.StatusCode); + } + + [Fact] + [Trait("Category", "Mock")] + public void UpdateActivityLogAlertTest() + { + ActivityLogAlertResource expectedParameters = GetCreateOrUpdateActivityLogAlertParameter(); + + var handler = new RecordedDelegatingHandler(); + var monitorManagementClient = GetMonitorManagementClient(handler); + var serializedObject = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(expectedParameters, monitorManagementClient.SerializationSettings); + serializedObject = serializedObject.Replace("{", "{\"name\":\"" + expectedParameters.Name + "\",\"id\":\"" + expectedParameters.Id + "\","); + var expectedResponse = new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new StringContent(serializedObject) + }; + + handler = new RecordedDelegatingHandler(expectedResponse); + monitorManagementClient = GetMonitorManagementClient(handler); + + ActivityLogAlertPatchBody bodyParameter = new ActivityLogAlertPatchBody + { + Enabled = true, + Tags = null + }; + + ActivityLogAlertResource response = monitorManagementClient.ActivityLogAlerts.Update( + resourceGroupName: " rg1", + activityLogAlertName: "name1", + activityLogAlertPatch: bodyParameter); + + AreEqual(expectedParameters, response); + } + + private static List GetActionGroups() + { + return new List + { + GetCreateOrUpdateActivityLogAlertParameter(), + GetCreateOrUpdateActivityLogAlertParameter(), + GetCreateOrUpdateActivityLogAlertParameter() + }; + } + + private static void AreEqual(ActivityLogAlertResource exp, ActivityLogAlertResource act) + { + if (exp != null) + { + Assert.Equal(exp.Id, act.Id); + Assert.Equal(exp.Name, act.Name); + Assert.Equal(exp.Location, act.Location); + Assert.Equal(exp.Description, act.Description); + Assert.Equal(exp.Enabled, act.Enabled); + Utilities.AreEqual(exp.Tags, act.Tags); + Utilities.AreEqual(exp.Scopes, act.Scopes); + AreEqual(exp.Condition, act.Condition); + AreEqual(exp.Actions, act.Actions); + } + } + + private static void AreEqual(IList exp, IList act) + { + if (exp != null) + { + Assert.NotNull(act); + for (int i = 0; i < exp.Count; i++) + { + AreEqual(exp[i], act[i]); + } + } + } + + private static void AreEqual(ActivityLogAlertAllOfCondition exp, ActivityLogAlertAllOfCondition act) + { + if (exp != null) + { + Assert.NotNull(act); + Assert.NotNull(act.AllOf); + for (int i = 0; i < exp.AllOf.Count; i++) + { + AreEqual(exp.AllOf[i], act.AllOf[i]); + } + } + } + + private static void AreEqual(ActivityLogAlertActionList exp, ActivityLogAlertActionList act) + { + if (exp != null) + { + Assert.NotNull(act); + Assert.NotNull(act.ActionGroups); + for (int i = 0; i < exp.ActionGroups.Count; i++) + { + AreEqual(exp.ActionGroups[i], act.ActionGroups[i]); + } + } + } + + private static void AreEqual(ActivityLogAlertActionGroup exp, ActivityLogAlertActionGroup act) + { + if (exp != null) + { + Assert.Equal(exp.ActionGroupId, act.ActionGroupId); + Assert.Equal(exp.WebhookProperties, act.WebhookProperties); + } + } + + private static void AreEqual(ActivityLogAlertLeafCondition exp, ActivityLogAlertLeafCondition act) + { + if (exp != null) + { + Assert.Equal(exp.Field, act.Field); + Assert.Equal(exp.Equals, act.Equals); + } + } + + private static ActivityLogAlertResource GetCreateOrUpdateActivityLogAlertParameter( + string name = "name1") + { + // Name and id won't be serialized since they are readonly + return new ActivityLogAlertResource( + id: "long name", + name: name, + location: "location", + tags: new Dictionary() + { + {"key1", "val1"} + }, + enabled: true, + description: "", + actions: new ActivityLogAlertActionList(new List { }), + condition: new ActivityLogAlertAllOfCondition(allOf: new List { }), + scopes: new List { "s1" } + ); + } + } +} diff --git a/src/SDKs/Monitor/Monitor.Tests/BasicTests/AlertsTests.cs b/src/SDKs/Monitor/Monitor.Tests/BasicTests/AlertsTests.cs index 60ebd8d92567..5b09a80aa8c7 100644 --- a/src/SDKs/Monitor/Monitor.Tests/BasicTests/AlertsTests.cs +++ b/src/SDKs/Monitor/Monitor.Tests/BasicTests/AlertsTests.cs @@ -16,6 +16,30 @@ namespace Monitor.Tests.BasicTests public class AlertsTests : TestBase { [Fact] + [Trait("Category", "Mock")] + public void CreateOrUpdateRuleTest() + { + AlertRuleResource expectedParameters = GetCreateOrUpdateRuleParameter(); + + var handler = new RecordedDelegatingHandler(); + var insightsClient = GetMonitorManagementClient(handler); + var serializedObject = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(expectedParameters, insightsClient.SerializationSettings); + serializedObject = serializedObject.Replace("{", "{\"name\":\"" + expectedParameters.Name + "\",\"id\":\"" + expectedParameters.Id + "\","); + var expectedResponse = new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new StringContent(serializedObject) + }; + + handler = new RecordedDelegatingHandler(expectedResponse); + insightsClient = GetMonitorManagementClient(handler); + + var result = insightsClient.AlertRules.CreateOrUpdate(resourceGroupName: "rg1", ruleName: expectedParameters.Name, parameters: expectedParameters); + + Utilities.AreEqual(expectedParameters, result); + } + + [Fact] + [Trait("Category", "Mock")] public void GetIncidentTest() { var expectedIncident = GetIncidents().First(); @@ -34,41 +58,11 @@ public void GetIncidentTest() ruleName: "r1", incidentName: "i1"); - AreEqual(expectedIncident, actualIncident); - } - - private static List GetIncidents() - { - return new List - { - new Incident( - activatedTime: DateTime.UtcNow, - isActive: false, - name: "i1", - resolvedTime: DateTime.UtcNow, - ruleName: "r1" - ) - }; - } - - private static void AreEqual(Incident exp, Incident act) - { - if (exp != null) - { - Assert.True(exp.ActivatedTime.HasValue); - Assert.True(act.ActivatedTime.HasValue); - Assert.Equal(exp.ActivatedTime.Value.ToUniversalTime(), act.ActivatedTime.Value.ToUniversalTime()); - Assert.Equal(exp.IsActive, act.IsActive); - Assert.Equal(exp.Name, act.Name); - - Assert.True(exp.ResolvedTime.HasValue); - Assert.True(act.ResolvedTime.HasValue); - Assert.Equal(exp.ResolvedTime.Value.ToUniversalTime(), act.ResolvedTime.Value.ToUniversalTime()); - Assert.Equal(exp.RuleName, act.RuleName); - } + Utilities.AreEqual(expectedIncident, actualIncident); } [Fact] + [Trait("Category", "Mock")] public void ListIncidentsTest() { var expectedIncidentsResponse = new List @@ -94,54 +88,11 @@ public void ListIncidentsTest() resourceGroupName: "rg1", ruleName: "r1"); - AreEqual(expectedIncidentsResponse, actualIncidents.ToList()); - } - - private void AreEqual(IList exp, IList act) - { - if (exp != null) - { - for (int i = 0; i < exp.Count; i++) - { - AreEqual(exp[i], act[i]); - } - } - } - - private static void AreEqual(List exp, IList act) - { - if (exp != null) - { - for (int i = 0; i < exp.Count; i++) - { - AreEqual(exp[i], act[i]); - } - } - } - - [Fact] - public void CreateOrUpdateRuleTest() - { - AlertRuleResource expectedParameters = GetCreateOrUpdateRuleParameter(); - - var handler = new RecordedDelegatingHandler(); - var insightsClient = GetMonitorManagementClient(handler); - var serializedObject = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(expectedParameters, insightsClient.SerializationSettings); - serializedObject = serializedObject.Replace("{", "{\"name\":\"" + expectedParameters.Name + "\",\"id\":\"" + expectedParameters.Id + "\","); - var expectedResponse = new HttpResponseMessage(HttpStatusCode.OK) - { - Content = new StringContent(serializedObject) - }; - - handler = new RecordedDelegatingHandler(expectedResponse); - insightsClient = GetMonitorManagementClient(handler); - - var result = insightsClient.AlertRules.CreateOrUpdate(resourceGroupName: "rg1", ruleName: expectedParameters.Name, parameters: expectedParameters); - - AreEqual(expectedParameters, result); + Utilities.AreEqual(expectedIncidentsResponse, actualIncidents.ToList()); } [Fact] + [Trait("Category", "Mock")] public void ListRulesTest() { var expResponse = GetRuleResourceCollection(); @@ -159,72 +110,61 @@ public void ListRulesTest() insightsClient = GetMonitorManagementClient(handler); var actualResponse = insightsClient.AlertRules.ListByResourceGroup(resourceGroupName: " rg1"); - AreEqual(expResponse, actualResponse.ToList()); + Utilities.AreEqual(expResponse, actualResponse.ToList()); } - private void AreEqual(AlertRuleResource exp, AlertRuleResource act) - { - if (exp != null) - { - Assert.Equal(exp.Location, act.Location); - AreEqual(exp.Tags, act.Tags); - Assert.Equal(exp.Name, act.Name); - Assert.Equal(exp.Description, act.Description); - Assert.Equal(exp.IsEnabled,act.IsEnabled); - AreEqual(exp.Condition, act.Condition); - AreEqual(exp.Actions, act.Actions); - //Assert.Equal(exp.LastUpdatedTime, act.LastUpdatedTime); - } - } - - private void AreEqual(RuleCondition exp, RuleCondition act) + [Fact] + [Trait("Category", "Mock")] + public void UpdateRulesTest() { - if (exp is LocationThresholdRuleCondition) + AlertRuleResource resource = GetRuleResourceCollection().FirstOrDefault(); + resource.IsEnabled = false; + resource.Tags = new Dictionary() { - var expRuleCondition = exp as LocationThresholdRuleCondition; - var actRuleCondition = act as LocationThresholdRuleCondition; - - AreEqual(expRuleCondition.DataSource, actRuleCondition.DataSource); - Assert.Equal(expRuleCondition.FailedLocationCount, actRuleCondition.FailedLocationCount); - Assert.Equal(expRuleCondition.WindowSize, actRuleCondition.WindowSize); - } - } + {"key2", "val2"} + }; - private void AreEqual(RuleDataSource exp, RuleDataSource act) - { - if (exp is RuleMetricDataSource) + var handler = new RecordedDelegatingHandler(); + var monitorManagementClient = GetMonitorManagementClient(handler); + var serializedObject = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(resource, monitorManagementClient.SerializationSettings); + serializedObject = serializedObject.Replace("{", "{\"name\":\"" + resource.Name + "\",\"id\":\"" + resource.Id + "\","); + var expectedResponse = new HttpResponseMessage(HttpStatusCode.OK) { - var expMetricDataSource = exp as RuleMetricDataSource; - var actMetricDataSource = act as RuleMetricDataSource; - - Assert.Equal(expMetricDataSource.MetricName, actMetricDataSource.MetricName); - Assert.Equal(expMetricDataSource.ResourceUri, actMetricDataSource.ResourceUri); - } - } + Content = new StringContent(serializedObject) + }; - private void AreEqual(IList exp, IList act) - { - Assert.NotNull(exp); - Assert.NotNull(act); + handler = new RecordedDelegatingHandler(expectedResponse); + monitorManagementClient = GetMonitorManagementClient(handler); - Assert.Equal(exp.Count, act.Count); + AlertRuleResourcePatch pathResource = new AlertRuleResourcePatch( + name: resource.Name, + isEnabled: false, + tags: new Dictionary() + { + {"key2", "val2"} + }, + actions: resource.Actions, + condition: resource.Condition, + description: resource.Description, + lastUpdatedTime: resource.LastUpdatedTime + ); - for (int i = 0; i < exp.Count; i++) - { - AreEqual(exp[i], act[i]); - } + var actualResponse = monitorManagementClient.AlertRules.Update(resourceGroupName: " rg1", ruleName: resource.Name, alertRulesResource: pathResource); + Utilities.AreEqual(resource, actualResponse); } - private void AreEqual(RuleAction exp, RuleAction act) + private static List GetIncidents() { - if (exp is RuleEmailAction) + return new List { - var expEmailRuleAction = exp as RuleEmailAction; - var actEmailRuleAction = act as RuleEmailAction; - - AreEqual(expEmailRuleAction.CustomEmails, actEmailRuleAction.CustomEmails); - Assert.Equal(expEmailRuleAction.SendToServiceOwners, actEmailRuleAction.SendToServiceOwners); - } + new Incident( + activatedTime: DateTime.UtcNow, + isActive: false, + name: "i1", + resolvedTime: DateTime.UtcNow, + ruleName: "r1" + ) + }; } private AlertRuleResource GetCreateOrUpdateRuleParameter() @@ -309,18 +249,5 @@ private List GetRuleResourceCollection() ) }; } - - private void AreEqual(IList exp, IList act) - { - if (exp != null) - { - Assert.True(exp.Count == act.Count); - - for (int i = 0; i < exp.Count; i++) - { - AreEqual(exp[i], act[i]); - } - } - } } } diff --git a/src/SDKs/Monitor/Monitor.Tests/BasicTests/AutoscaleTests.cs b/src/SDKs/Monitor/Monitor.Tests/BasicTests/AutoscaleTests.cs index 8ee63bcadd1e..65b4815b2bf0 100644 --- a/src/SDKs/Monitor/Monitor.Tests/BasicTests/AutoscaleTests.cs +++ b/src/SDKs/Monitor/Monitor.Tests/BasicTests/AutoscaleTests.cs @@ -17,6 +17,7 @@ public class AutoscaleTests : TestBase private const string ResourceUri = "/subscriptions/4d7e91d4-e930-4bb5-a93d-163aa358e0dc/resourceGroups/Default-Web-westus/providers/microsoft.web/serverFarms/DefaultServerFarm"; [Fact] + [Trait("Category", "Mock")] public void CreateOrUpdateSettingTest() { AutoscaleSettingResource expResponse = CreateAutoscaleSetting(location: "East US", resourceUri: ResourceUri, metricName: "CpuPercentage"); @@ -33,10 +34,50 @@ public void CreateOrUpdateSettingTest() insightsClient = GetMonitorManagementClient(handler); var actualResponse = insightsClient.AutoscaleSettings.CreateOrUpdate(resourceGroupName: "resourceGroup1", autoscaleSettingName: "setting1", parameters: expResponse); - AreEqual(expResponse, actualResponse); + Utilities.AreEqual(expResponse, actualResponse); } [Fact] + [Trait("Category", "Mock")] + public void UpdateSettingTest() + { + AutoscaleSettingResource resource = CreateAutoscaleSetting(location: "East US", resourceUri: ResourceUri, metricName: "CpuPercentage"); + resource.Tags = new Dictionary + { + { "key2", "val2" } + }; + resource.Enabled = false; + + var handler = new RecordedDelegatingHandler(); + var monitorManagementClient = GetMonitorManagementClient(handler); + var serializedObject = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(resource, monitorManagementClient.SerializationSettings); + serializedObject = serializedObject.Replace("{", "{\"name\":\"" + resource.Name + "\",\"id\":\"" + resource.Id + "\","); + var expectedResponse = new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new StringContent(serializedObject) + }; + + handler = new RecordedDelegatingHandler(expectedResponse); + monitorManagementClient = GetMonitorManagementClient(handler); + + AutoscaleSettingResourcePatch pathResource = new AutoscaleSettingResourcePatch( + name: resource.Name, + tags: new Dictionary + { + { "key2", "val2" } + }, + notifications: resource.Notifications, + enabled: false, + profiles: resource.Profiles, + targetResourceUri: resource.TargetResourceUri + ); + + var actualResponse = monitorManagementClient.AutoscaleSettings.Update(resourceGroupName: "resourceGroup1", autoscaleSettingName: "setting1", autoscaleSettingResource: pathResource); + Utilities.AreEqual(resource, actualResponse); + } + + [Fact] + [Trait("Category", "Mock")] public void Autoscale_GetSetting() { var expResponse = CreateAutoscaleSetting(ResourceUri, "CpuPercentage", string.Empty); @@ -53,7 +94,7 @@ public void Autoscale_GetSetting() insightsClient = GetMonitorManagementClient(handler); AutoscaleSettingResource actualResponse = insightsClient.AutoscaleSettings.Get(resourceGroupName: "resourceGroup1", autoscaleSettingName: "setting1"); - AreEqual(expResponse, actualResponse); + Utilities.AreEqual(expResponse, actualResponse); } private static AutoscaleSettingResource CreateAutoscaleSetting(string location, string resourceUri, string metricName) @@ -138,133 +179,5 @@ private static AutoscaleSettingResource CreateAutoscaleSetting(string location, return setting; } - - private static void AreEqual(AutoscaleSettingResource exp, AutoscaleSettingResource act) - { - if (exp != null) - { - Assert.Equal(exp.Enabled, act.Enabled); - Assert.Equal(exp.Name, act.Name); - Assert.Equal(exp.TargetResourceUri, act.TargetResourceUri); - - for (int i = 0; i < exp.Profiles.Count; i++) - { - var expectedProfile = exp.Profiles[i]; - var actualProfile = act.Profiles[i]; - AreEqual(expectedProfile, actualProfile); - } - } - } - - private static void AreEqual(AutoscaleProfile exp, AutoscaleProfile act) - { - if (exp != null) - { - Assert.Equal(exp.Name, act.Name); - AreEqual(exp.Capacity, act.Capacity); - AreEqual(exp.FixedDate, act.FixedDate); - AreEqual(exp.Recurrence, act.Recurrence); - for (int i = 0; i < exp.Rules.Count; i++) - { - AreEqual(exp.Rules[i], act.Rules[i]); - } - } - } - - private static void AreEqual(TimeWindow exp, TimeWindow act) - { - if (exp != null) - { - Assert.Equal(exp.End.ToUniversalTime(), act.End.ToUniversalTime()); - Assert.Equal(exp.Start.ToUniversalTime(), act.Start.ToUniversalTime()); - Assert.Equal(exp.TimeZone, act.TimeZone); - } - } - - private static void AreEqual(ScaleCapacity exp, ScaleCapacity act) - { - if (exp != null) - { - Assert.Equal(exp.DefaultProperty, act.DefaultProperty); - Assert.Equal(exp.Maximum, act.Maximum); - Assert.Equal(exp.Minimum, act.Minimum); - } - } - - private static void AreEqual(Recurrence exp, Recurrence act) - { - if (exp != null) - { - Assert.Equal(exp.Frequency, act.Frequency); - AreEqual(exp.Schedule, act.Schedule); - } - } - - private static void AreEqual(RecurrentSchedule exp, RecurrentSchedule act) - { - if (exp != null) - { - AreEqual(exp.Days, act.Days); - AreEqual(exp.Hours, act.Hours); - AreEqual(exp.Minutes, act.Minutes); - Assert.Equal(exp.TimeZone, act.TimeZone); - } - } - - private static bool AreEqual(IList exp, IList act) - { - if (exp != null) - { - if (act == null || exp.Count != act.Count) - { - return false; - } - - for (int i = 0; i < exp.Count; i++) - { - if (exp[i] != act[i]) - { - return false; - } - } - - return true; - } - - return act == null; - } - - private static void AreEqual(ScaleRule exp, ScaleRule act) - { - if (exp != null) - { - AreEqual(exp.MetricTrigger, act.MetricTrigger); - AreEqual(exp.ScaleAction, act.ScaleAction); - } - } - - private static void AreEqual(MetricTrigger exp, MetricTrigger act) - { - if (exp != null) - { - Assert.Equal(exp.MetricName, act.MetricName); - Assert.Equal(exp.MetricResourceUri, act.MetricResourceUri); - Assert.Equal(exp.Statistic, act.Statistic); - Assert.Equal(exp.Threshold, act.Threshold); - Assert.Equal(exp.TimeAggregation, act.TimeAggregation); - Assert.Equal(exp.TimeGrain, act.TimeGrain); - Assert.Equal(exp.TimeWindow, act.TimeWindow); - } - } - - private static void AreEqual(ScaleAction exp, ScaleAction act) - { - if (exp != null) - { - Assert.Equal(exp.Cooldown, act.Cooldown); - Assert.Equal(exp.Direction, act.Direction); - Assert.Equal(exp.Value, act.Value); - } - } } } diff --git a/src/SDKs/Monitor/Monitor.Tests/BasicTests/EventDataTests.cs b/src/SDKs/Monitor/Monitor.Tests/BasicTests/EventDataTests.cs index 29e56271eefe..70e6c82ea5b1 100644 --- a/src/SDKs/Monitor/Monitor.Tests/BasicTests/EventDataTests.cs +++ b/src/SDKs/Monitor/Monitor.Tests/BasicTests/EventDataTests.cs @@ -48,6 +48,7 @@ public class EventDataInMemoryTests : TestBase /// Test for the ListEvents API method /// [Fact] + [Trait("Category", "Mock")] public void ListEventsTest() { List expectedEventDataCollection = GetEventDataCollection(); @@ -75,6 +76,7 @@ public void ListEventsTest() /// Test for the ListEventsNext method /// [Fact] + [Trait("Category", "Mock")] public void ListEventsNextTest() { List expectedEventDataCollection = GetEventDataCollection(); @@ -123,21 +125,21 @@ private static void AreEqual(EventData exp, EventData act) if (exp != null) { AreEqual(exp.Authorization, act.Authorization); - AreEqual(exp.Claims, act.Claims); + Utilities.AreEqual(exp.Claims, act.Claims); Assert.Equal(exp.CorrelationId, act.CorrelationId); Assert.Equal(exp.Description, act.Description); Assert.Equal(exp.EventDataId, act.EventDataId); - AreEqual(exp.EventName, act.EventName); + Utilities.AreEqual(exp.EventName, act.EventName); Assert.Equal(exp.EventTimestamp.ToUniversalTime(), act.EventTimestamp.ToUniversalTime()); AreEqual(exp.HttpRequest, act.HttpRequest); Assert.Equal(exp.Level, act.Level); Assert.Equal(exp.OperationId, act.OperationId); - AreEqual(exp.OperationName, act.OperationName); - AreEqual(exp.Properties, act.Properties); + Utilities.AreEqual(exp.OperationName, act.OperationName); + Utilities.AreEqual(exp.Properties, act.Properties); Assert.Equal(exp.ResourceGroupName, act.ResourceGroupName); - AreEqual(exp.ResourceProviderName, act.ResourceProviderName); - AreEqual(exp.Status, act.Status); - AreEqual(exp.SubStatus, act.SubStatus); + Utilities.AreEqual(exp.ResourceProviderName, act.ResourceProviderName); + Utilities.AreEqual(exp.Status, act.Status); + Utilities.AreEqual(exp.SubStatus, act.SubStatus); Assert.Equal(exp.SubmissionTimestamp.ToUniversalTime(), act.SubmissionTimestamp.ToUniversalTime()); Assert.Equal(exp.SubscriptionId, act.SubscriptionId); diff --git a/src/SDKs/Monitor/Monitor.Tests/BasicTests/LogProfilesTests.cs b/src/SDKs/Monitor/Monitor.Tests/BasicTests/LogProfilesTests.cs index b49535fb5514..1834bbf8fb0e 100644 --- a/src/SDKs/Monitor/Monitor.Tests/BasicTests/LogProfilesTests.cs +++ b/src/SDKs/Monitor/Monitor.Tests/BasicTests/LogProfilesTests.cs @@ -19,6 +19,7 @@ public class LogProfilesTests : TestBase private static string DefaultName = "default"; [Fact] + [Trait("Category", "Mock")] public void LogProfiles_CreateOrUpdateTest() { LogProfileResource expResponse = CreateLogProfile(); @@ -41,6 +42,7 @@ public void LogProfiles_CreateOrUpdateTest() } [Fact] + [Trait("Category", "Mock")] public void LogProfiles_DeleteTest() { HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.OK) @@ -55,6 +57,7 @@ public void LogProfiles_DeleteTest() } [Fact] + [Trait("Category", "Mock")] public void LogProfiles_GetTest() { var expResponse = CreateLogProfile(); @@ -74,6 +77,7 @@ public void LogProfiles_GetTest() } [Fact] + [Trait("Category", "Mock")] public void LogProfiles_ListTest() { var logProfile = CreateLogProfile(); @@ -99,6 +103,36 @@ public void LogProfiles_ListTest() AreEqual(expResponse[0], actualResponse[0]); } + [Fact] + [Trait("Category", "Mock")] + public void LogProfiles_UpdateTest() + { + LogProfileResource resource = CreateLogProfile(); + var handler = new RecordedDelegatingHandler(); + var monitorManagementClient = GetMonitorManagementClient(handler); + var serializedObject = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(resource, monitorManagementClient.SerializationSettings); + var expectedResponse = new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new StringContent(serializedObject) + }; + + handler = new RecordedDelegatingHandler(expectedResponse); + monitorManagementClient = GetMonitorManagementClient(handler); + + LogProfileResourcePatch patchResource = new LogProfileResourcePatch( + locations: resource.Locations, + categories: resource.Categories, + retentionPolicy: resource.RetentionPolicy, + tags: resource.Tags, + serviceBusRuleId: resource.ServiceBusRuleId, + storageAccountId: resource.StorageAccountId + ); + + LogProfileResource actualResponse = monitorManagementClient.LogProfiles.Update(logProfileName: DefaultName, logProfilesResource: patchResource); + AreEqual(resource, actualResponse); + } + + private static LogProfileResource CreateLogProfile() { return new LogProfileResource diff --git a/src/SDKs/Monitor/Monitor.Tests/BasicTests/MetricsTests.cs b/src/SDKs/Monitor/Monitor.Tests/BasicTests/MetricsTests.cs index 9cc27b49f5df..650bd2e2fe29 100644 --- a/src/SDKs/Monitor/Monitor.Tests/BasicTests/MetricsTests.cs +++ b/src/SDKs/Monitor/Monitor.Tests/BasicTests/MetricsTests.cs @@ -19,6 +19,7 @@ public class MetricsTests : TestBase private const string ResourceUri = "/subscriptions/4d7e91d4-e930-4bb5-a93d-163aa358e0dc/resourceGroups/Default-Web-westus/providers/microsoft.web/serverFarms/DefaultServerFarm"; [Fact] + [Trait("Category", "Mock")] public void GetMetricDefinitionsTest() { IList expectedMetricDefinitionCollection = GetMetricDefinitionCollection(ResourceUri); @@ -37,6 +38,7 @@ public void GetMetricDefinitionsTest() } [Fact] + [Trait("Category", "Mock")] public void GetMetricsTest() { IList expectedMetricCollection = GetMetricCollection(ResourceUri); @@ -93,7 +95,7 @@ private void AreEqual(Metric exp, Metric act) { if (exp != null) { - AreEqual(exp.Name, act.Name); + Utilities.AreEqual(exp.Name, act.Name); Assert.Equal(exp.Unit, act.Unit); if (exp.Data != null) @@ -136,7 +138,7 @@ private static void AreEqual(MetricDefinition exp, MetricDefinition act) { if (exp != null) { - AreEqual(exp.Name, act.Name); + Utilities.AreEqual(exp.Name, act.Name); Assert.Equal(exp.ResourceId, act.ResourceId); Assert.Equal(exp.Unit, act.Unit); Assert.Equal(exp.PrimaryAggregationType, act.PrimaryAggregationType); diff --git a/src/SDKs/Monitor/Monitor.Tests/BasicTests/ServiceDiagnosticSettingsTests.cs b/src/SDKs/Monitor/Monitor.Tests/BasicTests/ServiceDiagnosticSettingsTests.cs index 4c3a15911d91..b45ebb4de2e8 100644 --- a/src/SDKs/Monitor/Monitor.Tests/BasicTests/ServiceDiagnosticSettingsTests.cs +++ b/src/SDKs/Monitor/Monitor.Tests/BasicTests/ServiceDiagnosticSettingsTests.cs @@ -17,6 +17,7 @@ public class ServiceDiagnosticSettingsTests : TestBase private const string ResourceUri = "/subscriptions/4d7e91d4-e930-4bb5-a93d-163aa358e0dc/resourceGroups/Default-Web-westus/providers/microsoft.web/serverFarms/DefaultServerFarm"; [Fact] + [Trait("Category", "Mock")] public void ServiceDiagnosticSettings_PutTest() { var expResponse = CreateDiagnosticSettings(); @@ -38,6 +39,37 @@ public void ServiceDiagnosticSettings_PutTest() } [Fact] + [Trait("Category", "Mock")] + public void ServiceDiagnosticSettings_UpdateTest() + { + var resource = CreateDiagnosticSettings(); + var handler = new RecordedDelegatingHandler(); + var monitorManagementClient = GetMonitorManagementClient(handler); + var serializedObject = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(resource, monitorManagementClient.SerializationSettings); + var expectedResponse = new HttpResponseMessage(HttpStatusCode.OK) + { + Content = new StringContent(serializedObject) + }; + + handler = new RecordedDelegatingHandler(expectedResponse); + monitorManagementClient = GetMonitorManagementClient(handler); + + ServiceDiagnosticSettingsResourcePatch patchResource = new ServiceDiagnosticSettingsResourcePatch( + tags: resource.Tags, + storageAccountId: resource.StorageAccountId, + serviceBusRuleId: resource.ServiceBusRuleId, + eventHubAuthorizationRuleId: resource.EventHubAuthorizationRuleId, + metrics: resource.Metrics, + logs: resource.Logs, + workspaceId: resource.WorkspaceId + ); + + ServiceDiagnosticSettingsResource response = monitorManagementClient.ServiceDiagnosticSettings.Update(resourceUri: ResourceUri, serviceDiagnosticSettingsResource: patchResource); + AreEqual(resource, response); + } + + [Fact] + [Trait("Category", "Mock")] public void ServiceDiagnosticSettings_GetTest() { var expResponse = CreateDiagnosticSettings(); diff --git a/src/SDKs/Monitor/Monitor.Tests/BasicTests/TestBaseTests.cs b/src/SDKs/Monitor/Monitor.Tests/BasicTests/TestBaseTests.cs index 6ee1384966cd..768384a78c65 100644 --- a/src/SDKs/Monitor/Monitor.Tests/BasicTests/TestBaseTests.cs +++ b/src/SDKs/Monitor/Monitor.Tests/BasicTests/TestBaseTests.cs @@ -2,13 +2,10 @@ // Licensed under the MIT License. See License.txt in the project root for license information. using System; -using System.Collections.Generic; using Monitor.Tests.Helpers; using Microsoft.Azure.Management.Monitor; -using Microsoft.Azure.Management.Monitor.Models; using Microsoft.Azure.Management.Monitor.Management; using Microsoft.Rest; -using Xunit; namespace Monitor.Tests.BasicTests { @@ -39,59 +36,5 @@ protected MonitorManagementClient GetMonitorManagementClient(RecordedDelegatingH return client; } - - protected static void AreEqual(IList exp, IList act) - { - if (exp != null) - { - for (int i = 0; i < exp.Count; i++) - { - Assert.Equal(exp[i], act[i]); - } - } - } - - protected static void AreEqual(IList exp, IList act) - { - if (exp != null) - { - for (int i = 0; i < exp.Count; i++) - { - Assert.Equal(exp[i].LocalizedValue, act[i].LocalizedValue); - Assert.Equal(exp[i].Value, act[i].Value); - } - } - } - - protected static void AreEqual(IList exp, IList act) - { - if (exp != null) - { - for (int i = 0; i < exp.Count; i++) - { - Assert.Equal(exp[i], act[i]); - } - } - } - - protected static void AreEqual(LocalizableString exp, LocalizableString act) - { - if (exp != null) - { - Assert.Equal(exp.LocalizedValue, act.LocalizedValue); - Assert.Equal(exp.Value, act.Value); - } - } - - protected static void AreEqual(IDictionary exp, IDictionary act) - { - if (exp != null) - { - foreach (var key in exp.Keys) - { - Assert.Equal(exp[key], act[key]); - } - } - } } } diff --git a/src/SDKs/Monitor/Monitor.Tests/BasicTests/UsagesTests.cs b/src/SDKs/Monitor/Monitor.Tests/BasicTests/UsagesTests.cs index 1345fdd87a63..e09b232db936 100644 --- a/src/SDKs/Monitor/Monitor.Tests/BasicTests/UsagesTests.cs +++ b/src/SDKs/Monitor/Monitor.Tests/BasicTests/UsagesTests.cs @@ -16,6 +16,7 @@ namespace Monitor.Tests.BasicTests public class UsagesTests : TestBase { [Fact] + [Trait("Category", "Mock")] public void ListUsageTest() { string resourceUri = "/subscriptions/123456789/resourceGroups/rg/providers/rp/rUri"; @@ -89,7 +90,7 @@ private static void AreEqual(UsageMetric exp, UsageMetric act) Assert.Equal(exp.NextResetTime, act.NextResetTime); Assert.Equal(exp.QuotaPeriod, act.QuotaPeriod); Assert.Equal(exp.Unit, act.Unit); - AreEqual(exp.Name, act.Name); + Utilities.AreEqual(exp.Name, act.Name); } } } diff --git a/src/SDKs/Monitor/Monitor.Tests/Helpers/Utilities.cs b/src/SDKs/Monitor/Monitor.Tests/Helpers/Utilities.cs new file mode 100644 index 000000000000..e037674b0f55 --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/Helpers/Utilities.cs @@ -0,0 +1,646 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using Microsoft.Azure.Management.Monitor.Management.Models; +using Microsoft.Azure.Management.Monitor.Models; +using Xunit; + +namespace Monitor.Tests.Helpers +{ + public static class Utilities + { + #region Autoscale + public static void AreEqual(AutoscaleSettingResource exp, AutoscaleSettingResource act) + { + if (exp != null) + { + Assert.Equal(exp.Enabled, act.Enabled); + Assert.Equal(exp.Name, act.Name); + Assert.Equal(exp.TargetResourceUri, act.TargetResourceUri); + + for (int i = 0; i < exp.Profiles.Count; i++) + { + var expectedProfile = exp.Profiles[i]; + var actualProfile = act.Profiles[i]; + AreEqual(expectedProfile, actualProfile); + } + } + } + + private static void AreEqual(AutoscaleProfile exp, AutoscaleProfile act) + { + if (exp != null) + { + Assert.Equal(exp.Name, act.Name); + AreEqual(exp.Capacity, act.Capacity); + AreEqual(exp.FixedDate, act.FixedDate); + AreEqual(exp.Recurrence, act.Recurrence); + for (int i = 0; i < exp.Rules.Count; i++) + { + AreEqual(exp.Rules[i], act.Rules[i]); + } + } + } + + private static void AreEqual(TimeWindow exp, TimeWindow act) + { + if (exp != null) + { + Assert.Equal(exp.End.ToUniversalTime(), act.End.ToUniversalTime()); + Assert.Equal(exp.Start.ToUniversalTime(), act.Start.ToUniversalTime()); + Assert.Equal(exp.TimeZone, act.TimeZone); + } + } + + private static void AreEqual(ScaleCapacity exp, ScaleCapacity act) + { + if (exp != null) + { + Assert.Equal(exp.DefaultProperty, act.DefaultProperty); + Assert.Equal(exp.Maximum, act.Maximum); + Assert.Equal(exp.Minimum, act.Minimum); + } + } + + private static void AreEqual(Recurrence exp, Recurrence act) + { + if (exp != null) + { + Assert.Equal(exp.Frequency, act.Frequency); + AreEqual(exp.Schedule, act.Schedule); + } + } + + private static void AreEqual(RecurrentSchedule exp, RecurrentSchedule act) + { + if (exp != null) + { + AreEqual(exp.Days, act.Days); + AreEqual(exp.Hours, act.Hours); + AreEqual(exp.Minutes, act.Minutes); + Assert.Equal(exp.TimeZone, act.TimeZone); + } + } + + private static bool AreEqual(IList exp, IList act) + { + if (exp != null) + { + if (act == null || exp.Count != act.Count) + { + return false; + } + + for (int i = 0; i < exp.Count; i++) + { + if (exp[i] != act[i]) + { + return false; + } + } + + return true; + } + + return act == null; + } + + private static void AreEqual(ScaleRule exp, ScaleRule act) + { + if (exp != null) + { + AreEqual(exp.MetricTrigger, act.MetricTrigger); + AreEqual(exp.ScaleAction, act.ScaleAction); + } + } + + private static void AreEqual(MetricTrigger exp, MetricTrigger act) + { + if (exp != null) + { + Assert.Equal(exp.MetricName, act.MetricName); + Assert.Equal(exp.MetricResourceUri, act.MetricResourceUri); + Assert.Equal(exp.Statistic, act.Statistic); + Assert.Equal(exp.Threshold, act.Threshold); + Assert.Equal(exp.TimeAggregation, act.TimeAggregation); + Assert.Equal(exp.TimeGrain, act.TimeGrain); + Assert.Equal(exp.TimeWindow, act.TimeWindow); + } + } + + private static void AreEqual(ScaleAction exp, ScaleAction act) + { + if (exp != null) + { + Assert.Equal(exp.Cooldown, act.Cooldown); + Assert.Equal(exp.Direction, act.Direction); + Assert.Equal(exp.Value, act.Value); + } + } + #endregion + + #region General + public static void AreEqual(IList exp, IList act) + { + if (exp != null) + { + for (int i = 0; i < exp.Count; i++) + { + Assert.Equal(exp[i], act[i]); + } + } + } + + public static void AreEqual(IList exp, IList act) + { + if (exp != null) + { + for (int i = 0; i < exp.Count; i++) + { + Assert.Equal(exp[i].LocalizedValue, act[i].LocalizedValue); + Assert.Equal(exp[i].Value, act[i].Value); + } + } + } + + private static void AreEqual(IList exp, IList act) + { + if (exp != null) + { + for (int i = 0; i < exp.Count; i++) + { + Assert.Equal(exp[i], act[i]); + } + } + } + + public static void AreEqual(LocalizableString exp, LocalizableString act) + { + if (exp != null) + { + Assert.Equal(exp.LocalizedValue, act.LocalizedValue); + Assert.Equal(exp.Value, act.Value); + } + } + + public static void AreEqual(IDictionary exp, IDictionary act) + { + if (exp != null) + { + foreach (var key in exp.Keys) + { + Assert.Equal(exp[key], act[key]); + } + } + } + #endregion + + #region AlertRules + public static void AreEqual(Incident exp, Incident act) + { + if (exp != null) + { + Assert.True(exp.ActivatedTime.HasValue); + Assert.True(act.ActivatedTime.HasValue); + //Assert.Equal(exp.ActivatedTime.Value.ToUniversalTime(), act.ActivatedTime.Value.ToUniversalTime()); + //Assert.Equal(exp.IsActive, act.IsActive); + Assert.Equal(exp.Name, act.Name); + + Assert.True(exp.ResolvedTime.HasValue); + Assert.True(act.ResolvedTime.HasValue); + //Assert.Equal(exp.ResolvedTime.Value.ToUniversalTime(), act.ResolvedTime.Value.ToUniversalTime()); + Assert.Equal(exp.RuleName, act.RuleName); + } + } + + public static void AreEqual(IList exp, IList act) + { + if (exp != null) + { + for (int i = 0; i < exp.Count; i++) + { + AreEqual(exp[i], act[i]); + } + } + } + + private static void AreEqual(List exp, IList act) + { + if (exp != null) + { + Assert.NotNull(act); + Assert.Equal(exp.Count, act.Count); + for (int i = 0; i < exp.Count; i++) + { + AreEqual(exp[i], act[i]); + } + } + else + { + Assert.Null(act); + } + } + + public static void AreEqual(IList exp, IList act) + { + if (exp != null) + { + Assert.NotNull(act); + Assert.Equal(exp.Count, act.Count); + for (int i = 0; i < exp.Count; i++) + { + Utilities.AreEqual(exp[i], act[i]); + } + } + } + + public static void AreEqual(AlertRuleResource exp, AlertRuleResource act) + { + if (exp != null) + { + Assert.Equal(exp.Location, act.Location); + AreEqual(exp.Tags, act.Tags); + Assert.Equal(exp.Name, act.Name); + Assert.Equal(exp.Description, act.Description); + Assert.Equal(exp.IsEnabled, act.IsEnabled); + AreEqual(exp.Condition, act.Condition); + AreEqual(exp.Actions, act.Actions); + //Assert.Equal(exp.LastUpdatedTime, act.LastUpdatedTime); + } + else + { + Assert.Null(act); + } + } + + private static void AreEqual(RuleCondition exp, RuleCondition act) + { + if (exp is LocationThresholdRuleCondition) + { + var expRuleCondition = exp as LocationThresholdRuleCondition; + var actRuleCondition = act as LocationThresholdRuleCondition; + + AreEqual(expRuleCondition.DataSource, actRuleCondition.DataSource); + Assert.Equal(expRuleCondition.FailedLocationCount, actRuleCondition.FailedLocationCount); + Assert.Equal(expRuleCondition.WindowSize, actRuleCondition.WindowSize); + } + else if (exp is ThresholdRuleCondition) + { + var expRuleCondition = exp as ThresholdRuleCondition; + var actRuleCondition = act as ThresholdRuleCondition; + + AreEqual(expRuleCondition.DataSource, actRuleCondition.DataSource); + Assert.Equal(expRuleCondition.Threshold, actRuleCondition.Threshold); + Assert.Equal(expRuleCondition.OperatorProperty, actRuleCondition.OperatorProperty); + Assert.Equal(expRuleCondition.TimeAggregation, actRuleCondition.TimeAggregation); + Assert.Equal(expRuleCondition.WindowSize, actRuleCondition.WindowSize); + } + } + + private static void AreEqual(RuleDataSource exp, RuleDataSource act) + { + if (exp is RuleMetricDataSource) + { + var expMetricDataSource = exp as RuleMetricDataSource; + var actMetricDataSource = act as RuleMetricDataSource; + + Assert.Equal(expMetricDataSource.MetricName, actMetricDataSource.MetricName); + Assert.Equal(expMetricDataSource.ResourceUri, actMetricDataSource.ResourceUri); + } + } + + private static void AreEqual(IList exp, IList act) + { + if (exp != null) + { + Assert.NotNull(act); + Assert.Equal(exp.Count, act.Count); + for (int i = 0; i < exp.Count; i++) + { + AreEqual(exp[i], act[i]); + } + } + else + { + Assert.Null(act); + } + } + + private static void AreEqual(RuleAction exp, RuleAction act) + { + if (exp is RuleEmailAction) + { + var expEmailRuleAction = exp as RuleEmailAction; + var actEmailRuleAction = act as RuleEmailAction; + + AreEqual(expEmailRuleAction.CustomEmails, actEmailRuleAction.CustomEmails); + Assert.Equal(expEmailRuleAction.SendToServiceOwners, actEmailRuleAction.SendToServiceOwners); + } + } + #endregion + + #region Action Groups + + public static void AreEqual(ActionGroupResource exp, ActionGroupResource act) + { + if (exp != null) + { + Assert.Equal(exp.Id, act.Id); + Assert.Equal(exp.Name, act.Name); + Assert.Equal(exp.Location, act.Location); + Assert.Equal(exp.GroupShortName, act.GroupShortName); + Assert.Equal(exp.Enabled, act.Enabled); + AreEqual(exp.Tags, act.Tags); + AreEqual(exp.EmailReceivers, act.EmailReceivers); + AreEqual(exp.SmsReceivers, act.SmsReceivers); + AreEqual(exp.WebhookReceivers, act.WebhookReceivers); + } + } + + private static void AreEqual(IList exp, IList act) + { + if (exp != null) + { + for (int i = 0; i < exp.Count; i++) + { + AreEqual(exp[i], act[i]); + } + } + } + + public static void AreEqual(IList exp, IList act) + { + if (exp != null) + { + Assert.NotNull(act); + Assert.Equal(exp.Count, act.Count); + for (int i = 0; i < exp.Count; i++) + { + AreEqual(exp[i], act[i]); + } + } + else + { + Assert.Null(act); + } + } + + private static void AreEqual(IList exp, IList act) + { + if (exp != null) + { + for (int i = 0; i < exp.Count; i++) + { + AreEqual(exp[i], act[i]); + } + } + } + + private static void AreEqual(IList exp, IList act) + { + if (exp != null) + { + for (int i = 0; i < exp.Count; i++) + { + AreEqual(exp[i], act[i]); + } + } + } + + private static void AreEqual(EmailReceiver exp, EmailReceiver act) + { + if (exp != null) + { + Assert.Equal(exp.EmailAddress, act.EmailAddress); + Assert.Equal(exp.Name, act.Name); + Assert.Equal(exp.Status, act.Status); + } + } + + private static void AreEqual(SmsReceiver exp, SmsReceiver act) + { + if (exp != null) + { + Assert.Equal(exp.PhoneNumber, act.PhoneNumber); + Assert.Equal(exp.Name, act.Name); + Assert.Equal(exp.Status, act.Status); + } + } + + private static void AreEqual(WebhookReceiver exp, WebhookReceiver act) + { + if (exp != null) + { + Assert.Equal(exp.ServiceUri, act.ServiceUri); + Assert.Equal(exp.Name, act.Name); + } + } + + #endregion + + #region ActivityLogAlerts + public static void AreEqual(ActivityLogAlertResource exp, ActivityLogAlertResource act) + { + if (exp != null) + { + Assert.Equal(exp.Id, act.Id); + Assert.Equal(exp.Name, act.Name); + Assert.Equal(exp.Location, act.Location); + Assert.Equal(exp.Description, act.Description); + Assert.Equal(exp.Enabled, act.Enabled); + AreEqual(exp.Tags, act.Tags); + AreEqual(exp.Scopes, act.Scopes); + AreEqual(exp.Condition, act.Condition); + AreEqual(exp.Actions, act.Actions); + } + } + + private static void AreEqual(IList exp, IList act) + { + if (exp != null) + { + Assert.NotNull(act); + Assert.True(exp.Count == act.Count, "List of activities' lengths are different"); + for (int i = 0; i < exp.Count; i++) + { + AreEqual(exp[i], act[i]); + } + } + } + + private static void AreEqual(ActivityLogAlertAllOfCondition exp, ActivityLogAlertAllOfCondition act) + { + if (exp != null) + { + Assert.NotNull(act); + Assert.NotNull(act.AllOf); + for (int i = 0; i < exp.AllOf.Count; i++) + { + AreEqual(exp.AllOf[i], act.AllOf[i]); + } + } + } + + private static void AreEqual(ActivityLogAlertActionList exp, ActivityLogAlertActionList act) + { + if (exp != null) + { + Assert.NotNull(act); + Assert.NotNull(act.ActionGroups); + for (int i = 0; i < exp.ActionGroups.Count; i++) + { + AreEqual(exp.ActionGroups[i], act.ActionGroups[i]); + } + } + } + + private static void AreEqual(ActivityLogAlertActionGroup exp, ActivityLogAlertActionGroup act) + { + if (exp != null) + { + Assert.Equal(exp.ActionGroupId, act.ActionGroupId); + Assert.Equal(exp.WebhookProperties, act.WebhookProperties); + } + } + + private static void AreEqual(ActivityLogAlertLeafCondition exp, ActivityLogAlertLeafCondition act) + { + if (exp != null) + { + Assert.Equal(exp.Field, act.Field); + Assert.Equal(exp.Equals, act.Equals); + } + } + + #endregion + + #region LogProfiles + public static void AreEqual(LogProfileResource exp, LogProfileResource act) + { + if (exp != null) + { + CompareListString(exp.Categories, act.Categories); + CompareListString(exp.Locations, act.Locations); + + Assert.Equal(exp.RetentionPolicy.Enabled, act.RetentionPolicy.Enabled); + Assert.Equal(exp.RetentionPolicy.Days, act.RetentionPolicy.Days); + Assert.Equal(exp.ServiceBusRuleId, act.ServiceBusRuleId); + Assert.Equal(exp.StorageAccountId, act.StorageAccountId); + } + } + + private static void CompareListString(IList exp, IList act) + { + if (exp == act) + { + return; + } + + if (exp == null) + { + Assert.Equal(null, act); + } + + Assert.False(act == null, "List can't be null"); + + for (int i = 0; i < exp.Count; i++) + { + if (i >= act.Count) + { + Assert.Equal(exp.Count, act.Count); + } + + string cat1 = exp[i]; + string cat2 = act[i]; + Assert.Equal(cat1, cat2); + } + + Assert.Equal(exp.Count, act.Count); + } + #endregion + + #region ServiceDiagnosticsSettings + public static void AreEqual(ServiceDiagnosticSettingsResource exp, ServiceDiagnosticSettingsResource act) + { + if (exp == act) + { + return; + } + + if (exp == null) + { + Assert.Equal(null, act); + } + + Assert.False(act == null, "Actual value can't be null"); + + CompareLists(exp.Logs, act.Logs); + CompareLists(exp.Metrics, act.Metrics); + + Assert.Equal(exp.StorageAccountId, act.StorageAccountId); + Assert.Equal(exp.WorkspaceId, act.WorkspaceId); + Assert.Equal(exp.ServiceBusRuleId, act.ServiceBusRuleId); + } + + private static void Compare(T exp, T act) + { + Type t = typeof(T); + if (t == typeof(LogSettings)) + { + Compare(exp as LogSettings, act as LogSettings); + } + else if (t == typeof(LogSettings)) + { + Compare(exp as MetricSettings, act as MetricSettings); + } + } + + private static void Compare(LogSettings exp, LogSettings act) + { + Assert.Equal(exp.Enabled, act.Enabled); + Assert.Equal(exp.Category, act.Category); + Compare(exp.RetentionPolicy, act.RetentionPolicy); + } + + private static void Compare(RetentionPolicy exp, RetentionPolicy act) + { + Assert.Equal(exp.Enabled, act.Enabled); + Assert.Equal(exp.Days, act.Days); + } + + private static void CompareLists(IList exp, IList act) + { + if (exp == act) + { + return; + } + + if (exp == null) + { + Assert.True(act == null || act.Count == 0); + } + else + { + + Assert.False(act == null, "Actual value can't be null"); + + for (int i = 0; i < exp.Count; i++) + { + if (i >= act.Count) + { + Assert.Equal(exp.Count, act.Count); + } + + T cat1 = exp[i]; + T cat2 = act[i]; + Compare(cat1, cat2); + } + + Assert.Equal(exp.Count, act.Count); + } + } + #endregion + } +} diff --git a/src/SDKs/Monitor/Monitor.Tests/Monitor.Tests.csproj b/src/SDKs/Monitor/Monitor.Tests/Monitor.Tests.csproj index f22c598bd6a7..ccfe37690283 100644 --- a/src/SDKs/Monitor/Monitor.Tests/Monitor.Tests.csproj +++ b/src/SDKs/Monitor/Monitor.Tests/Monitor.Tests.csproj @@ -1,17 +1,34 @@  - - - Monitor.Tests - Monitor.Tests Class library - Monitor.Tests - 1.0.0-preview - netcoreapp1.1 - - - - - PreserveNewest - - - + + + Monitor.Tests + Monitor.Tests Class library + Monitor.Tests + 1.0.0-preview + + + net452;netcoreapp1.1 + + + + + + + + PreserveNewest + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/SDKs/Monitor/Monitor.Tests/Scenarios/ActionGroupsTests.cs b/src/SDKs/Monitor/Monitor.Tests/Scenarios/ActionGroupsTests.cs new file mode 100644 index 000000000000..38bd3351d06a --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/Scenarios/ActionGroupsTests.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System.Collections.Generic; +using System.Linq; +using System.Net; +using Monitor.Tests.Helpers; +using Microsoft.Azure.Management.Monitor.Management; +using Microsoft.Azure.Management.Monitor.Management.Models; +using Xunit; +using Microsoft.Rest.Azure; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + +namespace Monitor.Tests.Scenarios +{ + public class ActionGroupsTests : TestBase + { + private const string ResourceGroupName = "Default-ActivityLogAlerts"; + private const string ActionGroupName = "andygroup-donotuse"; + private RecordedDelegatingHandler handler; + + public ActionGroupsTests() + : base() + { + handler = new RecordedDelegatingHandler { SubsequentStatusCodeToReturn = HttpStatusCode.OK }; + } + + [Fact] + [Trait("Category", "Scenario")] + public void CreateEnableListDeleteActionGroup() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var insightsClient = GetMonitorManagementClient(context, handler); + this.VerifyExistenceOrCreateResourceGroup(resourceGroupName: ResourceGroupName, location: "Global"); + + ActionGroupResource expectedParameters = GetCreateOrUpdateActionGroupParameter(); + ActionGroupResource result = insightsClient.ActionGroups.CreateOrUpdate( + resourceGroupName: ResourceGroupName, + actionGroupName: ActionGroupName, + actionGroup: expectedParameters); + + if (!this.IsRecording) + { + // TODO: Create a check with these commands + Assert.False(string.IsNullOrWhiteSpace(result.Id)); + Assert.Equal(ActionGroupName, result.Name); + Assert.NotNull(result.EmailReceivers); + Assert.NotNull(result.SmsReceivers); + + // AreEqual(expectedParameters, result); + } + + ActionGroupResource singleActionGroup = insightsClient.ActionGroups.Get( + resourceGroupName: ResourceGroupName, + actionGroupName: ActionGroupName); + + if (!this.IsRecording) + { + Utilities.AreEqual(result, singleActionGroup); + } + + IEnumerable actualGroups = insightsClient.ActionGroups.ListBySubscriptionId(); + + if (!this.IsRecording) + { + var listActualGroups = actualGroups.ToList(); + Assert.NotNull(listActualGroups); + Assert.True(listActualGroups.Count > 0); + + // Utilities.AreEqual(new List { expectedParameters }, listActualGroups); + } + + actualGroups = insightsClient.ActionGroups.ListByResourceGroup(resourceGroupName: ResourceGroupName); + + if (!this.IsRecording) + { + var listActualGroups = actualGroups.ToList(); + Assert.NotNull(listActualGroups); + Assert.True(listActualGroups.Count > 0); + + // Utilities.AreEqual(new List { expectedParameters }, actualGroups.ToList()); + } + + // TODO: it responds 'already enabled' + AzureOperationResponse response = insightsClient.ActionGroups.EnableReceiverWithHttpMessagesAsync( + resourceGroupName: ResourceGroupName, + actionGroupName: ActionGroupName, + receiverName: "emailreceiver").Result; + + if (!this.IsRecording) + { + Assert.Equal(HttpStatusCode.Conflict, response.Response.StatusCode); + } + + response = insightsClient.ActionGroups.DeleteWithHttpMessagesAsync( + resourceGroupName: ResourceGroupName, + actionGroupName: ActionGroupName).Result; + + if (!this.IsRecording) + { + Assert.Equal(HttpStatusCode.OK, response.Response.StatusCode); + } + } + } + + private static ActionGroupResource GetCreateOrUpdateActionGroupParameter( + string name = ActionGroupName, + List emailReceivers = null, + List smsReceivers = null, + List webhookReceivers = null) + { + // Name and id won't be serialized since they are readonly + return new ActionGroupResource( + name: name, + location: "Global", + groupShortName: "andygroup", + enabled: false, + tags: new Dictionary(), + emailReceivers: emailReceivers ?? new List + { + new EmailReceiver(name: "emailreceiver", emailAddress: "andyshen@microsoft.com", status: ReceiverStatus.Disabled) + }, + smsReceivers: smsReceivers ?? new List + { + new SmsReceiver(name: "smsreceiver", countryCode: "1", phoneNumber: "7817386781", status: ReceiverStatus.Enabled) + + }, + webhookReceivers: webhookReceivers + ); + } + } +} diff --git a/src/SDKs/Monitor/Monitor.Tests/Scenarios/ActivityLogAlertsTests.cs b/src/SDKs/Monitor/Monitor.Tests/Scenarios/ActivityLogAlertsTests.cs new file mode 100644 index 000000000000..41f29ce6b80e --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/Scenarios/ActivityLogAlertsTests.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using Monitor.Tests.Helpers; +using Microsoft.Azure.Management.Monitor.Management; +using Microsoft.Azure.Management.Monitor.Management.Models; +using Xunit; +using Microsoft.Rest.Azure; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using System.Globalization; + +namespace Monitor.Tests.Scenarios +{ + public class ActivityLogAlertsTests : TestBase + { + private const string ResourceGroupName = "Default-ActivityLogAlerts"; + private const string ActivityLogRuleName = "andy0307rule"; + private const string Location = "Global"; + private RecordedDelegatingHandler handler; + + public ActivityLogAlertsTests() + : base() + { + handler = new RecordedDelegatingHandler { SubsequentStatusCodeToReturn = HttpStatusCode.OK }; + } + + [Fact] + [Trait("Category", "Scenario")] + public void CreateGetListUpdateDeleteActivityLogAlert() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var insightsClient = GetMonitorManagementClient(context, handler); + this.VerifyExistenceOrCreateResourceGroup(resourceGroupName: ResourceGroupName, location: Location); + + ActivityLogAlertResource bodyParameter = GetCreateOrUpdateActivityLogAlertParameter(insightsClient.SubscriptionId); + ActivityLogAlertResource result = insightsClient.ActivityLogAlerts.CreateOrUpdate( + resourceGroupName: ResourceGroupName, + activityLogAlertName: ActivityLogRuleName, + activityLogAlert: bodyParameter); + + if (!this.IsRecording) + { + // TODO: Create a Check + Assert.False(string.IsNullOrWhiteSpace(result.Id)); + Assert.Equal(ActivityLogRuleName, result.Name); + Assert.NotNull(result.Actions); + Assert.NotNull(result.Condition); + Assert.NotNull(result.Scopes); + + // AreEqual(bodyParameter, result); + } + + ActivityLogAlertResource activityLogAlert = insightsClient.ActivityLogAlerts.Get( + resourceGroupName: ResourceGroupName, + activityLogAlertName: ActivityLogRuleName); + + if (!this.IsRecording) + { + Utilities.AreEqual(result, activityLogAlert); + } + + IEnumerable actualGroups = insightsClient.ActivityLogAlerts.ListBySubscriptionId(); + + if (!this.IsRecording) + { + var listActualGroups = actualGroups.ToList(); + Assert.NotNull(listActualGroups); + Assert.True(listActualGroups.Count > 0); + + ActivityLogAlertResource similar = listActualGroups.FirstOrDefault(a => string.Equals(a.Id, activityLogAlert.Id, StringComparison.OrdinalIgnoreCase)); + Assert.NotNull(similar); + + // AreEqual(bodyParameter, actualGroups.ToList()); + } + + actualGroups = insightsClient.ActivityLogAlerts.ListByResourceGroup(resourceGroupName: ResourceGroupName); + + if (!this.IsRecording) + { + var listActualGroups = actualGroups.ToList(); + Assert.NotNull(listActualGroups); + Assert.True(listActualGroups.Count > 0); + + ActivityLogAlertResource similar = listActualGroups.FirstOrDefault(a => string.Equals(a.Id, activityLogAlert.Id, StringComparison.OrdinalIgnoreCase)); + Assert.NotNull(similar); + + // AreEqual(bodyParameter, actualGroups.ToList()); + } + + // TODO: Verify: Actions cannot be null or the request fails with BadRequest + ActivityLogAlertPatchBody patchBodyParameter = new ActivityLogAlertPatchBody + { + Enabled = true, + Tags = null + }; + + ActivityLogAlertResource patchResponse = null; + + Assert.Throws( + () => patchResponse = insightsClient.ActivityLogAlerts.Update( + resourceGroupName: ResourceGroupName, + activityLogAlertName: ActivityLogRuleName, + activityLogAlertPatch: patchBodyParameter)); + + if (!this.IsRecording && patchResponse != null) + { + // Use Check here too + Assert.False(string.IsNullOrWhiteSpace(patchResponse.Id)); + Assert.Equal(ActivityLogRuleName, patchResponse.Name); + Assert.NotNull(patchResponse.Actions); + Assert.NotNull(patchResponse.Condition); + Assert.NotNull(patchResponse.Scopes); + + Assert.True(patchResponse.Enabled); + Assert.Null(patchResponse.Tags); + Assert.Equal(activityLogAlert.Id, patchResponse.Id); + + // AreEqual(bodyParameter, response); + } + + AzureOperationResponse deleteResponse = insightsClient.ActivityLogAlerts.DeleteWithHttpMessagesAsync( + resourceGroupName: ResourceGroupName, + activityLogAlertName: ActivityLogRuleName).Result; + + if (!this.IsRecording) + { + Assert.Equal(HttpStatusCode.OK, deleteResponse.Response.StatusCode); + } + } + } + + private static ActivityLogAlertResource GetCreateOrUpdateActivityLogAlertParameter( + string subscriptionId, + string name = ActivityLogRuleName) + { + // Name and id won't be serialized since they are readonly + return new ActivityLogAlertResource( + name: name, + location: Location, + tags: new Dictionary(), + enabled: true, + description: null, + actions: new ActivityLogAlertActionList( + actionGroups: new List + { + new ActivityLogAlertActionGroup( + actionGroupId: string.Format( + provider: CultureInfo.InvariantCulture, + format: "/subscriptions/{0}/resourceGroups/{1}/providers/microsoft.insights/actionGroups/andygroup-donotuse", + args: new [] { subscriptionId, ResourceGroupName }), + webhookProperties: new Dictionary()) + }), + condition: new ActivityLogAlertAllOfCondition( + allOf: new List + { + new ActivityLogAlertLeafCondition(field: "category", equals: "Administrative"), + new ActivityLogAlertLeafCondition(field: "resourceGroup", equals: "andy0307"), + }), + scopes: new List { string.Format(CultureInfo.InvariantCulture, "/subscriptions/{0}", subscriptionId) } + ); + } + } +} diff --git a/src/SDKs/Monitor/Monitor.Tests/Scenarios/AlertsTests.cs b/src/SDKs/Monitor/Monitor.Tests/Scenarios/AlertsTests.cs new file mode 100644 index 000000000000..c1b83b57e950 --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/Scenarios/AlertsTests.cs @@ -0,0 +1,282 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using Monitor.Tests.Helpers; +using Microsoft.Azure.Management.Monitor.Management; +using Microsoft.Azure.Management.Monitor.Management.Models; +using Xunit; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Rest.Azure; +using System.Globalization; + +namespace Monitor.Tests.Scenarios +{ + public class AlertsTests : TestBase + { + private const string ResourceGroupName = "Rac46PostSwapRG"; + private const string RuleName = "chiricutin"; + private const string ResourceId = "/subscriptions/{0}/resourceGroups/" + ResourceGroupName + "/providers/microsoft.insights/alertrules/" + RuleName; + private const string Location = "westus"; + + private RecordedDelegatingHandler handler; + + public AlertsTests() + : base() + { + handler = new RecordedDelegatingHandler { SubsequentStatusCodeToReturn = HttpStatusCode.OK }; + } + + [Fact] + [Trait("Category", "Scenario")] + public void MetricBasedRule() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + MonitorManagementClient insightsClient = GetMonitorManagementClient(context, handler); + this.VerifyExistenceOrCreateResourceGroup(resourceGroupName: ResourceGroupName, location: Location); + + AlertRuleResource expectedParameters = GetCreateOrUpdateRuleParameter(insightsClient.SubscriptionId); + AlertRuleResource result = insightsClient.AlertRules.CreateOrUpdate( + resourceGroupName: ResourceGroupName, + ruleName: RuleName, + parameters: expectedParameters); + + if (!this.IsRecording) + { + Check(result); + } + + AlertRuleResource retrievedRule = insightsClient.AlertRules.Get( + resourceGroupName: ResourceGroupName, + ruleName: RuleName); + + if (!this.IsRecording) + { + Check(retrievedRule); + + Utilities.AreEqual(result, retrievedRule); + } + + IEnumerable enumOfRules = insightsClient.AlertRules.ListByResourceGroup( + resourceGroupName: ResourceGroupName); + + if (!this.IsRecording) + { + var listOfRules = enumOfRules.ToList(); + var selected = listOfRules.Where(r => string.Equals(r.Id, retrievedRule.Id, StringComparison.OrdinalIgnoreCase)).ToList(); + + Assert.NotNull(selected); + Assert.Equal(1, selected.Count); + Utilities.AreEqual(retrievedRule, selected[0]); + } + + var newTags = new Dictionary() + { + {"key2", "val2"} + }; + + // TODO: Update is requiring 'location', but it was not specified so. + AlertRuleResourcePatch pathResource = new AlertRuleResourcePatch( + name: retrievedRule.Name, + isEnabled: !retrievedRule.IsEnabled, + tags: newTags, + actions: retrievedRule.Actions, + condition: retrievedRule.Condition, + description: retrievedRule.Description, + lastUpdatedTime: retrievedRule.LastUpdatedTime + ); + + AlertRuleResource updatedRule = null; + Assert.Throws( + typeof(ErrorResponseException), + () => updatedRule = insightsClient.AlertRules.Update( + resourceGroupName: ResourceGroupName, + ruleName: RuleName, + alertRulesResource: pathResource)); + + if (!this.IsRecording && updatedRule != null) + { + Check(updatedRule); + + Assert.NotEqual(retrievedRule.Tags, updatedRule.Tags); + Assert.True(retrievedRule.IsEnabled = !updatedRule.IsEnabled); + Assert.Equal(retrievedRule.Name, updatedRule.Name); + Assert.Equal(retrievedRule.Location, updatedRule.Location); + Assert.Equal(retrievedRule.Id, updatedRule.Id); + } + + AlertRuleResource retrievedUpdatedRule = insightsClient.AlertRules.Get( + resourceGroupName: ResourceGroupName, + ruleName: RuleName); + + if (!this.IsRecording && updatedRule != null) + { + Check(retrievedRule); + + Utilities.AreEqual(updatedRule, retrievedUpdatedRule); + } + + insightsClient.AlertRules.Delete( + resourceGroupName: ResourceGroupName, + ruleName: RuleName); + + Assert.Throws( + typeof(CloudException), + () => insightsClient.AlertRules.Get( + resourceGroupName: ResourceGroupName, + ruleName: RuleName)); + } + } + + [Fact(Skip = "Possible error in the spec, using name instead of id for the incidents.")] + [Trait("Category", "Scenario")] + public void GetIncidentTest() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + MonitorManagementClient insightsClient = GetMonitorManagementClient(context, handler); + + var actualIncidents = insightsClient.AlertRuleIncidents.ListByAlertRule( + resourceGroupName: ResourceGroupName, + ruleName: RuleName); + + var incidentsList = actualIncidents.ToList(); + if (incidentsList != null && incidentsList.Count > 0) + { + var actualIncident = insightsClient.AlertRuleIncidents.Get( + resourceGroupName: ResourceGroupName, + ruleName: RuleName, + incidentName: "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlR3JvdXBzL1JhYzQ2UG9zdFN3YXBSRy9wcm92aWRlcnMvbWljcm9zb2Z0Lmluc2lnaHRzL2FsZXJ0cnVsZXMvY2hpcmljdXRpbjA2MzYzNzEzNjQxNDc2ODQyMDc="); + + if (!this.IsRecording) + { + var expectedIncident = GetIncidents(insightsClient.SubscriptionId).First(); + + Utilities.AreEqual(expectedIncident, actualIncident); + } + } + } + } + + [Fact(Skip = "Fails because the alert rule does not exist.")] + [Trait("Category", "Scenario")] + public void ListGetIncidentsTest() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + MonitorManagementClient insightsClient = GetMonitorManagementClient(context, handler); + + // NOTE: for this test to work the alert rule must exist + var actualIncidents = insightsClient.AlertRuleIncidents.ListByAlertRule( + resourceGroupName: ResourceGroupName, + ruleName: RuleName); + + Assert.NotNull(actualIncidents); + + List incidentsList = actualIncidents.ToList(); + + if (!this.IsRecording) + { + Assert.True(incidentsList.Count > 0, "List of incidents should not be 0 length."); + Assert.True(string.Equals(incidentsList[0].RuleName, string.Format(provider: CultureInfo.InvariantCulture, format: ResourceId, args: insightsClient.SubscriptionId), StringComparison.OrdinalIgnoreCase)); + } + + if (incidentsList.Count > 0) + { + string incidentName = incidentsList[0].Name; + + var actualIncident = insightsClient.AlertRuleIncidents.Get( + resourceGroupName: ResourceGroupName, + ruleName: RuleName, + incidentName: incidentName); + + if (!this.IsRecording) + { + Utilities.AreEqual(incidentsList[0], actualIncident); + } + } + } + } + + private static void Check(AlertRuleResource act) + { + if (act != null) + { + Assert.False(string.IsNullOrWhiteSpace(act.Name)); + Assert.Equal(act.Name, act.AlertRuleResourceName); + Assert.False(string.IsNullOrWhiteSpace(act.Id)); + Assert.False(string.IsNullOrWhiteSpace(act.Location)); + Assert.False(string.IsNullOrWhiteSpace(act.Type)); + } + else + { + // Guarantee failure, act should not be null + Assert.NotNull(act); + } + } + + private static List GetIncidents(string subscriptionId) + { + return new List + { + new Incident( + activatedTime: new DateTime(2017,07,31,15,20,14,768,DateTimeKind.Utc), + isActive: false, + name: "", + resolvedTime: new DateTime(2017,07,31,15,25,15,672,DateTimeKind.Utc), + ruleName: string.Format(provider: CultureInfo.InvariantCulture, format: ResourceId, args: subscriptionId) + ) + }; + } + + private AlertRuleResource GetCreateOrUpdateRuleParameter(string subscriptionId) + { + List actions = new List + { + new RuleEmailAction() + { + CustomEmails = new List() + { + "gu@ms.com" + }, + SendToServiceOwners = true + } + }; + + // Name and id won't be serialized since thwy are readonly + return new AlertRuleResource( + id: string.Format(provider: CultureInfo.InvariantCulture, format: ResourceId, args: subscriptionId), + name: RuleName, + location: Location, + alertRuleResourceName: RuleName, + actions: actions, + condition: new ThresholdRuleCondition() + { + DataSource = new RuleMetricDataSource() + { + MetricName = "Requests", + ResourceUri = string.Format( + provider: CultureInfo.InvariantCulture, + format: "/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.Web/sites/alertruleTest", + args: new [] { subscriptionId, ResourceGroupName }), + }, + OperatorProperty = ConditionOperator.GreaterThan, + Threshold = 2, + WindowSize = TimeSpan.FromMinutes(5), + TimeAggregation = TimeAggregationOperator.Total + }, + description: "description", + isEnabled: true, + lastUpdatedTime: DateTime.UtcNow, + tags: new Dictionary() + { + {"key1", "val1"} + } + ); + } + } +} diff --git a/src/SDKs/Monitor/Monitor.Tests/Scenarios/AutoscaleTests.cs b/src/SDKs/Monitor/Monitor.Tests/Scenarios/AutoscaleTests.cs new file mode 100644 index 000000000000..8d18894c9e7e --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/Scenarios/AutoscaleTests.cs @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Net; +using Monitor.Tests.Helpers; +using Microsoft.Azure.Management.Monitor.Management; +using Microsoft.Azure.Management.Monitor.Management.Models; +using Xunit; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using System.Globalization; + +namespace Monitor.Tests.Scenarios +{ + public class AutoscaleTests : TestBase + { + private const string ResourceGroup = "vmscalesetrg"; + private const string ResourceUri = "/subscriptions/{0}/resourceGroups/" + ResourceGroup + "/providers/Microsoft.Compute/virtualMachineScaleSets/vmscaleset"; + private const string Location = "eastus"; + private const string SettingName = "setting1"; + + private RecordedDelegatingHandler handler; + + public AutoscaleTests() + : base() + { + handler = new RecordedDelegatingHandler { SubsequentStatusCodeToReturn = HttpStatusCode.OK }; + } + + [Fact] + [Trait("Category", "Scenario")] + public void MetricBasedFixedAndRecurrent() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + // NOTE: checking the existence of the resource group here is not that useful since the scale set must also exist + var insightsClient = GetMonitorManagementClient(context, handler); + this.VerifyExistenceOrCreateResourceGroup(resourceGroupName: ResourceGroup, location: Location); + + AutoscaleSettingResource body = CreateAutoscaleSetting( + location: Location, + resourceUri: string.Format( + provider: CultureInfo.InvariantCulture, + format: ResourceUri, + args: insightsClient.SubscriptionId), + metricName: "Percentage CPU"); + AutoscaleSettingResource actualResponse = insightsClient.AutoscaleSettings.CreateOrUpdate( + resourceGroupName: ResourceGroup, + autoscaleSettingName: SettingName, + parameters: body); + + if (!this.IsRecording) + { + Check(actualResponse); + } + + // Retrieve the setting created above + AutoscaleSettingResource recoveredSetting = insightsClient.AutoscaleSettings.Get( + resourceGroupName: ResourceGroup, + autoscaleSettingName: SettingName); + + if (!this.IsRecording) + { + Check(recoveredSetting); + + // Compare the two of them + Utilities.AreEqual(actualResponse, recoveredSetting); + } + + var newTags = new Dictionary + { + { "key2", "val2" } + }; + + // Update the setting created above + // TODO: File bug since the request fails due to 'invalid location' + AutoscaleSettingResourcePatch pathResource = new AutoscaleSettingResourcePatch( + name: recoveredSetting.Name, + tags: newTags, + notifications: recoveredSetting.Notifications, + enabled: !recoveredSetting.Enabled, + profiles: recoveredSetting.Profiles, + targetResourceUri: recoveredSetting.TargetResourceUri + ); + + AutoscaleSettingResource updatedSetting = null; + Assert.Throws( + typeof(ErrorResponseException), + () => updatedSetting = insightsClient.AutoscaleSettings.Update( + resourceGroupName: ResourceGroup, + autoscaleSettingName: SettingName, + autoscaleSettingResource: pathResource)); + + if (!this.IsRecording && updatedSetting != null) + { + Check(updatedSetting); + + // Check the changes from above + Assert.NotEqual(recoveredSetting.Tags, updatedSetting.Tags); + Assert.True(recoveredSetting.Enabled = !updatedSetting.Enabled); + Assert.Equal(recoveredSetting.Name, updatedSetting.Name); + Assert.Equal(recoveredSetting.Location, updatedSetting.Location); + Assert.Equal(recoveredSetting.Id, updatedSetting.Id); + } + + // Retrieve again the setting created above + AutoscaleSettingResource recoveredUpdatedSetting = insightsClient.AutoscaleSettings.Get( + resourceGroupName: ResourceGroup, + autoscaleSettingName: SettingName); + + if (!this.IsRecording && updatedSetting != null) + { + Check(recoveredUpdatedSetting); + + // Compare the two of them + Assert.NotEqual(recoveredSetting.Tags, recoveredUpdatedSetting.Tags); + Assert.True(recoveredSetting.Enabled = !recoveredUpdatedSetting.Enabled); + Assert.Equal(recoveredSetting.Name, recoveredUpdatedSetting.Name); + Assert.Equal(recoveredSetting.Location, recoveredUpdatedSetting.Location); + Assert.Equal(recoveredSetting.Id, recoveredUpdatedSetting.Id); + } + + // Remove the setting created above + insightsClient.AutoscaleSettings.Delete( + resourceGroupName: ResourceGroup, + autoscaleSettingName: SettingName); + + // Retrieve again the setting created above (must fail) + Assert.Throws( + typeof(ErrorResponseException), + () => insightsClient.AutoscaleSettings.Get( + resourceGroupName: ResourceGroup, + autoscaleSettingName: SettingName)); + } + } + + private static AutoscaleSettingResource CreateAutoscaleSetting(string location, string resourceUri, string metricName) + { + var capacity = new ScaleCapacity() + { + DefaultProperty = "1", + Maximum = "10", + Minimum = "1" + }; + + var fixedDate = new TimeWindow() + { + End = DateTime.Parse("2014-04-16T21:06:11.7882792Z"), + Start = DateTime.Parse("2014-04-15T21:06:11.7882792Z"), + TimeZone = TimeZoneInfo.Utc.Id.ToString() + }; + + var recurrence = new Recurrence() + { + Frequency = RecurrenceFrequency.Week, + Schedule = new RecurrentSchedule() + { + Days = new List { "Monday" }, + Hours = new List { 0 }, + Minutes = new List { 10 }, + TimeZone = "UTC-11" + } + }; + + var rules = new ScaleRule[] + { + new ScaleRule() + { + MetricTrigger = new MetricTrigger + { + MetricName = metricName, + MetricResourceUri = resourceUri, + Statistic = MetricStatisticType.Average, + Threshold = 80.0, + TimeAggregation = TimeAggregationType.Maximum, + TimeGrain = TimeSpan.FromMinutes(1), + TimeWindow = TimeSpan.FromHours(1) + }, + ScaleAction = new ScaleAction + { + Cooldown = TimeSpan.FromMinutes(20), + Direction = ScaleDirection.Increase, + Value = "1", + Type = ScaleType.ChangeCount + } + } + }; + + var profiles = new AutoscaleProfile[] + { + new AutoscaleProfile() + { + Name = "Profile1", + Capacity = capacity, + FixedDate = fixedDate, + Recurrence = null, + Rules = rules + }, + new AutoscaleProfile() + { + Name = "Profile2", + Capacity = capacity, + FixedDate = null, + Recurrence = recurrence, + Rules = rules + } + }; + + AutoscaleSettingResource setting = new AutoscaleSettingResource(location: Location, profiles: profiles, name: SettingName) + { + AutoscaleSettingResourceName = SettingName, + TargetResourceUri = resourceUri, + Enabled = true, + Tags = null, + Notifications = null + }; + + return setting; + } + + private static void Check(AutoscaleSettingResource act) + { + if (act != null) + { + Assert.False(string.IsNullOrWhiteSpace(act.Name)); + Assert.Equal(act.Name, act.AutoscaleSettingResourceName); + Assert.False(string.IsNullOrWhiteSpace(act.Id)); + Assert.False(string.IsNullOrWhiteSpace(act.Location)); + Assert.False(string.IsNullOrWhiteSpace(act.TargetResourceUri)); + Assert.False(string.IsNullOrWhiteSpace(act.Type)); + } + else + { + // Guarantee failure, act should not be null + Assert.NotNull(act); + } + } + } +} diff --git a/src/SDKs/Monitor/Monitor.Tests/Scenarios/EventDataTests.cs b/src/SDKs/Monitor/Monitor.Tests/Scenarios/EventDataTests.cs new file mode 100644 index 000000000000..36af4cdc09df --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/Scenarios/EventDataTests.cs @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using Monitor.Tests.Helpers; +using Microsoft.Azure.Management.Monitor; +using Microsoft.Azure.Management.Monitor.Models; +using Microsoft.Rest.Azure.OData; +using Xunit; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + +namespace Monitor.Tests.Scenarios +{ + /// + /// Class to unit test the Monitor API methods. + /// The goal of these tests is to find out if the serialization/deserialization is working properly. Testing other features is out of scope. + /// + public class EventDataTests : TestBase + { + #region EventCountSummaryContent + + // private static string EventCountSummaryContent = + // @"{ + // 'eventPropertyName': 'ResourceUri', + // 'eventPropertyValue': '/subscriptions/6b483e7e-f352-4d25-b49d-e0cc8b0b78f6/resourcegroups/Default-Web-SouthCentralUS/providers/Microsoft.Web/sites/si', + // 'startTime': '2014-08-20T00:00:00Z', + // 'endTime': '2014-08-21T00:00:00Z', + // 'timeGrain': 'P1D', + // 'id': '/subscriptions/6b483e7e-f352-4d25-b49d-e0cc8b0b78f6/resourcegroups/Default-Web-SouthCentralUS/providers/Microsoft.Web/sites/si/managementSummariesCount', + // 'summaryItems': [{ + // 'eventTime': '2014-08-21T00:00:00Z', + // 'totalEventsCount': 2, + // 'failedEventsCount': 1 + // }, + // { + // 'eventTime': '2014-08-20T00:00:00Z', + // 'totalEventsCount': 0, + // 'failedEventsCount': 0 + // }] + // }"; + + #endregion + + private RecordedDelegatingHandler handler; + + public EventDataTests() + : base() + { + handler = new RecordedDelegatingHandler { SubsequentStatusCodeToReturn = HttpStatusCode.OK }; + } + + /// + /// Test for the ListEvents API method + /// + [Fact(Skip = "Failing due to $filter value not valid")] + [Trait("Category", "Scenario")] + public void ListEventsTest() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + List expectedEventDataCollection = GetEventDataCollection(); + + var insightsClient = GetMonitorClient(context, handler); + + var startTime = DateTimeOffset.Parse("2017-08-01T00:00:00.00Z"); + var endTime = DateTimeOffset.Parse("2017-08-01T23:59:00.00Z"); + var filterString = new ODataQuery(p => ((p.EventTimestamp >= startTime) && (p.EventTimestamp < endTime))); + + var actualEventDataCollection = insightsClient.ActivityLogs.List(filterString); + + Assert.True(string.IsNullOrWhiteSpace(actualEventDataCollection.NextPageLink)); + + if (!this.IsRecording) + { + AreEqual(expectedEventDataCollection, actualEventDataCollection.GetEnumerator()); + } + } + } + + /// + /// Test for the ListEventsNext method + /// + [Fact(Skip = "First call fails due to $filter value not valid")] + [Trait("Category", "Scenario")] + public void ListEventsNextTest() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + List expectedEventDataCollection = GetEventDataCollection(); + + var insightsClient = GetMonitorClient(context, handler); + + var actualEventDataCollection = insightsClient.ActivityLogs.ListNext("http://www.microsoft.com"); + + if (!this.IsRecording) + { + Assert.True(string.IsNullOrWhiteSpace(actualEventDataCollection.NextPageLink)); + AreEqual(expectedEventDataCollection, actualEventDataCollection.GetEnumerator()); + } + } + } + + #region private methods + + private static void AreEqual(IEnumerable exp, IEnumerator act) + { + if (exp != null) + { + List expList = exp.ToList(); + List actList = new List(); + while (act.MoveNext()) + { + actList.Add(act.Current); + } + + Assert.Equal(expList.Count, actList.Count); + + for (int i=0;i GetEventDataCollection() + { + return new List() + { + new EventData( + authorization: new SenderAuthorization(action: "action", role: "role" , scope: "scope"), + claims: new Dictionary { {"prop1", "val1"} }, + correlationId: Guid.NewGuid().ToString("N"), + description: "description", + eventDataId: Guid.NewGuid().ToString("N"), + eventName: new LocalizableString( + localizedValue: "Event Name", + value: "EventName"), + category: new LocalizableString( + localizedValue: "Administrative", + value: "Administrative"), + eventTimestamp: DateTime.UtcNow, + httpRequest: new HttpRequestInfo( + clientIpAddress: "1.1.1.1", + clientRequestId: Guid.NewGuid().ToString("N"), + method: "method", + uri: "http://localhost"), + level: EventLevel.Critical, + operationId: Guid.NewGuid().ToString("N"), + operationName: new LocalizableString( + localizedValue: "Operation Name", + value: "OperationName"), + properties: new Dictionary() + { + {"prop1", "val1"} + }, + resourceGroupName: "rg1", + resourceProviderName: new LocalizableString( + localizedValue: "Resource provider name", + value: "ResourceProviderName"), + resourceId: "/subscriptions/sub1", + status: new LocalizableString( + localizedValue: "Is Ready", + value: "IsReady"), + subStatus: new LocalizableString( + localizedValue: "sub 1", + value: "sub1"), + submissionTimestamp: DateTime.UtcNow, + subscriptionId: Guid.NewGuid().ToString("N")) + }; + } + + #endregion + } +} diff --git a/src/SDKs/Monitor/Monitor.Tests/Scenarios/LogProfilesTests.cs b/src/SDKs/Monitor/Monitor.Tests/Scenarios/LogProfilesTests.cs new file mode 100644 index 000000000000..cdb2e6ca9ce5 --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/Scenarios/LogProfilesTests.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System.Collections.Generic; +using System.Linq; +using System.Net; +using Monitor.Tests.Helpers; +using Microsoft.Azure.Management.Monitor.Management; +using Microsoft.Azure.Management.Monitor.Management.Models; +using Xunit; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using System; +using Microsoft.Rest.Azure; + +namespace Monitor.Tests.Scenarios +{ + public class LogProfilesTests : TestBase + { + private const string ResourceId = "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/providers/microsoft.insights/logprofiles/default"; + private static string DefaultName = "default"; + private RecordedDelegatingHandler handler; + + public LogProfilesTests() + : base() + { + handler = new RecordedDelegatingHandler { SubsequentStatusCodeToReturn = HttpStatusCode.OK }; + } + + [Fact] + [Trait("Category", "Scenario")] + public void CreateGetListUpdateDeleteLogProfile() + { + // The second argument in the call to Start (missing in this case) controls the name of the output file. + // By default the system will use the name of the current method as file for the output (when recording.) + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + LogProfileResource expResponse = CreateLogProfile(); + + var insightsClient = GetMonitorManagementClient(context, handler); + + var parameters = CreateLogProfileParams(); + + LogProfileResource actualResponse = insightsClient.LogProfiles.CreateOrUpdate( + logProfileName: DefaultName, + parameters: parameters); + + if (!this.IsRecording) + { + // TODO: Create a check and use it here + Assert.False(string.IsNullOrWhiteSpace(actualResponse.Id)); + Assert.Equal(DefaultName, actualResponse.Name); + Assert.NotNull(actualResponse.Categories); + Assert.NotNull(actualResponse.Locations); + Assert.True(actualResponse.Categories.Count > 0); + Assert.True(actualResponse.Locations.Count > 0); + + // AreEqual(expResponse, actualResponse); + } + + LogProfileResource retrievedSingleResponse = insightsClient.LogProfiles.Get(logProfileName: DefaultName); + + if (!this.IsRecording) + { + Utilities.AreEqual(actualResponse, retrievedSingleResponse); + } + + IEnumerable actualProfiles = insightsClient.LogProfiles.List(); + + if (!this.IsRecording) + { + var listActualProfiles = actualProfiles.ToList(); + Assert.NotNull(listActualProfiles); + Assert.True(listActualProfiles.Count > 0); + var selected = listActualProfiles.FirstOrDefault(p => string.Equals(p.Id, retrievedSingleResponse.Id, StringComparison.OrdinalIgnoreCase)); + Assert.NotNull(selected); + Utilities.AreEqual(retrievedSingleResponse, selected); + } + + LogProfileResourcePatch patchResource = new LogProfileResourcePatch( + locations: retrievedSingleResponse.Locations, + categories: retrievedSingleResponse.Categories, + retentionPolicy: retrievedSingleResponse.RetentionPolicy, + tags: retrievedSingleResponse.Tags, + serviceBusRuleId: retrievedSingleResponse.ServiceBusRuleId, + storageAccountId: retrievedSingleResponse.StorageAccountId); + + // TODO: Fails with 'MethodNotAllowed' + LogProfileResource updatedResponse = null; + Assert.Throws( + () => updatedResponse = insightsClient.LogProfiles.Update( + logProfileName: DefaultName, + logProfilesResource: patchResource)); + + if (!this.IsRecording && updatedResponse != null) + { + Utilities.AreEqual(retrievedSingleResponse, updatedResponse); + } + + LogProfileResource secondRetrievedactualResponse = insightsClient.LogProfiles.Get(logProfileName: DefaultName); + + if (!this.IsRecording && updatedResponse != null) + { + Utilities.AreEqual(updatedResponse, secondRetrievedactualResponse); + } + + AzureOperationResponse deleteResponse = insightsClient.LogProfiles.DeleteWithHttpMessagesAsync(logProfileName: DefaultName).Result; + + if (!this.IsRecording) + { + Assert.Equal(HttpStatusCode.OK, deleteResponse.Response.StatusCode); + } + } + } + + private static LogProfileResource CreateLogProfile() + { + return new LogProfileResource + { + StorageAccountId = "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-Storage-westus/providers/microsoft.storage/storageaccounts/salp1", + //ServiceBusRuleId = "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default/providers/microsoft.servicebus/namespaces/serblp1/authorizationrules/ar1", + Categories = new List { "Delete", "Write" }, + Locations = new List { "global", "eastus" }, + RetentionPolicy = new RetentionPolicy + { + Days = 4, + Enabled = true, + } + }; + } + + private static LogProfileResource CreateLogProfileParams() + { + return new LogProfileResource + { + StorageAccountId = "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-Storage-westus/providers/microsoft.storage/storageaccounts/salp1", + //ServiceBusRuleId = "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default/providers/microsoft.servicebus/namespaces/serblp1/authorizationrules/ar1", + Categories = new List { "Delete", "Write" }, + Locations = new List { "global", "eastus" }, + RetentionPolicy = new RetentionPolicy + { + Days = 4, + Enabled = true, + }, + Location = "" + }; + } + } +} diff --git a/src/SDKs/Monitor/Monitor.Tests/Scenarios/MetricsTests.cs b/src/SDKs/Monitor/Monitor.Tests/Scenarios/MetricsTests.cs new file mode 100644 index 000000000000..a93ad7a91881 --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/Scenarios/MetricsTests.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Threading; +using Monitor.Tests.Helpers; +using Microsoft.Azure.Management.Monitor; +using Microsoft.Azure.Management.Monitor.Models; +using Xunit; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + +namespace Monitor.Tests.Scenarios +{ + public class MetricsTests : TestBase + { + private const string ResourceUri = "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest"; + private RecordedDelegatingHandler handler; + + public MetricsTests() + : base() + { + handler = new RecordedDelegatingHandler { SubsequentStatusCodeToReturn = HttpStatusCode.OK }; + } + + [Fact] + [Trait("Category", "Scenario")] + public void GetMetricDefinitionsTest() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var insightsClient = GetMonitorClient(context, handler); + + var filterString = new Microsoft.Rest.Azure.OData.ODataQuery("name.value eq 'Requests'"); + var actualMetricDefinitions = insightsClient.MetricDefinitions.ListAsync( + resourceUri: ResourceUri, + odataQuery: filterString, + cancellationToken: new CancellationToken()).Result; + + if (!this.IsRecording) + { + Check(actualMetricDefinitions.ToList()); + } + } + } + + [Fact] + [Trait("Category", "Scenario")] + public void GetMetricsTest() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var insightsClient = GetMonitorClient(context, handler); + + var filterString = new Microsoft.Rest.Azure.OData.ODataQuery("(name.value eq 'Requests') and timeGrain eq duration'PT1M' and startTime eq 2017-08-01T06:00:00Z and endTime eq 2017-08-02T23:00:00Z"); + var actualMetrics = insightsClient.Metrics.ListAsync( + resourceUri: ResourceUri, + odataQuery: filterString, + cancellationToken: CancellationToken.None).Result; + + if (!this.IsRecording) + { + Check(actualMetrics.ToList()); + } + } + } + + private void Check(IList act) + { + if (act != null) + { + if (act.Count > 0) + { + var metric = act[0]; + Assert.False(string.IsNullOrWhiteSpace(metric.Id)); + Assert.NotNull(metric.Name); + Assert.False(string.IsNullOrWhiteSpace(metric.Type)); + } + } + else + { + Assert.Null(act); + } + } + + #region MetricDefinition helpers + + private static void Check(IList act) + { + if (act != null) + { + if (act.Count > 0) + { + var metricDef = act[0]; + Assert.False(string.IsNullOrWhiteSpace(metricDef.Id)); + Assert.NotNull(metricDef.Name); + Assert.False(string.IsNullOrWhiteSpace(metricDef.ResourceId)); + } + } + else + { + Assert.Null(act); + } + } + + #endregion + } +} diff --git a/src/SDKs/Monitor/Monitor.Tests/Scenarios/ServiceDiagnosticSettingsTests.cs b/src/SDKs/Monitor/Monitor.Tests/Scenarios/ServiceDiagnosticSettingsTests.cs new file mode 100644 index 000000000000..39fccd154202 --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/Scenarios/ServiceDiagnosticSettingsTests.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Net; +using Monitor.Tests.Helpers; +using Microsoft.Azure.Management.Monitor.Management; +using Microsoft.Azure.Management.Monitor.Management.Models; +using Xunit; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + +namespace Monitor.Tests.Scenarios +{ + public class ServiceDiagnosticSettingsTests : TestBase + { + //private const string ResourceUri = "/subscriptions/4d7e91d4-e930-4bb5-a93d-163aa358e0dc/resourceGroups/Default-Web-westus/providers/microsoft.web/serverFarms/DefaultServerFarm"; + private const string ResourceUri = "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest"; + private RecordedDelegatingHandler handler; + + public ServiceDiagnosticSettingsTests() + : base() + { + handler = new RecordedDelegatingHandler { SubsequentStatusCodeToReturn = HttpStatusCode.OK }; + } + + + /// + /// User needs several permissions before executing these commands. Otherwise it fails for some authorization issue. + /// + [Fact] + [Trait("Category", "Scenario")] + public void CreateGetUpdateServiceDiagnosticSetting() + { + using (MockContext context = MockContext.Start(this.GetType().FullName)) + { + var expResponse = CreateDiagnosticSettings(); + var insightsClient = GetMonitorManagementClient(context, handler); + + var parameters = CreateDiagnosticSettingsParams(); + + ServiceDiagnosticSettingsResource response = insightsClient.ServiceDiagnosticSettings.CreateOrUpdate( + resourceUri: ResourceUri, + parameters: parameters); + + if (!this.IsRecording) + { + Check(response); + + // AreEqual(expResponse, response); + } + + ServiceDiagnosticSettingsResource actualResponse = insightsClient.ServiceDiagnosticSettings.Get(resourceUri: ResourceUri); + + if (!this.IsRecording) + { + Check(actualResponse); + + Utilities.AreEqual(response, actualResponse); + } + + ServiceDiagnosticSettingsResourcePatch patchResource = new ServiceDiagnosticSettingsResourcePatch( + tags: response.Tags, + storageAccountId: response.StorageAccountId, + serviceBusRuleId: response.ServiceBusRuleId, + eventHubAuthorizationRuleId: response.EventHubAuthorizationRuleId, + metrics: response.Metrics, + logs: response.Logs, + workspaceId: response.WorkspaceId + ); + + patchResource.Metrics[0].RetentionPolicy.Days = 10; + patchResource.Metrics[0].RetentionPolicy.Enabled = true; + patchResource.Metrics[0].Enabled = true; + + patchResource.Logs = new List + { + new LogSettings + { + RetentionPolicy = new RetentionPolicy + { + Days = 5, + Enabled = true + } + } + }; + + // TODO: fails with message: 'Category' is not supported + ServiceDiagnosticSettingsResource patchResponse = null; + + Assert.Throws( + () => patchResponse = insightsClient.ServiceDiagnosticSettings.Update( + resourceUri: ResourceUri, + serviceDiagnosticSettingsResource: patchResource)); + + if (!this.IsRecording && patchResponse != null) + { + Check(patchResponse); + + Assert.Equal(actualResponse.Id, patchResponse.Id); + Assert.NotNull(patchResponse.Logs); + Assert.True(patchResource.Metrics[0].Enabled); + } + } + } + + private static ServiceDiagnosticSettingsResource CreateDiagnosticSettingsParams() + { + return new ServiceDiagnosticSettingsResource + { + EventHubAuthorizationRuleId = null, + StorageAccountId = null, // "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-Storage-westus/providers/microsoft.storage/storageaccounts/salp1", + ServiceBusRuleId = null, // "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default/providers/microsoft.servicebus/namespaces/serblp1/authorizationrules/ar1", + WorkspaceId = null, // "providers/microsoft.storage", + Logs = new List(), + Metrics = new List + { + new MetricSettings + { + Enabled = false, + RetentionPolicy = new RetentionPolicy + { + Enabled = false, + Days = 0 + }, + TimeGrain = TimeSpan.FromMinutes(1) + } + }, + Location = string.Empty + }; + } + + private static ServiceDiagnosticSettingsResource CreateDiagnosticSettings() + { + return new ServiceDiagnosticSettingsResource + { + StorageAccountId = "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-Storage-westus/providers/microsoft.storage/storageaccounts/salp1", + //ServiceBusRuleId = "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default/providers/microsoft.servicebus/namespaces/serblp1/authorizationrules/ar1", + WorkspaceId = "providers/microsoft.storage", + Logs = new List + { + new LogSettings + { + RetentionPolicy = new RetentionPolicy + { + Days = 90, + Enabled = true + } + } + }, + Metrics = new List + { + new MetricSettings + { + Enabled = true, + RetentionPolicy = new RetentionPolicy + { + Enabled = true, + Days = 90 + }, + TimeGrain = TimeSpan.FromMinutes(1) + } + } + }; + } + + private static void Check(ServiceDiagnosticSettingsResource act) + { + Assert.False(string.IsNullOrWhiteSpace(act.Name)); + Assert.False(string.IsNullOrWhiteSpace(act.Id)); + } + } +} diff --git a/src/SDKs/Monitor/Monitor.Tests/Scenarios/TestBaseTests.cs b/src/SDKs/Monitor/Monitor.Tests/Scenarios/TestBaseTests.cs new file mode 100644 index 000000000000..4f98ce8395b6 --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/Scenarios/TestBaseTests.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using Monitor.Tests.Helpers; +using Microsoft.Azure.Management.Monitor; +using Microsoft.Azure.Management.Monitor.Models; +using Microsoft.Azure.Management.Monitor.Management; +using Microsoft.Rest; +using Xunit; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Microsoft.Azure.Test.HttpRecorder; +using System.IO; +using Microsoft.Azure.Management.ResourceManager; +using Microsoft.Azure.Management.ResourceManager.Models; + +namespace Monitor.Tests.Scenarios +{ + public class TestBase + { + protected bool IsRecording { get; set; } + + protected ResourceManagementClient ResourceManagementClient { get; private set; } + + public TestBase() + { + // ServiceManagemenet.Common.Models.XunitTracingInterceptor.AddToContext(new ServiceManagemenet.Common.Models.XunitTracingInterceptor(output)); + // HttpMockServer.Matcher = new PermissiveRecordMatcherWithApiExclusion(ignoreResourcesClient: true, providers: providers); + + // Set the path to find the recorded session files (only works in VS locally for .net452) + // HttpMockServer.RecordsDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SessionRecords"); + this.IsRecording = false; + } + + protected MonitorClient GetMonitorClient(MockContext context, RecordedDelegatingHandler handler) + { + if (handler != null) + { + handler.IsPassThrough = true; + } + + MonitorClient client; + string testMode = Environment.GetEnvironmentVariable("AZURE_TEST_MODE"); + if (string.Equals(testMode, "record", StringComparison.OrdinalIgnoreCase)) + { + this.IsRecording = true; + string subId = Environment.GetEnvironmentVariable("AZURE_TEST_SUBSCRIPTIONID"); + subId = string.IsNullOrWhiteSpace(subId) ? "07c0b09d-9f69-4e6e-8d05-f59f67299cb2" : subId; + + TestEnvironment env = new TestEnvironment(connectionString: "SubscriptionId=" + subId); // ;AADTenant=72f988bf-86f1-41af-91ab-2d7cd011db47;UserId=gucalder@microsoft.com"); + client = context.GetServiceClient( + currentEnvironment: env, + handlers: handler ?? new RecordedDelegatingHandler { SubsequentStatusCodeToReturn = System.Net.HttpStatusCode.OK }); + + this.SetResourceManagementClient(env: env, context: context, handler: handler); + } + else + { + client = context.GetServiceClient( + handlers: handler ?? new RecordedDelegatingHandler { SubsequentStatusCodeToReturn = System.Net.HttpStatusCode.OK }); + + this.SetResourceManagementClient(env: null, context: context, handler: handler); + } + + return client; + } + + protected MonitorManagementClient GetMonitorManagementClient(MockContext context, RecordedDelegatingHandler handler) + { + if (handler != null) + { + handler.IsPassThrough = true; + } + + MonitorManagementClient client; + string testMode = Environment.GetEnvironmentVariable("AZURE_TEST_MODE"); + if (string.Equals(testMode, "record", StringComparison.OrdinalIgnoreCase)) + { + this.IsRecording = true; + string subId = Environment.GetEnvironmentVariable("AZURE_TEST_SUBSCRIPTIONID"); + subId = string.IsNullOrWhiteSpace(subId) ? "07c0b09d-9f69-4e6e-8d05-f59f67299cb2" : subId; + + TestEnvironment env = new TestEnvironment(connectionString: "SubscriptionId=" + subId); // ;AADTenant=72f988bf-86f1-41af-91ab-2d7cd011db47;UserId=gucalder@microsoft.com"); + client = context.GetServiceClient( + currentEnvironment: env, + handlers: handler ?? new RecordedDelegatingHandler { SubsequentStatusCodeToReturn = System.Net.HttpStatusCode.OK }); + + this.SetResourceManagementClient(env: env, context: context, handler: handler); + } + else + { + client = context.GetServiceClient( + handlers: handler ?? new RecordedDelegatingHandler { SubsequentStatusCodeToReturn = System.Net.HttpStatusCode.OK }); + + this.SetResourceManagementClient(env: null, context: context, handler: handler); + } + + return client; + } + + private void SetResourceManagementClient(TestEnvironment env, MockContext context, RecordedDelegatingHandler handler) + { + if (handler != null) + { + handler.IsPassThrough = true; + } + + if (env != null) + { + this.ResourceManagementClient = context.GetServiceClient( + currentEnvironment: env, + handlers: handler ?? new RecordedDelegatingHandler { SubsequentStatusCodeToReturn = System.Net.HttpStatusCode.OK }); + } + else + { + this.ResourceManagementClient = context.GetServiceClient( + handlers: handler ?? new RecordedDelegatingHandler { SubsequentStatusCodeToReturn = System.Net.HttpStatusCode.OK }); + } + } + + protected bool VerifyExistenceOrCreateResourceGroup(string resourceGroupName, string location) + { + if (this.ResourceManagementClient == null) + { + throw new NullReferenceException("ResourceManagementClient not created."); + } + + if (this.ResourceManagementClient.ResourceGroups.CheckExistence(resourceGroupName: resourceGroupName)) + { + return true; + } + + ResourceGroup resourceGroup = new ResourceGroup + { + Location = location, + Name = resourceGroupName + }; + + resourceGroup = this.ResourceManagementClient.ResourceGroups.CreateOrUpdate(resourceGroupName: resourceGroupName, parameters: resourceGroup); + + return true; + } + + protected static void AreEqual(IList exp, IList act) + { + if (exp != null) + { + for (int i = 0; i < exp.Count; i++) + { + Assert.Equal(exp[i], act[i]); + } + } + } + + protected static void AreEqual(IList exp, IList act) + { + if (exp != null) + { + for (int i = 0; i < exp.Count; i++) + { + Assert.Equal(exp[i].LocalizedValue, act[i].LocalizedValue); + Assert.Equal(exp[i].Value, act[i].Value); + } + } + } + + protected static void AreEqual(IList exp, IList act) + { + if (exp != null) + { + for (int i = 0; i < exp.Count; i++) + { + Assert.Equal(exp[i], act[i]); + } + } + } + + protected static void AreEqual(LocalizableString exp, LocalizableString act) + { + if (exp != null) + { + Assert.Equal(exp.LocalizedValue, act.LocalizedValue); + Assert.Equal(exp.Value, act.Value); + } + } + + protected static void AreEqual(IDictionary exp, IDictionary act) + { + if (exp != null) + { + Assert.NotNull(act); + Assert.Equal(exp.Count, act.Count); + foreach (var key in exp.Keys) + { + Assert.Equal(exp[key], act[key]); + } + } + } + } +} diff --git a/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.ActionGroupsTests/CreateEnableListDeleteActionGroup.json b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.ActionGroupsTests/CreateEnableListDeleteActionGroup.json new file mode 100644 index 000000000000..a7c978d37ab1 --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.ActionGroupsTests/CreateEnableListDeleteActionGroup.json @@ -0,0 +1,431 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourcegroups/Default-ActivityLogAlerts?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlZ3JvdXBzL0RlZmF1bHQtQWN0aXZpdHlMb2dBbGVydHM/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b16f539e-5e3e-4191-966e-a1d687fde776" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14977" + ], + "x-ms-request-id": [ + "3fcf8bec-dc5c-4b5e-9a77-4201d7fbec09" + ], + "x-ms-correlation-request-id": [ + "3fcf8bec-dc5c-4b5e-9a77-4201d7fbec09" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T191037Z:3fcf8bec-dc5c-4b5e-9a77-4201d7fbec09" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 19:10:37 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/actionGroups/andygroup-donotuse?api-version=2017-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtQWN0aXZpdHlMb2dBbGVydHMvcHJvdmlkZXJzL21pY3Jvc29mdC5pbnNpZ2h0cy9hY3Rpb25Hcm91cHMvYW5keWdyb3VwLWRvbm90dXNlP2FwaS12ZXJzaW9uPTIwMTctMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"groupShortName\": \"andygroup\",\r\n \"enabled\": false,\r\n \"emailReceivers\": [\r\n {\r\n \"name\": \"emailreceiver\",\r\n \"emailAddress\": \"andyshen@microsoft.com\"\r\n }\r\n ],\r\n \"smsReceivers\": [\r\n {\r\n \"name\": \"smsreceiver\",\r\n \"countryCode\": \"1\",\r\n \"phoneNumber\": \"7817386781\"\r\n }\r\n ]\r\n },\r\n \"location\": \"Global\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "408" + ], + "x-ms-client-request-id": [ + "607046f0-00d6-4b07-8672-382a3bbe2a89" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/actionGroups/andygroup-donotuse\",\r\n \"type\": \"Microsoft.Insights/ActionGroups\",\r\n \"name\": \"andygroup-donotuse\",\r\n \"location\": \"Global\",\r\n \"kind\": null,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"groupShortName\": \"andygroup\",\r\n \"enabled\": false,\r\n \"emailReceivers\": [\r\n {\r\n \"name\": \"emailreceiver\",\r\n \"emailAddress\": \"andyshen@microsoft.com\",\r\n \"status\": \"Enabled\"\r\n }\r\n ],\r\n \"smsReceivers\": [\r\n {\r\n \"name\": \"smsreceiver\",\r\n \"countryCode\": \"1\",\r\n \"phoneNumber\": \"7817386781\",\r\n \"status\": \"Enabled\"\r\n }\r\n ],\r\n \"webhookReceivers\": []\r\n },\r\n \"identity\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "578" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "74fda866-97ff-40fc-a6a5-e41da1b0119e" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "84be427c-073b-471f-b44d-6045e539288c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T191042Z:84be427c-073b-471f-b44d-6045e539288c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 19:10:42 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/actionGroups/andygroup-donotuse?api-version=2017-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtQWN0aXZpdHlMb2dBbGVydHMvcHJvdmlkZXJzL21pY3Jvc29mdC5pbnNpZ2h0cy9hY3Rpb25Hcm91cHMvYW5keWdyb3VwLWRvbm90dXNlP2FwaS12ZXJzaW9uPTIwMTctMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "01afd8a1-99ee-49a1-9e00-7d70f0cec40d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/actionGroups/andygroup-donotuse\",\r\n \"type\": \"Microsoft.Insights/ActionGroups\",\r\n \"name\": \"andygroup-donotuse\",\r\n \"location\": \"Global\",\r\n \"kind\": null,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"groupShortName\": \"andygroup\",\r\n \"enabled\": false,\r\n \"emailReceivers\": [\r\n {\r\n \"name\": \"emailreceiver\",\r\n \"emailAddress\": \"andyshen@microsoft.com\",\r\n \"status\": \"Enabled\"\r\n }\r\n ],\r\n \"smsReceivers\": [\r\n {\r\n \"name\": \"smsreceiver\",\r\n \"countryCode\": \"1\",\r\n \"phoneNumber\": \"7817386781\",\r\n \"status\": \"Enabled\"\r\n }\r\n ],\r\n \"webhookReceivers\": []\r\n },\r\n \"identity\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "578" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f713a8fd-e7cf-4bc3-b272-e73d521c3bc1" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14976" + ], + "x-ms-correlation-request-id": [ + "0a89a221-ce67-4b1a-8ef8-a39d3f86316f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T191042Z:0a89a221-ce67-4b1a-8ef8-a39d3f86316f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 19:10:42 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/providers/microsoft.insights/actionGroups?api-version=2017-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Byb3ZpZGVycy9taWNyb3NvZnQuaW5zaWdodHMvYWN0aW9uR3JvdXBzP2FwaS12ZXJzaW9uPTIwMTctMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1f1fd75e-27ca-4e23-bcbd-527f55ecb9ac" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/actionGroups/andygroup-donotuse\",\r\n \"type\": \"Microsoft.Insights/ActionGroups\",\r\n \"name\": \"andygroup-donotuse\",\r\n \"location\": \"Global\",\r\n \"kind\": null,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"groupShortName\": \"andygroup\",\r\n \"enabled\": false,\r\n \"emailReceivers\": [\r\n {\r\n \"name\": \"emailreceiver\",\r\n \"emailAddress\": \"andyshen@microsoft.com\",\r\n \"status\": \"Enabled\"\r\n }\r\n ],\r\n \"smsReceivers\": [\r\n {\r\n \"name\": \"smsreceiver\",\r\n \"countryCode\": \"1\",\r\n \"phoneNumber\": \"7817386781\",\r\n \"status\": \"Enabled\"\r\n }\r\n ],\r\n \"webhookReceivers\": []\r\n },\r\n \"identity\": null\r\n },\r\n {\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-Storage-EastUS/providers/microsoft.insights/actionGroups/nj\",\r\n \"type\": \"Microsoft.Insights/ActionGroups\",\r\n \"name\": \"nj\",\r\n \"location\": \"Global\",\r\n \"kind\": null,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"groupShortName\": \"nj\",\r\n \"enabled\": true,\r\n \"emailReceivers\": [],\r\n \"smsReceivers\": [\r\n {\r\n \"name\": \"jaga-sms\",\r\n \"countryCode\": \"1\",\r\n \"phoneNumber\": \"4253011342\",\r\n \"status\": \"Enabled\"\r\n }\r\n ],\r\n \"webhookReceivers\": []\r\n },\r\n \"identity\": null\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1040" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "de901e18-b11d-43aa-951a-0db9c7c964db" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14975" + ], + "x-ms-correlation-request-id": [ + "6311891d-1d19-4d4d-8229-addbedce4e68" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T191042Z:6311891d-1d19-4d4d-8229-addbedce4e68" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 19:10:42 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/actionGroups?api-version=2017-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtQWN0aXZpdHlMb2dBbGVydHMvcHJvdmlkZXJzL21pY3Jvc29mdC5pbnNpZ2h0cy9hY3Rpb25Hcm91cHM/YXBpLXZlcnNpb249MjAxNy0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "41ca67a2-a287-4c99-9f8c-cedbd92ccfd4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/actionGroups/andygroup-donotuse\",\r\n \"type\": \"Microsoft.Insights/ActionGroups\",\r\n \"name\": \"andygroup-donotuse\",\r\n \"location\": \"Global\",\r\n \"kind\": null,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"groupShortName\": \"andygroup\",\r\n \"enabled\": false,\r\n \"emailReceivers\": [\r\n {\r\n \"name\": \"emailreceiver\",\r\n \"emailAddress\": \"andyshen@microsoft.com\",\r\n \"status\": \"Enabled\"\r\n }\r\n ],\r\n \"smsReceivers\": [\r\n {\r\n \"name\": \"smsreceiver\",\r\n \"countryCode\": \"1\",\r\n \"phoneNumber\": \"7817386781\",\r\n \"status\": \"Enabled\"\r\n }\r\n ],\r\n \"webhookReceivers\": []\r\n },\r\n \"identity\": null\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "590" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "429725ce-4581-44bd-9e14-ca52e183c5ca" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14974" + ], + "x-ms-correlation-request-id": [ + "74bc5f59-b9ab-459e-86e6-b3f4a85b35ff" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T191042Z:74bc5f59-b9ab-459e-86e6-b3f4a85b35ff" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 19:10:42 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/actionGroups/andygroup-donotuse/subscribe?api-version=2017-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtQWN0aXZpdHlMb2dBbGVydHMvcHJvdmlkZXJzL21pY3Jvc29mdC5pbnNpZ2h0cy9hY3Rpb25Hcm91cHMvYW5keWdyb3VwLWRvbm90dXNlL3N1YnNjcmliZT9hcGktdmVyc2lvbj0yMDE3LTA0LTAx", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"receiverName\": \"emailreceiver\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "39" + ], + "x-ms-client-request-id": [ + "033842e7-6318-43ba-9201-7753a3700dbe" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "{\r\n \"Code\": \"ReceiverAlreadyEnabled\",\r\n \"Message\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "48" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a11c1157-4ca5-4ada-ba9d-69061982ba07" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "07878aa8-f707-459d-a563-4099590b56d9" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T191042Z:07878aa8-f707-459d-a563-4099590b56d9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 19:10:42 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 409 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/actionGroups/andygroup-donotuse?api-version=2017-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtQWN0aXZpdHlMb2dBbGVydHMvcHJvdmlkZXJzL21pY3Jvc29mdC5pbnNpZ2h0cy9hY3Rpb25Hcm91cHMvYW5keWdyb3VwLWRvbm90dXNlP2FwaS12ZXJzaW9uPTIwMTctMDQtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bd7c9896-aa48-4586-a8d1-b66cadc87344" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6f214a5b-529d-4910-b00b-82eed778748d" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "b5939f75-55f9-4231-ad33-dc18d3661a8d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T191044Z:b5939f75-55f9-4231-ad33-dc18d3661a8d" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 19:10:43 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "07c0b09d-9f69-4e6e-8d05-f59f67299cb2" + } +} \ No newline at end of file diff --git a/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.ActivityLogAlertsTests/CreateGetListUpdateDeleteActivityLogAlert.json b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.ActivityLogAlertsTests/CreateGetListUpdateDeleteActivityLogAlert.json new file mode 100644 index 000000000000..ad8b2afd523d --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.ActivityLogAlertsTests/CreateGetListUpdateDeleteActivityLogAlert.json @@ -0,0 +1,440 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourcegroups/Default-ActivityLogAlerts?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlZ3JvdXBzL0RlZmF1bHQtQWN0aXZpdHlMb2dBbGVydHM/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f37d5c84-7bd8-4757-bdc2-7fdfa15c3978" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-request-id": [ + "42156623-60bd-408e-9ada-cb04ce4094d7" + ], + "x-ms-correlation-request-id": [ + "42156623-60bd-408e-9ada-cb04ce4094d7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170815T193355Z:42156623-60bd-408e-9ada-cb04ce4094d7" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 19:33:54 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/activityLogAlerts/andy0307rule?api-version=2017-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtQWN0aXZpdHlMb2dBbGVydHMvcHJvdmlkZXJzL21pY3Jvc29mdC5pbnNpZ2h0cy9hY3Rpdml0eUxvZ0FsZXJ0cy9hbmR5MDMwN3J1bGU/YXBpLXZlcnNpb249MjAxNy0wNC0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"scopes\": [\r\n \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2\"\r\n ],\r\n \"enabled\": true,\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"Administrative\"\r\n },\r\n {\r\n \"field\": \"resourceGroup\",\r\n \"equals\": \"andy0307\"\r\n }\r\n ]\r\n },\r\n \"actions\": {\r\n \"actionGroups\": [\r\n {\r\n \"actionGroupId\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/actionGroups/andygroup-donotuse\",\r\n \"webhookProperties\": {}\r\n }\r\n ]\r\n }\r\n },\r\n \"location\": \"Global\",\r\n \"tags\": {}\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "716" + ], + "x-ms-client-request-id": [ + "75f3a21d-7166-4016-a72f-0b731fd681ff" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/activityLogAlerts/andy0307rule\",\r\n \"type\": \"Microsoft.Insights/ActivityLogAlerts\",\r\n \"name\": \"andy0307rule\",\r\n \"location\": \"Global\",\r\n \"kind\": null,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"scopes\": [\r\n \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"Administrative\",\r\n \"containsAny\": null\r\n },\r\n {\r\n \"field\": \"resourceGroup\",\r\n \"equals\": \"andy0307\",\r\n \"containsAny\": null\r\n }\r\n ]\r\n },\r\n \"actions\": {\r\n \"actionGroups\": [\r\n {\r\n \"actionGroupId\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/actionGroups/andygroup-donotuse\",\r\n \"webhookProperties\": {}\r\n }\r\n ]\r\n },\r\n \"enabled\": true,\r\n \"description\": null\r\n },\r\n \"identity\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "782" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "eastus_84aca4bd4a774ee8a450a9e493962dba_636384224383422853" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "bd056590-74c5-4c13-aac2-686980f81d21" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170815T193359Z:bd056590-74c5-4c13-aac2-686980f81d21" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 19:33:58 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/activityLogAlerts/andy0307rule?api-version=2017-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtQWN0aXZpdHlMb2dBbGVydHMvcHJvdmlkZXJzL21pY3Jvc29mdC5pbnNpZ2h0cy9hY3Rpdml0eUxvZ0FsZXJ0cy9hbmR5MDMwN3J1bGU/YXBpLXZlcnNpb249MjAxNy0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "4f63b495-66f4-4dc1-84b1-476743189f42" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/activityLogAlerts/andy0307rule\",\r\n \"type\": \"Microsoft.Insights/ActivityLogAlerts\",\r\n \"name\": \"andy0307rule\",\r\n \"location\": \"Global\",\r\n \"kind\": null,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"scopes\": [\r\n \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"Administrative\",\r\n \"containsAny\": null\r\n },\r\n {\r\n \"field\": \"resourceGroup\",\r\n \"equals\": \"andy0307\",\r\n \"containsAny\": null\r\n }\r\n ]\r\n },\r\n \"actions\": {\r\n \"actionGroups\": [\r\n {\r\n \"actionGroupId\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/actionGroups/andygroup-donotuse\",\r\n \"webhookProperties\": {}\r\n }\r\n ]\r\n },\r\n \"enabled\": true,\r\n \"description\": null\r\n },\r\n \"identity\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "782" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "eastus_f0215981a6b14510b440c68b0d849c51_636384224392643820" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "9b147585-e6f4-4075-bd23-24dc86349a87" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170815T193359Z:9b147585-e6f4-4075-bd23-24dc86349a87" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 19:33:58 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/providers/microsoft.insights/activityLogAlerts?api-version=2017-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Byb3ZpZGVycy9taWNyb3NvZnQuaW5zaWdodHMvYWN0aXZpdHlMb2dBbGVydHM/YXBpLXZlcnNpb249MjAxNy0wNC0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "aeadb012-7a25-4522-89f2-c0250a3c28f7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/activityLogAlerts/andy0307rule\",\r\n \"type\": \"Microsoft.Insights/ActivityLogAlerts\",\r\n \"name\": \"andy0307rule\",\r\n \"location\": \"Global\",\r\n \"kind\": null,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"scopes\": [\r\n \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"Administrative\",\r\n \"containsAny\": null\r\n },\r\n {\r\n \"field\": \"resourceGroup\",\r\n \"equals\": \"andy0307\",\r\n \"containsAny\": null\r\n }\r\n ]\r\n },\r\n \"actions\": {\r\n \"actionGroups\": [\r\n {\r\n \"actionGroupId\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/actionGroups/andygroup-donotuse\",\r\n \"webhookProperties\": {}\r\n }\r\n ]\r\n },\r\n \"enabled\": true,\r\n \"description\": null\r\n },\r\n \"identity\": null\r\n },\r\n {\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/andygroup03022017/providers/microsoft.insights/activityLogAlerts/andyactivitylogalert0302\",\r\n \"type\": \"Microsoft.Insights/ActivityLogAlerts\",\r\n \"name\": \"andyactivitylogalert0302\",\r\n \"location\": \"Global\",\r\n \"kind\": null,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"scopes\": [\r\n \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"Administrative\",\r\n \"containsAny\": null\r\n },\r\n {\r\n \"field\": \"resourceGroup\",\r\n \"equals\": \"andygroup03022017\",\r\n \"containsAny\": null\r\n },\r\n {\r\n \"field\": \"resourceType\",\r\n \"equals\": \"Microsoft.Resources/deployments\",\r\n \"containsAny\": null\r\n }\r\n ]\r\n },\r\n \"actions\": {\r\n \"actionGroups\": [\r\n {\r\n \"actionGroupId\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/actionGroups/andygroup-donotuse\",\r\n \"webhookProperties\": {}\r\n }\r\n ]\r\n },\r\n \"enabled\": true,\r\n \"description\": null\r\n },\r\n \"identity\": null\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1689" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "eastus_ebf8b25fcec44526b81d24aafdbc1a50_636384224393737461" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "60cae4f1-2005-4bb8-bca5-241e7a29f795" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170815T193359Z:60cae4f1-2005-4bb8-bca5-241e7a29f795" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 19:33:58 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/activityLogAlerts?api-version=2017-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtQWN0aXZpdHlMb2dBbGVydHMvcHJvdmlkZXJzL21pY3Jvc29mdC5pbnNpZ2h0cy9hY3Rpdml0eUxvZ0FsZXJ0cz9hcGktdmVyc2lvbj0yMDE3LTA0LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a9903009-c0ab-442e-a4a3-cb29cef6e3f1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/activityLogAlerts/andy0307rule\",\r\n \"type\": \"Microsoft.Insights/ActivityLogAlerts\",\r\n \"name\": \"andy0307rule\",\r\n \"location\": \"Global\",\r\n \"kind\": null,\r\n \"tags\": {},\r\n \"properties\": {\r\n \"scopes\": [\r\n \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2\"\r\n ],\r\n \"condition\": {\r\n \"allOf\": [\r\n {\r\n \"field\": \"category\",\r\n \"equals\": \"Administrative\",\r\n \"containsAny\": null\r\n },\r\n {\r\n \"field\": \"resourceGroup\",\r\n \"equals\": \"andy0307\",\r\n \"containsAny\": null\r\n }\r\n ]\r\n },\r\n \"actions\": {\r\n \"actionGroups\": [\r\n {\r\n \"actionGroupId\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/actionGroups/andygroup-donotuse\",\r\n \"webhookProperties\": {}\r\n }\r\n ]\r\n },\r\n \"enabled\": true,\r\n \"description\": null\r\n },\r\n \"identity\": null\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "794" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-request-id": [ + "eastus_b321ab900c64414fa4c0687a488afb9a_636384224394987368" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14979" + ], + "x-ms-correlation-request-id": [ + "5bae7d71-82bb-47ce-9d71-d98f2cb4fe94" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170815T193359Z:5bae7d71-82bb-47ce-9d71-d98f2cb4fe94" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 19:33:58 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/activityLogAlerts/andy0307rule?api-version=2017-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtQWN0aXZpdHlMb2dBbGVydHMvcHJvdmlkZXJzL21pY3Jvc29mdC5pbnNpZ2h0cy9hY3Rpdml0eUxvZ0FsZXJ0cy9hbmR5MDMwN3J1bGU/YXBpLXZlcnNpb249MjAxNy0wNC0wMQ==", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"properties\": {\r\n \"enabled\": true\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "49" + ], + "x-ms-client-request-id": [ + "201ee29a-8c02-4a13-8e4c-c44e8279629b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "{\r\n \"Code\": \"ActionIsNull\",\r\n \"Message\": \"Rule actions is null.\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "57" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "eastus_a6d8c5fec5a84690b3911580340350db_636384224397018968" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "170b8dcc-db22-4eb3-a4ae-5ab0d016bb4f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170815T193359Z:170b8dcc-db22-4eb3-a4ae-5ab0d016bb4f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 19:33:58 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 400 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-ActivityLogAlerts/providers/microsoft.insights/activityLogAlerts/andy0307rule?api-version=2017-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlR3JvdXBzL0RlZmF1bHQtQWN0aXZpdHlMb2dBbGVydHMvcHJvdmlkZXJzL21pY3Jvc29mdC5pbnNpZ2h0cy9hY3Rpdml0eUxvZ0FsZXJ0cy9hbmR5MDMwN3J1bGU/YXBpLXZlcnNpb249MjAxNy0wNC0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3f0ad60c-1e47-421f-87f5-c0be1f1933b9" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "eastus_d23e56064dd541f2817bebe3c1733f25_636384224402645297" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "a32ae7e5-9f5e-4965-b7a2-d5aefa81f8c1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170815T193401Z:a32ae7e5-9f5e-4965-b7a2-d5aefa81f8c1" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 19:34:00 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "07c0b09d-9f69-4e6e-8d05-f59f67299cb2" + } +} \ No newline at end of file diff --git a/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.AlertsTests/GetIncidentTest.json b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.AlertsTests/GetIncidentTest.json new file mode 100644 index 000000000000..3a37db88c4ff --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.AlertsTests/GetIncidentTest.json @@ -0,0 +1,68 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourcegroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin/incidents/L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlR3JvdXBzL1JhYzQ2UG9zdFN3YXBSRy9wcm92aWRlcnMvbWljcm9zb2Z0Lmluc2lnaHRzL2FsZXJ0cnVsZXMvY2hpcmljdXRpbjA2MzYzNzEzNjQxNDc2ODQyMDc%3D?api-version=2016-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlZ3JvdXBzL1JhYzQ2UG9zdFN3YXBSRy9wcm92aWRlcnMvbWljcm9zb2Z0Lmluc2lnaHRzL2FsZXJ0cnVsZXMvY2hpcmljdXRpbi9pbmNpZGVudHMvTDNOMVluTmpjbWx3ZEdsdmJuTXZNRGRqTUdJd09XUXRPV1kyT1MwMFpUWmxMVGhrTURVdFpqVTVaalkzTWprNVkySXlMM0psYzI5MWNtTmxSM0p2ZFhCekwxSmhZelEyVUc5emRGTjNZWEJTUnk5d2NtOTJhV1JsY25NdmJXbGpjbTl6YjJaMExtbHVjMmxuYUhSekwyRnNaWEowY25Wc1pYTXZZMmhwY21samRYUnBiakEyTXpZek56RXpOalF4TkRjMk9EUXlNRGMlM0Q/YXBpLXZlcnNpb249MjAxNi0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5a849453-5059-422e-806e-e60e7cba26aa" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.16.1.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlR3JvdXBzL1JhYzQ2UG9zdFN3YXBSRy9wcm92aWRlcnMvbWljcm9zb2Z0Lmluc2lnaHRzL2FsZXJ0cnVsZXMvY2hpcmljdXRpbjA2MzYzNzEzNjQxNDc2ODQyMDc=\",\r\n \"ruleName\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin\",\r\n \"isActive\": false,\r\n \"activatedTime\": \"2017-07-31T15:20:14.7684207-07:00\",\r\n \"resolvedTime\": \"2017-07-31T15:25:15.6721336-07:00\",\r\n \"targetResourceId\": null,\r\n \"targetResourceLocation\": null,\r\n \"legacyResourceId\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "558" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "999560b7-38fb-46c9-b76d-f419ec311b0b" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14986" + ], + "x-ms-correlation-request-id": [ + "da80a4ff-b3c2-4d61-a4a9-77866da95537" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170801T161043Z:da80a4ff-b3c2-4d61-a4a9-77866da95537" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 01 Aug 2017 16:10:43 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "07c0b09d-9f69-4e6e-8d05-f59f67299cb2" + } +} \ No newline at end of file diff --git a/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.AlertsTests/ListGetIncidentsTest.json b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.AlertsTests/ListGetIncidentsTest.json new file mode 100644 index 000000000000..36e3291bb499 --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.AlertsTests/ListGetIncidentsTest.json @@ -0,0 +1,65 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourcegroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin/incidents?api-version=2016-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlZ3JvdXBzL1JhYzQ2UG9zdFN3YXBSRy9wcm92aWRlcnMvbWljcm9zb2Z0Lmluc2lnaHRzL2FsZXJ0cnVsZXMvY2hpcmljdXRpbi9pbmNpZGVudHM/YXBpLXZlcnNpb249MjAxNi0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "53fc99fe-ca44-41c4-a2d3-bb1ba6a8675f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'microsoft.insights/alertrules/chiricutin' under resource group 'Rac46PostSwapRG' was not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "159" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "1bed874e-239f-4385-b22d-abcf57c222f2" + ], + "x-ms-correlation-request-id": [ + "1bed874e-239f-4385-b22d-abcf57c222f2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T203010Z:1bed874e-239f-4385-b22d-abcf57c222f2" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 20:30:09 GMT" + ] + }, + "StatusCode": 404 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "07c0b09d-9f69-4e6e-8d05-f59f67299cb2" + } +} \ No newline at end of file diff --git a/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.AlertsTests/ListIncidentsTest.json b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.AlertsTests/ListIncidentsTest.json new file mode 100644 index 000000000000..6f172c1176aa --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.AlertsTests/ListIncidentsTest.json @@ -0,0 +1,68 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourcegroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin/incidents?api-version=2016-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlZ3JvdXBzL1JhYzQ2UG9zdFN3YXBSRy9wcm92aWRlcnMvbWljcm9zb2Z0Lmluc2lnaHRzL2FsZXJ0cnVsZXMvY2hpcmljdXRpbi9pbmNpZGVudHM/YXBpLXZlcnNpb249MjAxNi0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b40bb477-a47c-4e91-8c06-617821abad06" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.16.1.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlR3JvdXBzL1JhYzQ2UG9zdFN3YXBSRy9wcm92aWRlcnMvbWljcm9zb2Z0Lmluc2lnaHRzL2FsZXJ0cnVsZXMvY2hpcmljdXRpbjA2MzYzNzEzNjQxNDc2ODQyMDc=\",\r\n \"ruleName\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin\",\r\n \"isActive\": false,\r\n \"activatedTime\": \"2017-07-31T15:20:14.7684207-07:00\",\r\n \"resolvedTime\": \"2017-07-31T15:25:15.6721336-07:00\",\r\n \"targetResourceId\": null,\r\n \"targetResourceLocation\": null,\r\n \"legacyResourceId\": null\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "570" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "b20e9c10-876b-4a31-9b46-606ab1885e6c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14987" + ], + "x-ms-correlation-request-id": [ + "da28a45f-8eb1-4e34-94db-fd456deb28d6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170731T225823Z:da28a45f-8eb1-4e34-94db-fd456deb28d6" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 31 Jul 2017 22:58:22 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "07c0b09d-9f69-4e6e-8d05-f59f67299cb2" + } +} \ No newline at end of file diff --git a/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.AlertsTests/MetricBasedRule.json b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.AlertsTests/MetricBasedRule.json new file mode 100644 index 000000000000..a9bd7d4b0140 --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.AlertsTests/MetricBasedRule.json @@ -0,0 +1,488 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourcegroups/Rac46PostSwapRG?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlZ3JvdXBzL1JhYzQ2UG9zdFN3YXBSRz9hcGktdmVyc2lvbj0yMDE3LTA1LTEw", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6ebc8a03-7727-4541-8637-89dcc255adea" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14983" + ], + "x-ms-request-id": [ + "b7591224-c5b1-4d3c-8412-6b7efdb2a172" + ], + "x-ms-correlation-request-id": [ + "b7591224-c5b1-4d3c-8412-6b7efdb2a172" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T202700Z:b7591224-c5b1-4d3c-8412-6b7efdb2a172" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 20:26:59 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourcegroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin?api-version=2016-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlZ3JvdXBzL1JhYzQ2UG9zdFN3YXBSRy9wcm92aWRlcnMvbWljcm9zb2Z0Lmluc2lnaHRzL2FsZXJ0cnVsZXMvY2hpcmljdXRpbj9hcGktdmVyc2lvbj0yMDE2LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"name\": \"chiricutin\",\r\n \"description\": \"description\",\r\n \"isEnabled\": true,\r\n \"condition\": {\r\n \"odata.type\": \"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition\",\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": 2.0,\r\n \"windowSize\": \"PT5M\",\r\n \"timeAggregation\": \"Total\",\r\n \"dataSource\": {\r\n \"odata.type\": \"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource\",\r\n \"metricName\": \"Requests\",\r\n \"resourceUri\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest\"\r\n }\r\n },\r\n \"actions\": [\r\n {\r\n \"odata.type\": \"Microsoft.Azure.Management.Insights.Models.RuleEmailAction\",\r\n \"sendToServiceOwners\": true,\r\n \"customEmails\": [\r\n \"gu@ms.com\"\r\n ]\r\n }\r\n ]\r\n },\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"key1\": \"val1\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "956" + ], + "x-ms-client-request-id": [ + "7680adb1-dcca-4e6c-a959-1307c018d283" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin\",\r\n \"name\": \"chiricutin\",\r\n \"type\": \"Microsoft.Insights/alertRules\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"$type\": \"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage\",\r\n \"key1\": \"val1\"\r\n },\r\n \"properties\": {\r\n \"name\": \"chiricutin\",\r\n \"description\": \"description\",\r\n \"isEnabled\": true,\r\n \"condition\": {\r\n \"$type\": \"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition, Microsoft.WindowsAzure.Management.Mon.Client\",\r\n \"odata.type\": \"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition\",\r\n \"dataSource\": {\r\n \"$type\": \"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource, Microsoft.WindowsAzure.Management.Mon.Client\",\r\n \"odata.type\": \"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource\",\r\n \"resourceUri\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest\",\r\n \"resourceLocation\": null,\r\n \"metricNamespace\": null,\r\n \"metricName\": \"Requests\",\r\n \"legacyResourceId\": null\r\n },\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": 2.0,\r\n \"windowSize\": \"PT5M\",\r\n \"timeAggregation\": \"Total\"\r\n },\r\n \"action\": null,\r\n \"lastUpdatedTime\": \"2017-08-15T20:27:03.4227789Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"actions\": [\r\n {\r\n \"$type\": \"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction, Microsoft.WindowsAzure.Management.Mon.Client\",\r\n \"odata.type\": \"Microsoft.Azure.Management.Insights.Models.RuleEmailAction\",\r\n \"sendToServiceOwners\": true,\r\n \"customEmails\": [\r\n \"gu@ms.com\"\r\n ]\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1615" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c7e90aa0-352a-41e7-8994-cedd56eeb59f" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "ea52bae2-454b-4e2e-80cc-64445dab95c1" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T202703Z:ea52bae2-454b-4e2e-80cc-64445dab95c1" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 20:27:03 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourcegroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin?api-version=2016-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlZ3JvdXBzL1JhYzQ2UG9zdFN3YXBSRy9wcm92aWRlcnMvbWljcm9zb2Z0Lmluc2lnaHRzL2FsZXJ0cnVsZXMvY2hpcmljdXRpbj9hcGktdmVyc2lvbj0yMDE2LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1c8ed884-3485-4867-965a-d4a9472520cd" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin\",\r\n \"name\": \"chiricutin\",\r\n \"type\": \"Microsoft.Insights/alertRules\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"$type\": \"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage\",\r\n \"key1\": \"val1\"\r\n },\r\n \"properties\": {\r\n \"name\": \"chiricutin\",\r\n \"description\": \"description\",\r\n \"isEnabled\": true,\r\n \"condition\": {\r\n \"$type\": \"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition, Microsoft.WindowsAzure.Management.Mon.Client\",\r\n \"odata.type\": \"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition\",\r\n \"dataSource\": {\r\n \"$type\": \"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource, Microsoft.WindowsAzure.Management.Mon.Client\",\r\n \"odata.type\": \"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource\",\r\n \"resourceUri\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest\",\r\n \"resourceLocation\": null,\r\n \"metricNamespace\": null,\r\n \"metricName\": \"Requests\",\r\n \"legacyResourceId\": null\r\n },\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": 2.0,\r\n \"windowSize\": \"PT5M\",\r\n \"timeAggregation\": \"Total\"\r\n },\r\n \"action\": null,\r\n \"lastUpdatedTime\": \"2017-08-15T20:27:03.4227789Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"actions\": [\r\n {\r\n \"$type\": \"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction, Microsoft.WindowsAzure.Management.Mon.Client\",\r\n \"odata.type\": \"Microsoft.Azure.Management.Insights.Models.RuleEmailAction\",\r\n \"sendToServiceOwners\": true,\r\n \"customEmails\": [\r\n \"gu@ms.com\"\r\n ]\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1615" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3a6504f0-7b10-4a30-913f-831a37c5bb4c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14982" + ], + "x-ms-correlation-request-id": [ + "872c8c28-b919-445b-9476-424fc330a4ec" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T202704Z:872c8c28-b919-445b-9476-424fc330a4ec" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 20:27:03 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourcegroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin?api-version=2016-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlZ3JvdXBzL1JhYzQ2UG9zdFN3YXBSRy9wcm92aWRlcnMvbWljcm9zb2Z0Lmluc2lnaHRzL2FsZXJ0cnVsZXMvY2hpcmljdXRpbj9hcGktdmVyc2lvbj0yMDE2LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bf246373-bce0-4415-a9a3-120d4edbd067" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin\",\r\n \"name\": \"chiricutin\",\r\n \"type\": \"Microsoft.Insights/alertRules\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"$type\": \"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage\",\r\n \"key1\": \"val1\"\r\n },\r\n \"properties\": {\r\n \"name\": \"chiricutin\",\r\n \"description\": \"description\",\r\n \"isEnabled\": true,\r\n \"condition\": {\r\n \"$type\": \"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition, Microsoft.WindowsAzure.Management.Mon.Client\",\r\n \"odata.type\": \"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition\",\r\n \"dataSource\": {\r\n \"$type\": \"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource, Microsoft.WindowsAzure.Management.Mon.Client\",\r\n \"odata.type\": \"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource\",\r\n \"resourceUri\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest\",\r\n \"resourceLocation\": null,\r\n \"metricNamespace\": null,\r\n \"metricName\": \"Requests\",\r\n \"legacyResourceId\": null\r\n },\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": 2.0,\r\n \"windowSize\": \"PT5M\",\r\n \"timeAggregation\": \"Total\"\r\n },\r\n \"action\": null,\r\n \"lastUpdatedTime\": \"2017-08-15T20:27:03.4227789Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"actions\": [\r\n {\r\n \"$type\": \"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction, Microsoft.WindowsAzure.Management.Mon.Client\",\r\n \"odata.type\": \"Microsoft.Azure.Management.Insights.Models.RuleEmailAction\",\r\n \"sendToServiceOwners\": true,\r\n \"customEmails\": [\r\n \"gu@ms.com\"\r\n ]\r\n }\r\n ]\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1615" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "32a1e580-6c10-47be-aa27-6ce8b29bc3d6" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "0e00496a-3b6d-46b3-88dc-de76fe618de8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T202704Z:0e00496a-3b6d-46b3-88dc-de76fe618de8" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 20:27:04 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourcegroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin?api-version=2016-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlZ3JvdXBzL1JhYzQ2UG9zdFN3YXBSRy9wcm92aWRlcnMvbWljcm9zb2Z0Lmluc2lnaHRzL2FsZXJ0cnVsZXMvY2hpcmljdXRpbj9hcGktdmVyc2lvbj0yMDE2LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1b2ec719-8a7f-4a15-9e8c-23095ea39479" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'microsoft.insights/alertrules/chiricutin' under resource group 'Rac46PostSwapRG' was not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "159" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "23dcd28c-26b0-435c-a5c1-5d41db46513a" + ], + "x-ms-correlation-request-id": [ + "23dcd28c-26b0-435c-a5c1-5d41db46513a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T202705Z:23dcd28c-26b0-435c-a5c1-5d41db46513a" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 20:27:05 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourcegroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules?api-version=2016-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlZ3JvdXBzL1JhYzQ2UG9zdFN3YXBSRy9wcm92aWRlcnMvbWljcm9zb2Z0Lmluc2lnaHRzL2FsZXJ0cnVsZXM/YXBpLXZlcnNpb249MjAxNi0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "73118344-e2e9-4e53-8c6b-740c6eb58221" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin\",\r\n \"name\": \"chiricutin\",\r\n \"type\": \"Microsoft.Insights/alertRules\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"$type\": \"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage\",\r\n \"key1\": \"val1\"\r\n },\r\n \"properties\": {\r\n \"name\": \"chiricutin\",\r\n \"description\": \"description\",\r\n \"isEnabled\": true,\r\n \"condition\": {\r\n \"$type\": \"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.ThresholdRuleCondition, Microsoft.WindowsAzure.Management.Mon.Client\",\r\n \"odata.type\": \"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition\",\r\n \"dataSource\": {\r\n \"$type\": \"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleMetricDataSource, Microsoft.WindowsAzure.Management.Mon.Client\",\r\n \"odata.type\": \"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource\",\r\n \"resourceUri\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest\",\r\n \"resourceLocation\": null,\r\n \"metricNamespace\": null,\r\n \"metricName\": \"Requests\",\r\n \"legacyResourceId\": null\r\n },\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": 2.0,\r\n \"windowSize\": \"PT5M\",\r\n \"timeAggregation\": \"Total\"\r\n },\r\n \"action\": null,\r\n \"lastUpdatedTime\": \"2017-08-15T20:27:03.4227789Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"actions\": [\r\n {\r\n \"$type\": \"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.RuleEmailAction, Microsoft.WindowsAzure.Management.Mon.Client\",\r\n \"odata.type\": \"Microsoft.Azure.Management.Insights.Models.RuleEmailAction\",\r\n \"sendToServiceOwners\": true,\r\n \"customEmails\": [\r\n \"gu@ms.com\"\r\n ]\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1627" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "4f07dafc-7878-47af-af16-ed0fee8a6e02" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14981" + ], + "x-ms-correlation-request-id": [ + "8d2e2cab-77d0-429a-88f6-ae868d2d24d0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T202704Z:8d2e2cab-77d0-429a-88f6-ae868d2d24d0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 20:27:03 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourcegroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin?api-version=2016-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlZ3JvdXBzL1JhYzQ2UG9zdFN3YXBSRy9wcm92aWRlcnMvbWljcm9zb2Z0Lmluc2lnaHRzL2FsZXJ0cnVsZXMvY2hpcmljdXRpbj9hcGktdmVyc2lvbj0yMDE2LTAzLTAx", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"tags\": {\r\n \"key2\": \"val2\"\r\n },\r\n \"properties\": {\r\n \"name\": \"chiricutin\",\r\n \"description\": \"description\",\r\n \"isEnabled\": false,\r\n \"condition\": {\r\n \"odata.type\": \"Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition\",\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\": 2.0,\r\n \"windowSize\": \"PT5M\",\r\n \"timeAggregation\": \"Total\",\r\n \"dataSource\": {\r\n \"odata.type\": \"Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource\",\r\n \"metricName\": \"Requests\",\r\n \"resourceUri\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest\"\r\n }\r\n },\r\n \"actions\": [\r\n {\r\n \"odata.type\": \"Microsoft.Azure.Management.Insights.Models.RuleEmailAction\",\r\n \"sendToServiceOwners\": true,\r\n \"customEmails\": [\r\n \"gu@ms.com\"\r\n ]\r\n }\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "932" + ], + "x-ms-client-request-id": [ + "0d671ba7-9f55-4a74-9430-b29f0874c01c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "{\r\n \"code\": \"BadRequest\",\r\n \"message\": \"The location is invalid.\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "58" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "00000000-0000-0000-0000-000000000000" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "c919a5d7-4a10-40e9-b2ac-cbe3d6aa69c4" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T202704Z:c919a5d7-4a10-40e9-b2ac-cbe3d6aa69c4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 20:27:04 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 400 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourcegroups/Rac46PostSwapRG/providers/microsoft.insights/alertrules/chiricutin?api-version=2016-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlZ3JvdXBzL1JhYzQ2UG9zdFN3YXBSRy9wcm92aWRlcnMvbWljcm9zb2Z0Lmluc2lnaHRzL2FsZXJ0cnVsZXMvY2hpcmljdXRpbj9hcGktdmVyc2lvbj0yMDE2LTAzLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7e35a398-9e81-4034-980c-afa2f20d05bc" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "296d19ea-88da-41e4-aeb9-874e40e876b0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "7a5a950e-b182-4b45-8e0d-ee5576b2070b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T202705Z:7a5a950e-b182-4b45-8e0d-ee5576b2070b" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 20:27:04 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "07c0b09d-9f69-4e6e-8d05-f59f67299cb2" + } +} \ No newline at end of file diff --git a/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.AutoscaleTests/MetricBasedFixedAndRecurrent.json b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.AutoscaleTests/MetricBasedFixedAndRecurrent.json new file mode 100644 index 000000000000..335d8cb1ba87 --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.AutoscaleTests/MetricBasedFixedAndRecurrent.json @@ -0,0 +1,428 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourcegroups/vmscalesetrg?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlZ3JvdXBzL3Ztc2NhbGVzZXRyZz9hcGktdmVyc2lvbj0yMDE3LTA1LTEw", + "RequestMethod": "HEAD", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "94da1ef0-a116-412d-99b4-735a30666d04" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14976" + ], + "x-ms-request-id": [ + "1e0aa0fe-ada6-4052-9347-84955c56c4a8" + ], + "x-ms-correlation-request-id": [ + "1e0aa0fe-ada6-4052-9347-84955c56c4a8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T205706Z:1e0aa0fe-ada6-4052-9347-84955c56c4a8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 20:57:06 GMT" + ] + }, + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourcegroups/vmscalesetrg/providers/microsoft.insights/autoscalesettings/setting1?api-version=2015-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlZ3JvdXBzL3Ztc2NhbGVzZXRyZy9wcm92aWRlcnMvbWljcm9zb2Z0Lmluc2lnaHRzL2F1dG9zY2FsZXNldHRpbmdzL3NldHRpbmcxP2FwaS12ZXJzaW9uPTIwMTUtMDQtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"profiles\": [\r\n {\r\n \"name\": \"Profile1\",\r\n \"capacity\": {\r\n \"minimum\": \"1\",\r\n \"maximum\": \"10\",\r\n \"default\": \"1\"\r\n },\r\n \"rules\": [\r\n {\r\n \"metricTrigger\": {\r\n \"metricName\": \"Percentage CPU\",\r\n \"metricResourceUri\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/vmscalesetrg/providers/Microsoft.Compute/virtualMachineScaleSets/vmscaleset\",\r\n \"timeGrain\": \"PT1M\",\r\n \"statistic\": \"Average\",\r\n \"timeWindow\": \"PT1H\",\r\n \"timeAggregation\": \"Maximum\",\r\n \"operator\": \"Equals\",\r\n \"threshold\": 80.0\r\n },\r\n \"scaleAction\": {\r\n \"direction\": \"Increase\",\r\n \"type\": \"ChangeCount\",\r\n \"value\": \"1\",\r\n \"cooldown\": \"PT20M\"\r\n }\r\n }\r\n ],\r\n \"fixedDate\": {\r\n \"timeZone\": \"UTC\",\r\n \"start\": \"2014-04-15T21:06:11.7882792Z\",\r\n \"end\": \"2014-04-16T21:06:11.7882792Z\"\r\n }\r\n },\r\n {\r\n \"name\": \"Profile2\",\r\n \"capacity\": {\r\n \"minimum\": \"1\",\r\n \"maximum\": \"10\",\r\n \"default\": \"1\"\r\n },\r\n \"rules\": [\r\n {\r\n \"metricTrigger\": {\r\n \"metricName\": \"Percentage CPU\",\r\n \"metricResourceUri\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/vmscalesetrg/providers/Microsoft.Compute/virtualMachineScaleSets/vmscaleset\",\r\n \"timeGrain\": \"PT1M\",\r\n \"statistic\": \"Average\",\r\n \"timeWindow\": \"PT1H\",\r\n \"timeAggregation\": \"Maximum\",\r\n \"operator\": \"Equals\",\r\n \"threshold\": 80.0\r\n },\r\n \"scaleAction\": {\r\n \"direction\": \"Increase\",\r\n \"type\": \"ChangeCount\",\r\n \"value\": \"1\",\r\n \"cooldown\": \"PT20M\"\r\n }\r\n }\r\n ],\r\n \"recurrence\": {\r\n \"frequency\": \"Week\",\r\n \"schedule\": {\r\n \"timeZone\": \"UTC-11\",\r\n \"days\": [\r\n \"Monday\"\r\n ],\r\n \"hours\": [\r\n 0\r\n ],\r\n \"minutes\": [\r\n 10\r\n ]\r\n }\r\n }\r\n }\r\n ],\r\n \"enabled\": true,\r\n \"name\": \"setting1\",\r\n \"targetResourceUri\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/vmscalesetrg/providers/Microsoft.Compute/virtualMachineScaleSets/vmscaleset\"\r\n },\r\n \"location\": \"eastus\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2609" + ], + "x-ms-client-request-id": [ + "a3fb23a2-a03d-4692-b9a5-bf2d1307d746" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/vmscalesetrg/providers/microsoft.insights/autoscalesettings/setting1\",\r\n \"name\": \"setting1\",\r\n \"type\": \"Microsoft.Insights/autoscaleSettings\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"$type\": \"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage\"\r\n },\r\n \"properties\": {\r\n \"profiles\": [\r\n {\r\n \"name\": \"Profile1\",\r\n \"capacity\": {\r\n \"minimum\": \"1\",\r\n \"maximum\": \"10\",\r\n \"default\": \"1\"\r\n },\r\n \"rules\": [\r\n {\r\n \"metricTrigger\": {\r\n \"metricName\": \"Percentage CPU\",\r\n \"metricNamespace\": \"\",\r\n \"metricResourceUri\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/vmscalesetrg/providers/Microsoft.Compute/virtualMachineScaleSets/vmscaleset\",\r\n \"timeGrain\": \"PT1M\",\r\n \"statistic\": \"Average\",\r\n \"timeWindow\": \"PT1H\",\r\n \"timeAggregation\": \"Maximum\",\r\n \"operator\": \"Equals\",\r\n \"threshold\": 80.0\r\n },\r\n \"scaleAction\": {\r\n \"direction\": \"Increase\",\r\n \"type\": \"ChangeCount\",\r\n \"value\": \"1\",\r\n \"cooldown\": \"PT20M\"\r\n }\r\n }\r\n ],\r\n \"fixedDate\": {\r\n \"timeZone\": \"UTC\",\r\n \"start\": \"2014-04-15T21:06:11.7882792Z\",\r\n \"end\": \"2014-04-16T21:06:11.7882792Z\"\r\n }\r\n },\r\n {\r\n \"name\": \"Profile2\",\r\n \"capacity\": {\r\n \"minimum\": \"1\",\r\n \"maximum\": \"10\",\r\n \"default\": \"1\"\r\n },\r\n \"rules\": [\r\n {\r\n \"metricTrigger\": {\r\n \"metricName\": \"Percentage CPU\",\r\n \"metricNamespace\": \"\",\r\n \"metricResourceUri\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/vmscalesetrg/providers/Microsoft.Compute/virtualMachineScaleSets/vmscaleset\",\r\n \"timeGrain\": \"PT1M\",\r\n \"statistic\": \"Average\",\r\n \"timeWindow\": \"PT1H\",\r\n \"timeAggregation\": \"Maximum\",\r\n \"operator\": \"Equals\",\r\n \"threshold\": 80.0\r\n },\r\n \"scaleAction\": {\r\n \"direction\": \"Increase\",\r\n \"type\": \"ChangeCount\",\r\n \"value\": \"1\",\r\n \"cooldown\": \"PT20M\"\r\n }\r\n }\r\n ],\r\n \"recurrence\": {\r\n \"frequency\": \"Week\",\r\n \"schedule\": {\r\n \"timeZone\": \"UTC-11\",\r\n \"days\": [\r\n \"Monday\"\r\n ],\r\n \"hours\": [\r\n 0\r\n ],\r\n \"minutes\": [\r\n 10\r\n ]\r\n }\r\n }\r\n }\r\n ],\r\n \"enabled\": true,\r\n \"name\": \"setting1\",\r\n \"targetResourceUri\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/vmscalesetrg/providers/Microsoft.Compute/virtualMachineScaleSets/vmscaleset\",\r\n \"notifications\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1914" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "fa18e7b2-ecfb-472d-9462-52dfac267a01" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "daed173a-0c87-452a-91f4-58689e685f30" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T205719Z:daed173a-0c87-452a-91f4-58689e685f30" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 20:57:18 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourcegroups/vmscalesetrg/providers/microsoft.insights/autoscalesettings/setting1?api-version=2015-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlZ3JvdXBzL3Ztc2NhbGVzZXRyZy9wcm92aWRlcnMvbWljcm9zb2Z0Lmluc2lnaHRzL2F1dG9zY2FsZXNldHRpbmdzL3NldHRpbmcxP2FwaS12ZXJzaW9uPTIwMTUtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "347bcb49-2b87-445c-8557-f7328b7bb229" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/vmscalesetrg/providers/microsoft.insights/autoscalesettings/setting1\",\r\n \"name\": \"setting1\",\r\n \"type\": \"Microsoft.Insights/autoscaleSettings\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"$type\": \"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage\"\r\n },\r\n \"properties\": {\r\n \"profiles\": [\r\n {\r\n \"name\": \"Profile1\",\r\n \"capacity\": {\r\n \"minimum\": \"1\",\r\n \"maximum\": \"10\",\r\n \"default\": \"1\"\r\n },\r\n \"rules\": [\r\n {\r\n \"metricTrigger\": {\r\n \"metricName\": \"Percentage CPU\",\r\n \"metricNamespace\": \"\",\r\n \"metricResourceUri\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/vmscalesetrg/providers/Microsoft.Compute/virtualMachineScaleSets/vmscaleset\",\r\n \"timeGrain\": \"PT1M\",\r\n \"statistic\": \"Average\",\r\n \"timeWindow\": \"PT1H\",\r\n \"timeAggregation\": \"Maximum\",\r\n \"operator\": \"Equals\",\r\n \"threshold\": 80.0\r\n },\r\n \"scaleAction\": {\r\n \"direction\": \"Increase\",\r\n \"type\": \"ChangeCount\",\r\n \"value\": \"1\",\r\n \"cooldown\": \"PT20M\"\r\n }\r\n }\r\n ],\r\n \"fixedDate\": {\r\n \"timeZone\": \"UTC\",\r\n \"start\": \"2014-04-15T21:06:11.7882792Z\",\r\n \"end\": \"2014-04-16T21:06:11.7882792Z\"\r\n }\r\n },\r\n {\r\n \"name\": \"Profile2\",\r\n \"capacity\": {\r\n \"minimum\": \"1\",\r\n \"maximum\": \"10\",\r\n \"default\": \"1\"\r\n },\r\n \"rules\": [\r\n {\r\n \"metricTrigger\": {\r\n \"metricName\": \"Percentage CPU\",\r\n \"metricNamespace\": \"\",\r\n \"metricResourceUri\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/vmscalesetrg/providers/Microsoft.Compute/virtualMachineScaleSets/vmscaleset\",\r\n \"timeGrain\": \"PT1M\",\r\n \"statistic\": \"Average\",\r\n \"timeWindow\": \"PT1H\",\r\n \"timeAggregation\": \"Maximum\",\r\n \"operator\": \"Equals\",\r\n \"threshold\": 80.0\r\n },\r\n \"scaleAction\": {\r\n \"direction\": \"Increase\",\r\n \"type\": \"ChangeCount\",\r\n \"value\": \"1\",\r\n \"cooldown\": \"PT20M\"\r\n }\r\n }\r\n ],\r\n \"recurrence\": {\r\n \"frequency\": \"Week\",\r\n \"schedule\": {\r\n \"timeZone\": \"UTC-11\",\r\n \"days\": [\r\n \"Monday\"\r\n ],\r\n \"hours\": [\r\n 0\r\n ],\r\n \"minutes\": [\r\n 10\r\n ]\r\n }\r\n }\r\n }\r\n ],\r\n \"enabled\": true,\r\n \"name\": \"setting1\",\r\n \"targetResourceUri\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/vmscalesetrg/providers/Microsoft.Compute/virtualMachineScaleSets/vmscaleset\",\r\n \"notifications\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1914" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "c1aab4b0-755b-4bcc-a6ff-c4aab6016356" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14975" + ], + "x-ms-correlation-request-id": [ + "e476ea36-c780-4dd5-b2cb-187313dc4071" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T205719Z:e476ea36-c780-4dd5-b2cb-187313dc4071" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 20:57:18 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourcegroups/vmscalesetrg/providers/microsoft.insights/autoscalesettings/setting1?api-version=2015-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlZ3JvdXBzL3Ztc2NhbGVzZXRyZy9wcm92aWRlcnMvbWljcm9zb2Z0Lmluc2lnaHRzL2F1dG9zY2FsZXNldHRpbmdzL3NldHRpbmcxP2FwaS12ZXJzaW9uPTIwMTUtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9db44985-4774-4f71-82e4-f2c05194c657" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/vmscalesetrg/providers/microsoft.insights/autoscalesettings/setting1\",\r\n \"name\": \"setting1\",\r\n \"type\": \"Microsoft.Insights/autoscaleSettings\",\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"$type\": \"Microsoft.WindowsAzure.Management.Common.Storage.CasePreservedDictionary, Microsoft.WindowsAzure.Management.Common.Storage\"\r\n },\r\n \"properties\": {\r\n \"profiles\": [\r\n {\r\n \"name\": \"Profile1\",\r\n \"capacity\": {\r\n \"minimum\": \"1\",\r\n \"maximum\": \"10\",\r\n \"default\": \"1\"\r\n },\r\n \"rules\": [\r\n {\r\n \"metricTrigger\": {\r\n \"metricName\": \"Percentage CPU\",\r\n \"metricNamespace\": \"\",\r\n \"metricResourceUri\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/vmscalesetrg/providers/Microsoft.Compute/virtualMachineScaleSets/vmscaleset\",\r\n \"timeGrain\": \"PT1M\",\r\n \"statistic\": \"Average\",\r\n \"timeWindow\": \"PT1H\",\r\n \"timeAggregation\": \"Maximum\",\r\n \"operator\": \"Equals\",\r\n \"threshold\": 80.0\r\n },\r\n \"scaleAction\": {\r\n \"direction\": \"Increase\",\r\n \"type\": \"ChangeCount\",\r\n \"value\": \"1\",\r\n \"cooldown\": \"PT20M\"\r\n }\r\n }\r\n ],\r\n \"fixedDate\": {\r\n \"timeZone\": \"UTC\",\r\n \"start\": \"2014-04-15T21:06:11.7882792Z\",\r\n \"end\": \"2014-04-16T21:06:11.7882792Z\"\r\n }\r\n },\r\n {\r\n \"name\": \"Profile2\",\r\n \"capacity\": {\r\n \"minimum\": \"1\",\r\n \"maximum\": \"10\",\r\n \"default\": \"1\"\r\n },\r\n \"rules\": [\r\n {\r\n \"metricTrigger\": {\r\n \"metricName\": \"Percentage CPU\",\r\n \"metricNamespace\": \"\",\r\n \"metricResourceUri\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/vmscalesetrg/providers/Microsoft.Compute/virtualMachineScaleSets/vmscaleset\",\r\n \"timeGrain\": \"PT1M\",\r\n \"statistic\": \"Average\",\r\n \"timeWindow\": \"PT1H\",\r\n \"timeAggregation\": \"Maximum\",\r\n \"operator\": \"Equals\",\r\n \"threshold\": 80.0\r\n },\r\n \"scaleAction\": {\r\n \"direction\": \"Increase\",\r\n \"type\": \"ChangeCount\",\r\n \"value\": \"1\",\r\n \"cooldown\": \"PT20M\"\r\n }\r\n }\r\n ],\r\n \"recurrence\": {\r\n \"frequency\": \"Week\",\r\n \"schedule\": {\r\n \"timeZone\": \"UTC-11\",\r\n \"days\": [\r\n \"Monday\"\r\n ],\r\n \"hours\": [\r\n 0\r\n ],\r\n \"minutes\": [\r\n 10\r\n ]\r\n }\r\n }\r\n }\r\n ],\r\n \"enabled\": true,\r\n \"name\": \"setting1\",\r\n \"targetResourceUri\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/vmscalesetrg/providers/Microsoft.Compute/virtualMachineScaleSets/vmscaleset\",\r\n \"notifications\": null\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1914" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "f0d155e9-6d42-4c1e-a50a-fad8ff01b073" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14974" + ], + "x-ms-correlation-request-id": [ + "5ea7384b-62ea-493e-a02f-acaccf6376fb" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T205720Z:5ea7384b-62ea-493e-a02f-acaccf6376fb" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 20:57:19 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourcegroups/vmscalesetrg/providers/microsoft.insights/autoscalesettings/setting1?api-version=2015-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlZ3JvdXBzL3Ztc2NhbGVzZXRyZy9wcm92aWRlcnMvbWljcm9zb2Z0Lmluc2lnaHRzL2F1dG9zY2FsZXNldHRpbmdzL3NldHRpbmcxP2FwaS12ZXJzaW9uPTIwMTUtMDQtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "025927b1-efa5-4149-9d1e-e7d67f3e9f1a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'microsoft.insights/autoscalesettings/setting1' under resource group 'vmscalesetrg' was not found.\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "161" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "f538269e-1a50-4302-b46a-17dc364f7c79" + ], + "x-ms-correlation-request-id": [ + "f538269e-1a50-4302-b46a-17dc364f7c79" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T205721Z:f538269e-1a50-4302-b46a-17dc364f7c79" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 20:57:20 GMT" + ] + }, + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourcegroups/vmscalesetrg/providers/microsoft.insights/autoscalesettings/setting1?api-version=2015-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlZ3JvdXBzL3Ztc2NhbGVzZXRyZy9wcm92aWRlcnMvbWljcm9zb2Z0Lmluc2lnaHRzL2F1dG9zY2FsZXNldHRpbmdzL3NldHRpbmcxP2FwaS12ZXJzaW9uPTIwMTUtMDQtMDE=", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"tags\": {\r\n \"key2\": \"val2\"\r\n },\r\n \"properties\": {\r\n \"profiles\": [\r\n {\r\n \"name\": \"Profile1\",\r\n \"capacity\": {\r\n \"minimum\": \"1\",\r\n \"maximum\": \"10\",\r\n \"default\": \"1\"\r\n },\r\n \"rules\": [\r\n {\r\n \"metricTrigger\": {\r\n \"metricName\": \"Percentage CPU\",\r\n \"metricResourceUri\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/vmscalesetrg/providers/Microsoft.Compute/virtualMachineScaleSets/vmscaleset\",\r\n \"timeGrain\": \"PT1M\",\r\n \"statistic\": \"Average\",\r\n \"timeWindow\": \"PT1H\",\r\n \"timeAggregation\": \"Maximum\",\r\n \"operator\": \"Equals\",\r\n \"threshold\": 80.0\r\n },\r\n \"scaleAction\": {\r\n \"direction\": \"Increase\",\r\n \"type\": \"ChangeCount\",\r\n \"value\": \"1\",\r\n \"cooldown\": \"PT20M\"\r\n }\r\n }\r\n ],\r\n \"fixedDate\": {\r\n \"timeZone\": \"UTC\",\r\n \"start\": \"2014-04-15T21:06:11.7882792Z\",\r\n \"end\": \"2014-04-16T21:06:11.7882792Z\"\r\n }\r\n },\r\n {\r\n \"name\": \"Profile2\",\r\n \"capacity\": {\r\n \"minimum\": \"1\",\r\n \"maximum\": \"10\",\r\n \"default\": \"1\"\r\n },\r\n \"rules\": [\r\n {\r\n \"metricTrigger\": {\r\n \"metricName\": \"Percentage CPU\",\r\n \"metricResourceUri\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/vmscalesetrg/providers/Microsoft.Compute/virtualMachineScaleSets/vmscaleset\",\r\n \"timeGrain\": \"PT1M\",\r\n \"statistic\": \"Average\",\r\n \"timeWindow\": \"PT1H\",\r\n \"timeAggregation\": \"Maximum\",\r\n \"operator\": \"Equals\",\r\n \"threshold\": 80.0\r\n },\r\n \"scaleAction\": {\r\n \"direction\": \"Increase\",\r\n \"type\": \"ChangeCount\",\r\n \"value\": \"1\",\r\n \"cooldown\": \"PT20M\"\r\n }\r\n }\r\n ],\r\n \"recurrence\": {\r\n \"frequency\": \"Week\",\r\n \"schedule\": {\r\n \"timeZone\": \"UTC-11\",\r\n \"days\": [\r\n \"Monday\"\r\n ],\r\n \"hours\": [\r\n 0\r\n ],\r\n \"minutes\": [\r\n 10\r\n ]\r\n }\r\n }\r\n }\r\n ],\r\n \"enabled\": false,\r\n \"name\": \"setting1\",\r\n \"targetResourceUri\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/vmscalesetrg/providers/Microsoft.Compute/virtualMachineScaleSets/vmscaleset\"\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "2624" + ], + "x-ms-client-request-id": [ + "de6d9cde-8ebf-421b-af48-3e6e28030713" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "{\r\n \"code\": \"BadRequest\",\r\n \"message\": \"The location is invalid.\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "58" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "00000000-0000-0000-0000-000000000000" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "70b472b7-f545-4eea-9065-8d3806074fb2" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T205720Z:70b472b7-f545-4eea-9065-8d3806074fb2" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 20:57:19 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 400 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourcegroups/vmscalesetrg/providers/microsoft.insights/autoscalesettings/setting1?api-version=2015-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Jlc291cmNlZ3JvdXBzL3Ztc2NhbGVzZXRyZy9wcm92aWRlcnMvbWljcm9zb2Z0Lmluc2lnaHRzL2F1dG9zY2FsZXNldHRpbmdzL3NldHRpbmcxP2FwaS12ZXJzaW9uPTIwMTUtMDQtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "60084bb4-a2da-44d7-a9c0-3b55731fec49" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.17.0.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "6350d80d-9a5f-43f9-9171-20db84f8a0fc" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "c646c8b5-77ff-48db-a412-51f358023fb3" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170815T205721Z:c646c8b5-77ff-48db-a412-51f358023fb3" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Tue, 15 Aug 2017 20:57:20 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "07c0b09d-9f69-4e6e-8d05-f59f67299cb2" + } +} \ No newline at end of file diff --git a/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.EventDataTests/ListEventsNextTest.json b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.EventDataTests/ListEventsNextTest.json new file mode 100644 index 000000000000..6d4a68c439a5 --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.EventDataTests/ListEventsNextTest.json @@ -0,0 +1,68 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%20'08%2F01%2F2017%2000:00:00%20%2B00:00'%20and%20eventTimestamp%20lt%20'08%2F01%2F2017%2023:59:00%20%2B00:00'&api-version=2015-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Byb3ZpZGVycy9taWNyb3NvZnQuaW5zaWdodHMvZXZlbnR0eXBlcy9tYW5hZ2VtZW50L3ZhbHVlcz8kZmlsdGVyPWV2ZW50VGltZXN0YW1wJTIwZ2UlMjAnMDglMkYwMSUyRjIwMTclMjAwMCUzQTAwJTNBMDAlMjAlMkIwMCUzQTAwJyUyMGFuZCUyMGV2ZW50VGltZXN0YW1wJTIwbHQlMjAnMDglMkYwMSUyRjIwMTclMjAyMyUzQTU5JTNBMDAlMjAlMkIwMCUzQTAwJyZhcGktdmVyc2lvbj0yMDE1LTA0LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1b731d04-720b-4385-8681-4bf4f0d0f84d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.MonitorClient/0.16.1.0" + ] + }, + "ResponseBody": "{\r\n \"Code\": \"BadRequest\",\r\n \"Message\": \"The $filter query parameter value is invalid.\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "79" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "WestUS_dfb6966ddb51454ba59636b9201247a5_636372340839313632" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "af29d471-603f-45e2-a0cb-5ece5e23bf78" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T012803Z:af29d471-603f-45e2-a0cb-5ece5e23bf78" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 01:28:03 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 400 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "07c0b09d-9f69-4e6e-8d05-f59f67299cb2" + } +} \ No newline at end of file diff --git a/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.EventDataTests/ListEventsTest.json b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.EventDataTests/ListEventsTest.json new file mode 100644 index 000000000000..6d4a68c439a5 --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.EventDataTests/ListEventsTest.json @@ -0,0 +1,68 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/providers/microsoft.insights/eventtypes/management/values?$filter=eventTimestamp%20ge%20'08%2F01%2F2017%2000:00:00%20%2B00:00'%20and%20eventTimestamp%20lt%20'08%2F01%2F2017%2023:59:00%20%2B00:00'&api-version=2015-04-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Byb3ZpZGVycy9taWNyb3NvZnQuaW5zaWdodHMvZXZlbnR0eXBlcy9tYW5hZ2VtZW50L3ZhbHVlcz8kZmlsdGVyPWV2ZW50VGltZXN0YW1wJTIwZ2UlMjAnMDglMkYwMSUyRjIwMTclMjAwMCUzQTAwJTNBMDAlMjAlMkIwMCUzQTAwJyUyMGFuZCUyMGV2ZW50VGltZXN0YW1wJTIwbHQlMjAnMDglMkYwMSUyRjIwMTclMjAyMyUzQTU5JTNBMDAlMjAlMkIwMCUzQTAwJyZhcGktdmVyc2lvbj0yMDE1LTA0LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1b731d04-720b-4385-8681-4bf4f0d0f84d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.MonitorClient/0.16.1.0" + ] + }, + "ResponseBody": "{\r\n \"Code\": \"BadRequest\",\r\n \"Message\": \"The $filter query parameter value is invalid.\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "79" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "WestUS_dfb6966ddb51454ba59636b9201247a5_636372340839313632" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "af29d471-603f-45e2-a0cb-5ece5e23bf78" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T012803Z:af29d471-603f-45e2-a0cb-5ece5e23bf78" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 01:28:03 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 400 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "07c0b09d-9f69-4e6e-8d05-f59f67299cb2" + } +} \ No newline at end of file diff --git a/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.LogProfilesTests/CreateGetListUpdateDeleteLogProfile.json b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.LogProfilesTests/CreateGetListUpdateDeleteLogProfile.json new file mode 100644 index 000000000000..cbd99517e530 --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.LogProfilesTests/CreateGetListUpdateDeleteLogProfile.json @@ -0,0 +1,377 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/providers/microsoft.insights/logprofiles/default?api-version=2016-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Byb3ZpZGVycy9taWNyb3NvZnQuaW5zaWdodHMvbG9ncHJvZmlsZXMvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE2LTAzLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"storageAccountId\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-Storage-westus/providers/microsoft.storage/storageaccounts/salp1\",\r\n \"locations\": [\r\n \"global\",\r\n \"eastus\"\r\n ],\r\n \"categories\": [\r\n \"Delete\",\r\n \"Write\"\r\n ],\r\n \"retentionPolicy\": {\r\n \"enabled\": true,\r\n \"days\": 4\r\n }\r\n },\r\n \"location\": \"\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "411" + ], + "x-ms-client-request-id": [ + "ca103bf9-9e8d-4b94-8860-fd2c85ad5e86" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.16.1.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/providers/microsoft.insights/logprofiles/default\",\r\n \"type\": null,\r\n \"name\": \"default\",\r\n \"location\": \"\",\r\n \"kind\": null,\r\n \"tags\": null,\r\n \"properties\": {\r\n \"storageAccountId\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-Storage-westus/providers/microsoft.storage/storageaccounts/salp1\",\r\n \"serviceBusRuleId\": null,\r\n \"locations\": [\r\n \"global\",\r\n \"eastus\"\r\n ],\r\n \"categories\": [\r\n \"Delete\",\r\n \"Write\"\r\n ],\r\n \"retentionPolicy\": {\r\n \"enabled\": true,\r\n \"days\": 4\r\n }\r\n },\r\n \"identity\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "500" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "155be1f3-012a-4795-9885-eadd564cd9fa" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "043d956f-483e-421d-bf4b-a077cd4922a2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170809T182807Z:043d956f-483e-421d-bf4b-a077cd4922a2" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 09 Aug 2017 18:28:06 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/providers/microsoft.insights/logprofiles/default?api-version=2016-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Byb3ZpZGVycy9taWNyb3NvZnQuaW5zaWdodHMvbG9ncHJvZmlsZXMvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE2LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b7e6df9d-1f33-41b1-aad5-9080959d77e8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.16.1.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/providers/microsoft.insights/logprofiles/default\",\r\n \"type\": null,\r\n \"name\": \"default\",\r\n \"location\": null,\r\n \"kind\": null,\r\n \"tags\": null,\r\n \"properties\": {\r\n \"storageAccountId\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-Storage-westus/providers/microsoft.storage/storageaccounts/salp1\",\r\n \"serviceBusRuleId\": null,\r\n \"locations\": [\r\n \"global\",\r\n \"eastus\"\r\n ],\r\n \"categories\": [\r\n \"Delete\",\r\n \"Write\"\r\n ],\r\n \"retentionPolicy\": {\r\n \"enabled\": true,\r\n \"days\": 4\r\n }\r\n },\r\n \"identity\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "502" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "68d6f8c6-4d47-4a5c-b878-bfc73c601446" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14990" + ], + "x-ms-correlation-request-id": [ + "e95d0aae-fb24-445d-822b-1f83e8cca2c4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170809T182807Z:e95d0aae-fb24-445d-822b-1f83e8cca2c4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 09 Aug 2017 18:28:07 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/providers/microsoft.insights/logprofiles/default?api-version=2016-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Byb3ZpZGVycy9taWNyb3NvZnQuaW5zaWdodHMvbG9ncHJvZmlsZXMvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE2LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d383089f-790c-48d3-9e58-35f948bb803c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.16.1.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/providers/microsoft.insights/logprofiles/default\",\r\n \"type\": null,\r\n \"name\": \"default\",\r\n \"location\": null,\r\n \"kind\": null,\r\n \"tags\": null,\r\n \"properties\": {\r\n \"storageAccountId\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-Storage-westus/providers/microsoft.storage/storageaccounts/salp1\",\r\n \"serviceBusRuleId\": null,\r\n \"locations\": [\r\n \"global\",\r\n \"eastus\"\r\n ],\r\n \"categories\": [\r\n \"Delete\",\r\n \"Write\"\r\n ],\r\n \"retentionPolicy\": {\r\n \"enabled\": true,\r\n \"days\": 4\r\n }\r\n },\r\n \"identity\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "502" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "31261453-139c-4e59-887e-84db5470b36c" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14988" + ], + "x-ms-correlation-request-id": [ + "98da4ef4-1153-4834-ac94-ecc04ae831d4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170809T182808Z:98da4ef4-1153-4834-ac94-ecc04ae831d4" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 09 Aug 2017 18:28:07 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/providers/microsoft.insights/logprofiles?api-version=2016-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Byb3ZpZGVycy9taWNyb3NvZnQuaW5zaWdodHMvbG9ncHJvZmlsZXM/YXBpLXZlcnNpb249MjAxNi0wMy0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5ca4025c-fcf0-441c-8224-037bbcfe5b38" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.16.1.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/providers/microsoft.insights/logprofiles/default\",\r\n \"type\": null,\r\n \"name\": \"default\",\r\n \"location\": null,\r\n \"kind\": null,\r\n \"tags\": null,\r\n \"properties\": {\r\n \"storageAccountId\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-Storage-westus/providers/microsoft.storage/storageaccounts/salp1\",\r\n \"serviceBusRuleId\": null,\r\n \"locations\": [\r\n \"global\",\r\n \"eastus\"\r\n ],\r\n \"categories\": [\r\n \"Delete\",\r\n \"Write\"\r\n ],\r\n \"retentionPolicy\": {\r\n \"enabled\": true,\r\n \"days\": 4\r\n }\r\n },\r\n \"identity\": null\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "514" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "85eca943-de4b-48d1-8154-8c2d497b6d48" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14989" + ], + "x-ms-correlation-request-id": [ + "1ce8ea48-bcdc-4af3-b877-2e35ddd67855" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170809T182807Z:1ce8ea48-bcdc-4af3-b877-2e35ddd67855" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 09 Aug 2017 18:28:07 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/providers/microsoft.insights/logprofiles/default?api-version=2016-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Byb3ZpZGVycy9taWNyb3NvZnQuaW5zaWdodHMvbG9ncHJvZmlsZXMvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE2LTAzLTAx", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"properties\": {\r\n \"storageAccountId\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Default-Storage-westus/providers/microsoft.storage/storageaccounts/salp1\",\r\n \"locations\": [\r\n \"global\",\r\n \"eastus\"\r\n ],\r\n \"categories\": [\r\n \"Delete\",\r\n \"Write\"\r\n ],\r\n \"retentionPolicy\": {\r\n \"enabled\": true,\r\n \"days\": 4\r\n }\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "392" + ], + "x-ms-client-request-id": [ + "eba05678-52c9-4a26-b8b2-6cada649f339" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.16.1.0" + ] + }, + "ResponseBody": "{\r\n \"code\": \"Method not allowed\",\r\n \"message\": \"Exception of type 'Microsoft.WindowsAzure.Management.Monitoring.MonitoringServiceException' was thrown.\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "145" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "00000000-0000-0000-0000-000000000000" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "1bdf1cc2-1f51-483e-830f-f147acf1520c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170809T182808Z:1bdf1cc2-1f51-483e-830f-f147acf1520c" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 09 Aug 2017 18:28:07 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 405 + }, + { + "RequestUri": "/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/providers/microsoft.insights/logprofiles/default?api-version=2016-03-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDdjMGIwOWQtOWY2OS00ZTZlLThkMDUtZjU5ZjY3Mjk5Y2IyL3Byb3ZpZGVycy9taWNyb3NvZnQuaW5zaWdodHMvbG9ncHJvZmlsZXMvZGVmYXVsdD9hcGktdmVyc2lvbj0yMDE2LTAzLTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "30eea737-365a-4e70-8cfb-71ac75732163" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.16.1.0" + ] + }, + "ResponseBody": "", + "ResponseHeaders": { + "Content-Length": [ + "0" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "a7973f1c-389e-4a8a-a84f-277e7cd5c92a" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-correlation-request-id": [ + "0aed91fb-0425-4966-bc23-d4592b95e1b5" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170809T182808Z:0aed91fb-0425-4966-bc23-d4592b95e1b5" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 09 Aug 2017 18:28:08 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "07c0b09d-9f69-4e6e-8d05-f59f67299cb2" + } +} \ No newline at end of file diff --git a/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.MetricsTests/GetMetricDefinitionsTest.json b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.MetricsTests/GetMetricDefinitionsTest.json new file mode 100644 index 000000000000..b8e41fc67dc2 --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.MetricsTests/GetMetricDefinitionsTest.json @@ -0,0 +1,68 @@ +{ + "Entries": [ + { + "RequestUri": "//subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricDefinitions?$filter=name.value%20eq%20'Requests'&api-version=2016-03-01", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzA3YzBiMDlkLTlmNjktNGU2ZS04ZDA1LWY1OWY2NzI5OWNiMi9yZXNvdXJjZUdyb3Vwcy9SYWM0NlBvc3RTd2FwUkcvcHJvdmlkZXJzL01pY3Jvc29mdC5XZWIvc2l0ZXMvYWxlcnRydWxlVGVzdC9wcm92aWRlcnMvbWljcm9zb2Z0Lmluc2lnaHRzL21ldHJpY0RlZmluaXRpb25zPyRmaWx0ZXI9bmFtZS52YWx1ZSUyMGVxJTIwJ1JlcXVlc3RzJyZhcGktdmVyc2lvbj0yMDE2LTAzLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d0120469-8716-402c-8fd6-f5a58962b66e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.MonitorClient/0.16.1.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions\",\r\n \"value\": [\r\n {\r\n \"name\": {\r\n \"value\": \"Requests\",\r\n \"localizedValue\": \"Requests\"\r\n },\r\n \"category\": \"AllMetrics\",\r\n \"startTime\": \"0001-01-01T00:00:00Z\",\r\n \"endTime\": \"0001-01-01T00:00:00Z\",\r\n \"unit\": \"Count\",\r\n \"primaryAggregationType\": \"Total\",\r\n \"resourceUri\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest\",\r\n \"resourceId\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest\",\r\n \"metricAvailabilities\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"retention\": \"P30D\",\r\n \"location\": null,\r\n \"blobLocation\": null\r\n },\r\n {\r\n \"timeGrain\": \"PT1H\",\r\n \"retention\": \"P30D\",\r\n \"location\": null,\r\n \"blobLocation\": null\r\n }\r\n ],\r\n \"properties\": null,\r\n \"dimensions\": null,\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metricdefinitions/Requests\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "1078" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "3ff82740-1dcf-45d2-9404-7a20a2c23124" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "8eb745c8-79ad-45cb-9ee2-345e62148dd0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170802T162104Z:8eb745c8-79ad-45cb-9ee2-345e62148dd0" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 16:21:03 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "07c0b09d-9f69-4e6e-8d05-f59f67299cb2" + } +} \ No newline at end of file diff --git a/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.MetricsTests/GetMetricsTest.json b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.MetricsTests/GetMetricsTest.json new file mode 100644 index 000000000000..6c24d748931f --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.MetricsTests/GetMetricsTest.json @@ -0,0 +1,71 @@ +{ + "Entries": [ + { + "RequestUri": "//subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/microsoft.insights/metrics?$filter=(name.value%20eq%20'Requests')%20and%20timeGrain%20eq%20duration'PT1M'%20and%20startTime%20eq%202017-08-01T06:00:00Z%20and%20endTime%20eq%202017-08-02T23:00:00Z&api-version=2016-09-01", + "EncodedRequestUri": "Ly9zdWJzY3JpcHRpb25zLzA3YzBiMDlkLTlmNjktNGU2ZS04ZDA1LWY1OWY2NzI5OWNiMi9yZXNvdXJjZUdyb3Vwcy9SYWM0NlBvc3RTd2FwUkcvcHJvdmlkZXJzL01pY3Jvc29mdC5XZWIvc2l0ZXMvYWxlcnRydWxlVGVzdC9wcm92aWRlcnMvbWljcm9zb2Z0Lmluc2lnaHRzL21ldHJpY3M/JGZpbHRlcj0obmFtZS52YWx1ZSUyMGVxJTIwJ1JlcXVlc3RzJyklMjBhbmQlMjB0aW1lR3JhaW4lMjBlcSUyMGR1cmF0aW9uJ1BUMU0nJTIwYW5kJTIwc3RhcnRUaW1lJTIwZXElMjAyMDE3LTA4LTAxVDA2OjAwOjAwWiUyMGFuZCUyMGVuZFRpbWUlMjBlcSUyMDIwMTctMDgtMDJUMjM6MDA6MDBaJmFwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "11fb204a-9472-4f41-b094-6bd0a6f28c75" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.MonitorClient/0.16.1.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"data\": [\r\n {\r\n \"timeStamp\": \"2017-08-01T06:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T06:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T07:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T08:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T09:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T10:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T11:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T12:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T13:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T14:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T15:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T16:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T17:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T18:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T19:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T20:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T21:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T22:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-01T23:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T00:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T01:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T02:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T03:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T04:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T05:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T06:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T07:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T08:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T09:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T10:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T11:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T12:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T13:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T14:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T15:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T16:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T17:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T18:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T19:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T20:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T21:59:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:00:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:01:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:02:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:03:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:04:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:05:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:06:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:07:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:08:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:09:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:10:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:11:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:12:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:13:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:14:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:15:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:16:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:17:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:18:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:19:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:20:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:21:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:22:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:23:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:24:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:25:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:26:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:27:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:28:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:29:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:30:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:31:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:32:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:33:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:34:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:35:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:36:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:37:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:38:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:39:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:40:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:41:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:42:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:43:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:44:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:45:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:46:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:47:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:48:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:49:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:50:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:51:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:52:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:53:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:54:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:55:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:56:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:57:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:58:00Z\",\r\n \"total\": 0.0\r\n },\r\n {\r\n \"timeStamp\": \"2017-08-02T22:59:00Z\",\r\n \"total\": 0.0\r\n }\r\n ],\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/alertruleTest/providers/Microsoft.Insights/metrics/Requests\",\r\n \"name\": {\r\n \"value\": \"Requests\",\r\n \"localizedValue\": \"Requests\"\r\n },\r\n \"type\": \"Microsoft.Insights/metrics\",\r\n \"unit\": \"Count\"\r\n }\r\n ]\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "120849" + ], + "Content-Type": [ + "application/json" + ], + "Vary": [ + "Accept-Encoding" + ], + "__HandlingServerId__": [ + "shoeboxproxyprod_shoeboxproxyprod-black_MetricsMP_IN_3" + ], + "x-ms-request-id": [ + "{07aebf4a-a62f-4efe-ab0a-0b5a8cf2cdc8}" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14980" + ], + "x-ms-correlation-request-id": [ + "07aebf4a-a62f-4efe-ab0a-0b5a8cf2cdc8" + ], + "x-ms-routing-request-id": [ + "WESTUS:20170802T161856Z:07aebf4a-a62f-4efe-ab0a-0b5a8cf2cdc8" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 02 Aug 2017 16:18:56 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ], + "X-Powered-By": [ + "ASP.NET" + ] + }, + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "07c0b09d-9f69-4e6e-8d05-f59f67299cb2" + } +} \ No newline at end of file diff --git a/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.ServiceDiagnosticSettingsTests/CreateGetUpdateServiceDiagnosticSetting.json b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.ServiceDiagnosticSettingsTests/CreateGetUpdateServiceDiagnosticSetting.json new file mode 100644 index 000000000000..46f2497aafa7 --- /dev/null +++ b/src/SDKs/Monitor/Monitor.Tests/SessionRecords/Monitor.Tests.Scenarios.ServiceDiagnosticSettingsTests/CreateGetUpdateServiceDiagnosticSetting.json @@ -0,0 +1,200 @@ +{ + "Entries": [ + { + "RequestUri": "/%2Fsubscriptions%2F07c0b09d-9f69-4e6e-8d05-f59f67299cb2%2FresourceGroups%2FRac46PostSwapRG%2Fproviders%2FMicrosoft.Web%2Fsites%2FalertruleTest/providers/microsoft.insights/diagnosticSettings/service?api-version=2016-09-01", + "EncodedRequestUri": "LyUyRnN1YnNjcmlwdGlvbnMlMkYwN2MwYjA5ZC05ZjY5LTRlNmUtOGQwNS1mNTlmNjcyOTljYjIlMkZyZXNvdXJjZUdyb3VwcyUyRlJhYzQ2UG9zdFN3YXBSRyUyRnByb3ZpZGVycyUyRk1pY3Jvc29mdC5XZWIlMkZzaXRlcyUyRmFsZXJ0cnVsZVRlc3QvcHJvdmlkZXJzL21pY3Jvc29mdC5pbnNpZ2h0cy9kaWFnbm9zdGljU2V0dGluZ3Mvc2VydmljZT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"metrics\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"enabled\": false,\r\n \"retentionPolicy\": {\r\n \"enabled\": false,\r\n \"days\": 0\r\n }\r\n }\r\n ],\r\n \"logs\": []\r\n },\r\n \"location\": \"\"\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "255" + ], + "x-ms-client-request-id": [ + "6994ff45-9f70-4d7d-8851-80aee7494c11" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.16.1.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourcegroups/rac46postswaprg/providers/microsoft.web/sites/alertruletest/providers/microsoft.insights/diagnosticSettings/service\",\r\n \"type\": null,\r\n \"name\": \"service\",\r\n \"location\": null,\r\n \"kind\": null,\r\n \"tags\": null,\r\n \"properties\": {\r\n \"storageAccountId\": null,\r\n \"serviceBusRuleId\": null,\r\n \"workspaceId\": null,\r\n \"eventHubAuthorizationRuleId\": null,\r\n \"eventHubName\": null,\r\n \"metrics\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"category\": \"AllMetrics\",\r\n \"enabled\": false,\r\n \"retentionPolicy\": {\r\n \"enabled\": false,\r\n \"days\": 0\r\n }\r\n }\r\n ],\r\n \"logs\": null\r\n },\r\n \"identity\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "543" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "bb59fa9f-890c-45d4-b638-ccc285f9ad5f" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "20ba50ec-dac2-431d-bb86-3c5bc180d19e" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170809T191028Z:20ba50ec-dac2-431d-bb86-3c5bc180d19e" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 09 Aug 2017 19:10:28 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/%2Fsubscriptions%2F07c0b09d-9f69-4e6e-8d05-f59f67299cb2%2FresourceGroups%2FRac46PostSwapRG%2Fproviders%2FMicrosoft.Web%2Fsites%2FalertruleTest/providers/microsoft.insights/diagnosticSettings/service?api-version=2016-09-01", + "EncodedRequestUri": "LyUyRnN1YnNjcmlwdGlvbnMlMkYwN2MwYjA5ZC05ZjY5LTRlNmUtOGQwNS1mNTlmNjcyOTljYjIlMkZyZXNvdXJjZUdyb3VwcyUyRlJhYzQ2UG9zdFN3YXBSRyUyRnByb3ZpZGVycyUyRk1pY3Jvc29mdC5XZWIlMkZzaXRlcyUyRmFsZXJ0cnVsZVRlc3QvcHJvdmlkZXJzL21pY3Jvc29mdC5pbnNpZ2h0cy9kaWFnbm9zdGljU2V0dGluZ3Mvc2VydmljZT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "752e02e1-4f98-4374-a78d-173229936285" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.16.1.0" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/07c0b09d-9f69-4e6e-8d05-f59f67299cb2/resourcegroups/rac46postswaprg/providers/microsoft.web/sites/alertruletest/providers/microsoft.insights/diagnosticSettings/service\",\r\n \"type\": null,\r\n \"name\": \"service\",\r\n \"location\": null,\r\n \"kind\": null,\r\n \"tags\": null,\r\n \"properties\": {\r\n \"storageAccountId\": null,\r\n \"serviceBusRuleId\": null,\r\n \"workspaceId\": null,\r\n \"eventHubAuthorizationRuleId\": null,\r\n \"eventHubName\": null,\r\n \"metrics\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"category\": \"AllMetrics\",\r\n \"enabled\": false,\r\n \"retentionPolicy\": {\r\n \"enabled\": false,\r\n \"days\": 0\r\n }\r\n }\r\n ],\r\n \"logs\": []\r\n },\r\n \"identity\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "541" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "8385b62e-6c55-470d-a94c-0840dab16312" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14999" + ], + "x-ms-correlation-request-id": [ + "443232c5-666c-4a6b-b8b7-779519e1a8a9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170809T191029Z:443232c5-666c-4a6b-b8b7-779519e1a8a9" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 09 Aug 2017 19:10:29 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/%2Fsubscriptions%2F07c0b09d-9f69-4e6e-8d05-f59f67299cb2%2FresourceGroups%2FRac46PostSwapRG%2Fproviders%2FMicrosoft.Web%2Fsites%2FalertruleTest/providers/microsoft.insights/diagnosticSettings/service?api-version=2016-09-01", + "EncodedRequestUri": "LyUyRnN1YnNjcmlwdGlvbnMlMkYwN2MwYjA5ZC05ZjY5LTRlNmUtOGQwNS1mNTlmNjcyOTljYjIlMkZyZXNvdXJjZUdyb3VwcyUyRlJhYzQ2UG9zdFN3YXBSRyUyRnByb3ZpZGVycyUyRk1pY3Jvc29mdC5XZWIlMkZzaXRlcyUyRmFsZXJ0cnVsZVRlc3QvcHJvdmlkZXJzL21pY3Jvc29mdC5pbnNpZ2h0cy9kaWFnbm9zdGljU2V0dGluZ3Mvc2VydmljZT9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"properties\": {\r\n \"metrics\": [\r\n {\r\n \"timeGrain\": \"PT1M\",\r\n \"enabled\": true,\r\n \"retentionPolicy\": {\r\n \"enabled\": true,\r\n \"days\": 10\r\n }\r\n }\r\n ],\r\n \"logs\": [\r\n {\r\n \"enabled\": false,\r\n \"retentionPolicy\": {\r\n \"enabled\": true,\r\n \"days\": 5\r\n }\r\n }\r\n ]\r\n }\r\n}", + "RequestHeaders": { + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "376" + ], + "x-ms-client-request-id": [ + "57f86cfb-5bc9-40b5-8408-8ef563bd4ca5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.7.2053.0", + "OSName/WindowsServer2012R2Standard", + "OSVersion/6.3.9600", + "Microsoft.Azure.Management.Monitor.Management.MonitorManagementClient/0.16.1.0" + ] + }, + "ResponseBody": "{\r\n \"code\": \"BadRequest\",\r\n \"message\": \"Category '' is not supported.\"\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "63" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-request-id": [ + "00000000-0000-0000-0000-000000000000" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-correlation-request-id": [ + "d0899486-a6aa-463f-a2f4-6fedc078b6af" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20170809T191029Z:d0899486-a6aa-463f-a2f4-6fedc078b6af" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Wed, 09 Aug 2017 19:10:29 GMT" + ], + "Server": [ + "Microsoft-IIS/8.5" + ] + }, + "StatusCode": 400 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "07c0b09d-9f69-4e6e-8d05-f59f67299cb2" + } +} \ No newline at end of file