diff --git a/src/SDKs/Monitor/AzSdk.RP.props b/src/SDKs/Monitor/AzSdk.RP.props
new file mode 100644
index 000000000000..abd80474d39a
--- /dev/null
+++ b/src/SDKs/Monitor/AzSdk.RP.props
@@ -0,0 +1,7 @@
+
+
+
+ insights_2017-04-01;insights_2015-04-01;insights_2016-03-01;insights_2017-05-01-preview;insights_2017-11-01-preview;
+ $(PackageTags);$(CommonTags);$(AzureApiTag);
+
+
\ No newline at end of file
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActionGroupsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/ActionGroupsOperations.cs
similarity index 84%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActionGroupsOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/ActionGroupsOperations.cs
index 024aedbac907..861b627082da 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActionGroupsOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/ActionGroupsOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
@@ -633,6 +632,210 @@ internal ActionGroupsOperations(MonitorManagementClient client)
return _result;
}
+ ///
+ /// Updates an existing action group's tags. To update other fields use the
+ /// CreateOrUpdate method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the action group.
+ ///
+ ///
+ /// 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 actionGroupName, ActionGroupPatchBody actionGroupPatch, 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 (actionGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "actionGroupName");
+ }
+ if (actionGroupPatch == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "actionGroupPatch");
+ }
+ 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("actionGroupPatch", actionGroupPatch);
+ 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/actionGroups/{actionGroupName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{actionGroupName}", System.Uri.EscapeDataString(actionGroupName));
+ 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(actionGroupPatch != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(actionGroupPatch, 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 action groups in a subscription.
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActionGroupsOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/ActionGroupsOperationsExtensions.cs
similarity index 82%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActionGroupsOperationsExtensions.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/ActionGroupsOperationsExtensions.cs
index adf808ff3f59..b4f462b35ebf 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActionGroupsOperationsExtensions.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/ActionGroupsOperationsExtensions.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
@@ -147,6 +146,54 @@ public static void Delete(this IActionGroupsOperations operations, string resour
(await operations.DeleteWithHttpMessagesAsync(resourceGroupName, actionGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
+ ///
+ /// Updates an existing action group'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 action group.
+ ///
+ ///
+ /// Parameters supplied to the operation.
+ ///
+ public static ActionGroupResource Update(this IActionGroupsOperations operations, string resourceGroupName, string actionGroupName, ActionGroupPatchBody actionGroupPatch)
+ {
+ return operations.UpdateAsync(resourceGroupName, actionGroupName, actionGroupPatch).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Updates an existing action group'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 action group.
+ ///
+ ///
+ /// Parameters supplied to the operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task UpdateAsync(this IActionGroupsOperations operations, string resourceGroupName, string actionGroupName, ActionGroupPatchBody actionGroupPatch, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, actionGroupName, actionGroupPatch, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
///
/// Get a list of all action groups in a subscription.
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActivityLogAlertsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/ActivityLogAlertsOperations.cs
similarity index 99%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActivityLogAlertsOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/ActivityLogAlertsOperations.cs
index 4fb4ef511026..861e5a5c1e24 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActivityLogAlertsOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/ActivityLogAlertsOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActivityLogAlertsOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/ActivityLogAlertsOperationsExtensions.cs
similarity index 98%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActivityLogAlertsOperationsExtensions.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/ActivityLogAlertsOperationsExtensions.cs
index 38f4eecf4095..80f03326243b 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ActivityLogAlertsOperationsExtensions.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/ActivityLogAlertsOperationsExtensions.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/ActivityLogsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/ActivityLogsOperations.cs
similarity index 97%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/ActivityLogsOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/ActivityLogsOperations.cs
index 7ef78eba979e..d0c40a106b04 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/ActivityLogsOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/ActivityLogsOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,11 +6,10 @@
// 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
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Microsoft.Rest.Azure.OData;
@@ -26,7 +26,7 @@ namespace Microsoft.Azure.Management.Monitor
///
/// ActivityLogsOperations operations.
///
- internal partial class ActivityLogsOperations : IServiceOperations, IActivityLogsOperations
+ internal partial class ActivityLogsOperations : IServiceOperations, IActivityLogsOperations
{
///
/// Initializes a new instance of the ActivityLogsOperations class.
@@ -37,7 +37,7 @@ internal partial class ActivityLogsOperations : IServiceOperations
/// Thrown when a required parameter is null
///
- internal ActivityLogsOperations(MonitorClient client)
+ internal ActivityLogsOperations(MonitorManagementClient client)
{
if (client == null)
{
@@ -47,9 +47,9 @@ internal ActivityLogsOperations(MonitorClient client)
}
///
- /// Gets a reference to the MonitorClient
+ /// Gets a reference to the MonitorManagementClient
///
- public MonitorClient Client { get; private set; }
+ public MonitorManagementClient Client { get; private set; }
///
/// Provides the list of records from the activity logs.
@@ -229,7 +229,7 @@ internal ActivityLogsOperations(MonitorClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
@@ -397,7 +397,7 @@ internal ActivityLogsOperations(MonitorClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/ActivityLogsOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/ActivityLogsOperationsExtensions.cs
similarity index 96%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/ActivityLogsOperationsExtensions.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/ActivityLogsOperationsExtensions.cs
index 9318e1dae378..795d50cbd5d7 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/ActivityLogsOperationsExtensions.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/ActivityLogsOperationsExtensions.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,11 +6,10 @@
// 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
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Microsoft.Rest.Azure.OData;
@@ -42,7 +42,7 @@ public static partial class ActivityLogsOperationsExtensions
///
public static IPage List(this IActivityLogsOperations operations, ODataQuery odataQuery = default(ODataQuery), string select = default(string))
{
- return ((IActivityLogsOperations)operations).ListAsync(odataQuery, select).GetAwaiter().GetResult();
+ return operations.ListAsync(odataQuery, select).GetAwaiter().GetResult();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRuleIncidentsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/AlertRuleIncidentsOperations.cs
similarity index 99%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRuleIncidentsOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/AlertRuleIncidentsOperations.cs
index 9a657939d0e1..4f17f6c37e44 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRuleIncidentsOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/AlertRuleIncidentsOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRuleIncidentsOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/AlertRuleIncidentsOperationsExtensions.cs
similarity index 96%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRuleIncidentsOperationsExtensions.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/AlertRuleIncidentsOperationsExtensions.cs
index fecc3699846d..e80fe08e5e80 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRuleIncidentsOperationsExtensions.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/AlertRuleIncidentsOperationsExtensions.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRulesOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/AlertRulesOperations.cs
similarity index 99%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRulesOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/AlertRulesOperations.cs
index d68170b3a470..4a3b43164550 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRulesOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/AlertRulesOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
@@ -400,7 +399,7 @@ internal AlertRulesOperations(MonitorManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 204 && (int)_statusCode != 200)
+ if ((int)_statusCode != 200 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRulesOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/AlertRulesOperationsExtensions.cs
similarity index 98%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRulesOperationsExtensions.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/AlertRulesOperationsExtensions.cs
index f72e2eba7ce6..9745661176b1 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AlertRulesOperationsExtensions.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/AlertRulesOperationsExtensions.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AutoscaleSettingsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/AutoscaleSettingsOperations.cs
similarity index 99%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AutoscaleSettingsOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/AutoscaleSettingsOperations.cs
index 8b51f3e1765d..802b18a5e2bb 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AutoscaleSettingsOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/AutoscaleSettingsOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AutoscaleSettingsOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/AutoscaleSettingsOperationsExtensions.cs
similarity index 98%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AutoscaleSettingsOperationsExtensions.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/AutoscaleSettingsOperationsExtensions.cs
index fe70a79aafbe..ee6900412848 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/AutoscaleSettingsOperationsExtensions.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/AutoscaleSettingsOperationsExtensions.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/DiagnosticSettingsCategoryOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/DiagnosticSettingsCategoryOperations.cs
similarity index 98%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/DiagnosticSettingsCategoryOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/DiagnosticSettingsCategoryOperations.cs
index f901e201ec9a..7869144306cc 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/DiagnosticSettingsCategoryOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/DiagnosticSettingsCategoryOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
@@ -108,7 +107,7 @@ internal DiagnosticSettingsCategoryOperations(MonitorManagementClient client)
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories/{name}").ToString();
- _url = _url.Replace("{resourceUri}", System.Uri.EscapeDataString(resourceUri));
+ _url = _url.Replace("{resourceUri}", resourceUri);
_url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
List _queryParameters = new List();
if (apiVersion != null)
@@ -284,7 +283,7 @@ internal DiagnosticSettingsCategoryOperations(MonitorManagementClient client)
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories").ToString();
- _url = _url.Replace("{resourceUri}", System.Uri.EscapeDataString(resourceUri));
+ _url = _url.Replace("{resourceUri}", resourceUri);
List _queryParameters = new List();
if (apiVersion != null)
{
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/DiagnosticSettingsCategoryOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/DiagnosticSettingsCategoryOperationsExtensions.cs
similarity index 96%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/DiagnosticSettingsCategoryOperationsExtensions.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/DiagnosticSettingsCategoryOperationsExtensions.cs
index 1b370e128288..ebfa0fc72b93 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/DiagnosticSettingsCategoryOperationsExtensions.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/DiagnosticSettingsCategoryOperationsExtensions.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/DiagnosticSettingsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/DiagnosticSettingsOperations.cs
similarity index 98%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/DiagnosticSettingsOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/DiagnosticSettingsOperations.cs
index 4dbb1ed1f51c..edfc46a301d8 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/DiagnosticSettingsOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/DiagnosticSettingsOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
@@ -108,7 +107,7 @@ internal DiagnosticSettingsOperations(MonitorManagementClient client)
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}").ToString();
- _url = _url.Replace("{resourceUri}", System.Uri.EscapeDataString(resourceUri));
+ _url = _url.Replace("{resourceUri}", resourceUri);
_url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
List _queryParameters = new List();
if (apiVersion != null)
@@ -300,7 +299,7 @@ internal DiagnosticSettingsOperations(MonitorManagementClient client)
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}").ToString();
- _url = _url.Replace("{resourceUri}", System.Uri.EscapeDataString(resourceUri));
+ _url = _url.Replace("{resourceUri}", resourceUri);
_url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
List _queryParameters = new List();
if (apiVersion != null)
@@ -487,7 +486,7 @@ internal DiagnosticSettingsOperations(MonitorManagementClient client)
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}").ToString();
- _url = _url.Replace("{resourceUri}", System.Uri.EscapeDataString(resourceUri));
+ _url = _url.Replace("{resourceUri}", resourceUri);
_url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
List _queryParameters = new List();
if (apiVersion != null)
@@ -645,7 +644,7 @@ internal DiagnosticSettingsOperations(MonitorManagementClient client)
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{resourceUri}/providers/microsoft.insights/diagnosticSettings").ToString();
- _url = _url.Replace("{resourceUri}", System.Uri.EscapeDataString(resourceUri));
+ _url = _url.Replace("{resourceUri}", resourceUri);
List _queryParameters = new List();
if (apiVersion != null)
{
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/DiagnosticSettingsOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/DiagnosticSettingsOperationsExtensions.cs
similarity index 97%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/DiagnosticSettingsOperationsExtensions.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/DiagnosticSettingsOperationsExtensions.cs
index d1285d0e90a5..b04fabda1b16 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/DiagnosticSettingsOperationsExtensions.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/DiagnosticSettingsOperationsExtensions.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/EventCategoriesOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/EventCategoriesOperations.cs
similarity index 95%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/EventCategoriesOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/EventCategoriesOperations.cs
index 19f2ca6d26e1..d4fa28f57226 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/EventCategoriesOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/EventCategoriesOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,11 +6,10 @@
// 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
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
@@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.Monitor
///
/// EventCategoriesOperations operations.
///
- internal partial class EventCategoriesOperations : IServiceOperations, IEventCategoriesOperations
+ internal partial class EventCategoriesOperations : IServiceOperations, IEventCategoriesOperations
{
///
/// Initializes a new instance of the EventCategoriesOperations class.
@@ -36,7 +36,7 @@ internal partial class EventCategoriesOperations : IServiceOperations
/// Thrown when a required parameter is null
///
- internal EventCategoriesOperations(MonitorClient client)
+ internal EventCategoriesOperations(MonitorManagementClient client)
{
if (client == null)
{
@@ -46,9 +46,9 @@ internal EventCategoriesOperations(MonitorClient client)
}
///
- /// Gets a reference to the MonitorClient
+ /// Gets a reference to the MonitorManagementClient
///
- public MonitorClient Client { get; private set; }
+ public MonitorManagementClient Client { get; private set; }
///
/// Get the list of available event categories supported in the Activity Logs
@@ -193,7 +193,7 @@ internal EventCategoriesOperations(MonitorClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/EventCategoriesOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/EventCategoriesOperationsExtensions.cs
similarity index 97%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/EventCategoriesOperationsExtensions.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/EventCategoriesOperationsExtensions.cs
index 10d2bb410c97..f4bd0714fd98 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/EventCategoriesOperationsExtensions.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/EventCategoriesOperationsExtensions.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,11 +6,10 @@
// 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
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IActionGroupsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/IActionGroupsOperations.cs
similarity index 83%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IActionGroupsOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/IActionGroupsOperations.cs
index ec5a2017b02d..b120e4a24e13 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IActionGroupsOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/IActionGroupsOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
@@ -100,6 +99,35 @@ public partial interface IActionGroupsOperations
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string actionGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Updates an existing action group's tags. To update other fields use
+ /// the CreateOrUpdate method.
+ ///
+ ///
+ /// The name of the resource group.
+ ///
+ ///
+ /// The name of the action group.
+ ///
+ ///
+ /// 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 actionGroupName, ActionGroupPatchBody actionGroupPatch, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Get a list of all action groups in a subscription.
///
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IActivityLogAlertsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/IActivityLogAlertsOperations.cs
similarity index 97%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IActivityLogAlertsOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/IActivityLogAlertsOperations.cs
index c1f7b6075ea0..5244dcac59f8 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IActivityLogAlertsOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/IActivityLogAlertsOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IActivityLogsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/IActivityLogsOperations.cs
similarity index 98%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IActivityLogsOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/IActivityLogsOperations.cs
index 51debc7e5b57..35a8c12a8afb 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IActivityLogsOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/IActivityLogsOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,11 +6,10 @@
// 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
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Microsoft.Rest.Azure.OData;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IAlertRuleIncidentsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/IAlertRuleIncidentsOperations.cs
similarity index 95%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IAlertRuleIncidentsOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/IAlertRuleIncidentsOperations.cs
index 405f39fc74f5..8a77a721de28 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IAlertRuleIncidentsOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/IAlertRuleIncidentsOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IAlertRulesOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/IAlertRulesOperations.cs
similarity index 97%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IAlertRulesOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/IAlertRulesOperations.cs
index b3612ad8e017..25a7cfceaf50 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IAlertRulesOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/IAlertRulesOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IAutoscaleSettingsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/IAutoscaleSettingsOperations.cs
similarity index 98%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IAutoscaleSettingsOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/IAutoscaleSettingsOperations.cs
index 1e005021284a..70c80c540ff6 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IAutoscaleSettingsOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/IAutoscaleSettingsOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IDiagnosticSettingsCategoryOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/IDiagnosticSettingsCategoryOperations.cs
similarity index 94%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IDiagnosticSettingsCategoryOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/IDiagnosticSettingsCategoryOperations.cs
index 3956c99adc31..98f66214414d 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IDiagnosticSettingsCategoryOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/IDiagnosticSettingsCategoryOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IDiagnosticSettingsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/IDiagnosticSettingsOperations.cs
similarity index 97%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IDiagnosticSettingsOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/IDiagnosticSettingsOperations.cs
index 6090f49a0573..ed683fb71e30 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IDiagnosticSettingsOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/IDiagnosticSettingsOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IEventCategoriesOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/IEventCategoriesOperations.cs
similarity index 96%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IEventCategoriesOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/IEventCategoriesOperations.cs
index 85fb2565dcb4..80737e5455ef 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IEventCategoriesOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/IEventCategoriesOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,11 +6,10 @@
// 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
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ILogProfilesOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/ILogProfilesOperations.cs
similarity index 97%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ILogProfilesOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/ILogProfilesOperations.cs
index d38ab961c815..f9d0fa23a80d 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/ILogProfilesOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/ILogProfilesOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/IMetricBaselineOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/IMetricBaselineOperations.cs
new file mode 100644
index 000000000000..fa417ecdba12
--- /dev/null
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/IMetricBaselineOperations.cs
@@ -0,0 +1,102 @@
+//
+// 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
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// MetricBaselineOperations operations.
+ ///
+ public partial interface IMetricBaselineOperations
+ {
+ ///
+ /// **Gets the baseline values for a specific metric**.
+ ///
+ ///
+ /// The identifier of the resource. It has the following structure:
+ /// subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}.
+ /// For example:
+ /// subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1
+ ///
+ ///
+ /// The name of the metric to retrieve the baseline for.
+ ///
+ ///
+ /// The timespan of the query. It is a string with the following format
+ /// 'startDateTime_ISO/endDateTime_ISO'.
+ ///
+ ///
+ /// The interval (i.e. timegrain) of the query.
+ ///
+ ///
+ /// The aggregation type of the metric to retrieve the baseline for.
+ ///
+ ///
+ /// The list of sensitivities (comma separated) to retrieve.
+ ///
+ ///
+ /// Allows retrieving only metadata of the baseline. On data request
+ /// all information is retrieved. Possible values include: 'Data',
+ /// 'Metadata'
+ ///
+ ///
+ /// 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 resourceUri, string metricName, string timespan = default(string), System.TimeSpan? interval = default(System.TimeSpan?), string aggregation = default(string), string sensitivities = default(string), ResultType? resultType = default(ResultType?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// **Lists the baseline values for a resource**.
+ ///
+ ///
+ /// The identifier of the resource. It has the following structure:
+ /// subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}.
+ /// For example:
+ /// subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1
+ ///
+ ///
+ /// Information that need to be specified to calculate a baseline on a
+ /// time series.
+ ///
+ ///
+ /// 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> CalculateBaselineWithHttpMessagesAsync(string resourceUri, TimeSeriesInformation timeSeriesInformation, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IMetricDefinitionsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/IMetricDefinitionsOperations.cs
similarity index 96%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IMetricDefinitionsOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/IMetricDefinitionsOperations.cs
index ddb89fe74652..3313a81071de 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IMetricDefinitionsOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/IMetricDefinitionsOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,11 +6,10 @@
// 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
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IMetricsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/IMetricsOperations.cs
similarity index 97%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IMetricsOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/IMetricsOperations.cs
index e8e6d83b1f77..6208aede4dc6 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IMetricsOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/IMetricsOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,11 +6,10 @@
// 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
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Microsoft.Rest.Azure.OData;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IMonitorManagementClient.cs b/src/SDKs/Monitor/Management.Monitor/Generated/IMonitorManagementClient.cs
similarity index 77%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IMonitorManagementClient.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/IMonitorManagementClient.cs
index 6658eb5c91aa..a2683a480af5 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IMonitorManagementClient.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/IMonitorManagementClient.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
@@ -109,5 +108,35 @@ public partial interface IMonitorManagementClient : System.IDisposable
///
IActivityLogAlertsOperations ActivityLogAlerts { get; }
+ ///
+ /// Gets the IActivityLogsOperations.
+ ///
+ IActivityLogsOperations ActivityLogs { get; }
+
+ ///
+ /// Gets the IEventCategoriesOperations.
+ ///
+ IEventCategoriesOperations EventCategories { get; }
+
+ ///
+ /// Gets the ITenantActivityLogsOperations.
+ ///
+ ITenantActivityLogsOperations TenantActivityLogs { get; }
+
+ ///
+ /// Gets the IMetricDefinitionsOperations.
+ ///
+ IMetricDefinitionsOperations MetricDefinitions { get; }
+
+ ///
+ /// Gets the IMetricsOperations.
+ ///
+ IMetricsOperations Metrics { get; }
+
+ ///
+ /// Gets the IMetricBaselineOperations.
+ ///
+ IMetricBaselineOperations MetricBaseline { get; }
+
}
}
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/IOperations.cs
similarity index 90%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/IOperations.cs
index 8580d77a3451..8ee5a5628e81 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/IOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/IOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/ITenantActivityLogsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/ITenantActivityLogsOperations.cs
similarity index 98%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/ITenantActivityLogsOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/ITenantActivityLogsOperations.cs
index 169f8c29bcf5..429a7c1539dc 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/ITenantActivityLogsOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/ITenantActivityLogsOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,11 +6,10 @@
// 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
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Microsoft.Rest.Azure.OData;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/LogProfilesOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/LogProfilesOperations.cs
similarity index 99%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/LogProfilesOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/LogProfilesOperations.cs
index 71d6c51de8e5..22c26c0894b2 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/LogProfilesOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/LogProfilesOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/LogProfilesOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/LogProfilesOperationsExtensions.cs
similarity index 98%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/LogProfilesOperationsExtensions.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/LogProfilesOperationsExtensions.cs
index 53cf2287f32d..90792ce0a5f1 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/LogProfilesOperationsExtensions.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/LogProfilesOperationsExtensions.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
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
deleted file mode 100644
index 38e824a80ded..000000000000
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ErrorResponse.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace Microsoft.Azure.Management.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.Linq;
-
- ///
- /// Describes the format of Error response.
- ///
- public partial class ErrorResponse
- {
- ///
- /// Initializes a new instance of the ErrorResponse class.
- ///
- public ErrorResponse()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the ErrorResponse class.
- ///
- /// Error code
- /// Error message indicating why the operation
- /// failed.
- public ErrorResponse(string code = default(string), string message = default(string))
- {
- Code = code;
- Message = message;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets error code
- ///
- [JsonProperty(PropertyName = "code")]
- public string Code { get; set; }
-
- ///
- /// Gets or sets error message indicating why the operation failed.
- ///
- [JsonProperty(PropertyName = "message")]
- public string Message { get; set; }
-
- }
-}
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
deleted file mode 100644
index 746eb871c4de..000000000000
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ErrorResponseException.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace Microsoft.Azure.Management.Monitor.Management.Models
-{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
- using Microsoft.Azure.Management.Monitor.Management;
- using Microsoft.Rest;
-
- ///
- /// Exception thrown for an invalid response with ErrorResponse
- /// information.
- ///
- public class ErrorResponseException : RestException
- {
- ///
- /// Gets information about the associated HTTP request.
- ///
- public HttpRequestMessageWrapper Request { get; set; }
-
- ///
- /// Gets information about the associated HTTP response.
- ///
- public HttpResponseMessageWrapper Response { get; set; }
-
- ///
- /// Gets or sets the body object.
- ///
- public ErrorResponse Body { get; set; }
-
- ///
- /// Initializes a new instance of the ErrorResponseException class.
- ///
- public ErrorResponseException()
- {
- }
-
- ///
- /// Initializes a new instance of the ErrorResponseException class.
- ///
- /// The exception message.
- public ErrorResponseException(string message)
- : this(message, null)
- {
- }
-
- ///
- /// Initializes a new instance of the ErrorResponseException class.
- ///
- /// The exception message.
- /// Inner exception.
- public ErrorResponseException(string message, System.Exception innerException)
- : base(message, innerException)
- {
- }
- }
-}
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
deleted file mode 100644
index 830bedba0c87..000000000000
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Page.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace Microsoft.Azure.Management.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.Azure;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
-
- ///
- /// Defines a page in Azure responses.
- ///
- /// Type of the page content items
- [JsonObject]
- public class Page : IPage
- {
- ///
- /// Gets the link to the next page.
- ///
- [JsonProperty("nextLink")]
- public string NextPageLink { get; private set; }
-
- [JsonProperty("value")]
- private IList Items{ get; set; }
-
- ///
- /// Returns an enumerator that iterates through the collection.
- ///
- /// A an enumerator that can be used to iterate through the collection.
- public IEnumerator GetEnumerator()
- {
- return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator();
- }
-
- ///
- /// Returns an enumerator that iterates through the collection.
- ///
- /// A an enumerator that can be used to iterate through the collection.
- IEnumerator IEnumerable.GetEnumerator()
- {
- return GetEnumerator();
- }
- }
-}
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
deleted file mode 100644
index df3027b61878..000000000000
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Page1.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace Microsoft.Azure.Management.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.Azure;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
-
- ///
- /// Defines a page in Azure responses.
- ///
- /// Type of the page content items
- [JsonObject]
- public class Page1 : IPage
- {
- ///
- /// Gets the link to the next page.
- ///
- [JsonProperty("")]
- public string NextPageLink { get; private set; }
-
- [JsonProperty("value")]
- private IList Items{ get; set; }
-
- ///
- /// Returns an enumerator that iterates through the collection.
- ///
- /// A an enumerator that can be used to iterate through the collection.
- public IEnumerator GetEnumerator()
- {
- return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator();
- }
-
- ///
- /// Returns an enumerator that iterates through the collection.
- ///
- /// A an enumerator that can be used to iterate through the collection.
- IEnumerator IEnumerable.GetEnumerator()
- {
- return GetEnumerator();
- }
- }
-}
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/MetricBaselineOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/MetricBaselineOperations.cs
new file mode 100644
index 000000000000..048ca649aaf3
--- /dev/null
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/MetricBaselineOperations.cs
@@ -0,0 +1,480 @@
+//
+// 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
+{
+ 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;
+
+ ///
+ /// MetricBaselineOperations operations.
+ ///
+ internal partial class MetricBaselineOperations : IServiceOperations, IMetricBaselineOperations
+ {
+ ///
+ /// Initializes a new instance of the MetricBaselineOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal MetricBaselineOperations(MonitorManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the MonitorManagementClient
+ ///
+ public MonitorManagementClient Client { get; private set; }
+
+ ///
+ /// **Gets the baseline values for a specific metric**.
+ ///
+ ///
+ /// The identifier of the resource. It has the following structure:
+ /// subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}.
+ /// For example:
+ /// subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1
+ ///
+ ///
+ /// The name of the metric to retrieve the baseline for.
+ ///
+ ///
+ /// The timespan of the query. It is a string with the following format
+ /// 'startDateTime_ISO/endDateTime_ISO'.
+ ///
+ ///
+ /// The interval (i.e. timegrain) of the query.
+ ///
+ ///
+ /// The aggregation type of the metric to retrieve the baseline for.
+ ///
+ ///
+ /// The list of sensitivities (comma separated) to retrieve.
+ ///
+ ///
+ /// Allows retrieving only metadata of the baseline. On data request all
+ /// information is retrieved. Possible values include: 'Data', 'Metadata'
+ ///
+ ///
+ /// 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 resourceUri, string metricName, string timespan = default(string), System.TimeSpan? interval = default(System.TimeSpan?), string aggregation = default(string), string sensitivities = default(string), ResultType? resultType = default(ResultType?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceUri == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceUri");
+ }
+ if (metricName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "metricName");
+ }
+ string apiVersion = "2017-11-01-preview";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceUri", resourceUri);
+ tracingParameters.Add("metricName", metricName);
+ tracingParameters.Add("timespan", timespan);
+ tracingParameters.Add("interval", interval);
+ tracingParameters.Add("aggregation", aggregation);
+ tracingParameters.Add("sensitivities", sensitivities);
+ tracingParameters.Add("resultType", resultType);
+ 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("/") ? "" : "/")), "{resourceUri}/providers/microsoft.insights/baseline/{metricName}").ToString();
+ _url = _url.Replace("{resourceUri}", resourceUri);
+ _url = _url.Replace("{metricName}", System.Uri.EscapeDataString(metricName));
+ List _queryParameters = new List();
+ if (timespan != null)
+ {
+ _queryParameters.Add(string.Format("timespan={0}", System.Uri.EscapeDataString(timespan)));
+ }
+ if (interval != null)
+ {
+ _queryParameters.Add(string.Format("interval={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(interval, Client.SerializationSettings).Trim('"'))));
+ }
+ if (aggregation != null)
+ {
+ _queryParameters.Add(string.Format("aggregation={0}", System.Uri.EscapeDataString(aggregation)));
+ }
+ if (sensitivities != null)
+ {
+ _queryParameters.Add(string.Format("sensitivities={0}", System.Uri.EscapeDataString(sensitivities)));
+ }
+ if (resultType != null)
+ {
+ _queryParameters.Add(string.Format("resultType={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(resultType, Client.SerializationSettings).Trim('"'))));
+ }
+ 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;
+ }
+
+ ///
+ /// **Lists the baseline values for a resource**.
+ ///
+ ///
+ /// The identifier of the resource. It has the following structure:
+ /// subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}.
+ /// For example:
+ /// subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1
+ ///
+ ///
+ /// Information that need to be specified to calculate a baseline on a time
+ /// series.
+ ///
+ ///
+ /// 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> CalculateBaselineWithHttpMessagesAsync(string resourceUri, TimeSeriesInformation timeSeriesInformation, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceUri == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceUri");
+ }
+ if (timeSeriesInformation == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "timeSeriesInformation");
+ }
+ if (timeSeriesInformation != null)
+ {
+ timeSeriesInformation.Validate();
+ }
+ string apiVersion = "2017-11-01-preview";
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceUri", resourceUri);
+ tracingParameters.Add("apiVersion", apiVersion);
+ tracingParameters.Add("timeSeriesInformation", timeSeriesInformation);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "CalculateBaseline", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{resourceUri}/providers/microsoft.insights/calculatebaseline").ToString();
+ _url = _url.Replace("{resourceUri}", resourceUri);
+ 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(timeSeriesInformation != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(timeSeriesInformation, 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;
+ }
+
+ }
+}
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/MetricBaselineOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/MetricBaselineOperationsExtensions.cs
new file mode 100644
index 000000000000..8cb8be9f8969
--- /dev/null
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/MetricBaselineOperationsExtensions.cs
@@ -0,0 +1,153 @@
+//
+// 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
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for MetricBaselineOperations.
+ ///
+ public static partial class MetricBaselineOperationsExtensions
+ {
+ ///
+ /// **Gets the baseline values for a specific metric**.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The identifier of the resource. It has the following structure:
+ /// subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}.
+ /// For example:
+ /// subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1
+ ///
+ ///
+ /// The name of the metric to retrieve the baseline for.
+ ///
+ ///
+ /// The timespan of the query. It is a string with the following format
+ /// 'startDateTime_ISO/endDateTime_ISO'.
+ ///
+ ///
+ /// The interval (i.e. timegrain) of the query.
+ ///
+ ///
+ /// The aggregation type of the metric to retrieve the baseline for.
+ ///
+ ///
+ /// The list of sensitivities (comma separated) to retrieve.
+ ///
+ ///
+ /// Allows retrieving only metadata of the baseline. On data request all
+ /// information is retrieved. Possible values include: 'Data', 'Metadata'
+ ///
+ public static BaselineResponse Get(this IMetricBaselineOperations operations, string resourceUri, string metricName, string timespan = default(string), System.TimeSpan? interval = default(System.TimeSpan?), string aggregation = default(string), string sensitivities = default(string), ResultType? resultType = default(ResultType?))
+ {
+ return operations.GetAsync(resourceUri, metricName, timespan, interval, aggregation, sensitivities, resultType).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// **Gets the baseline values for a specific metric**.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The identifier of the resource. It has the following structure:
+ /// subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}.
+ /// For example:
+ /// subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1
+ ///
+ ///
+ /// The name of the metric to retrieve the baseline for.
+ ///
+ ///
+ /// The timespan of the query. It is a string with the following format
+ /// 'startDateTime_ISO/endDateTime_ISO'.
+ ///
+ ///
+ /// The interval (i.e. timegrain) of the query.
+ ///
+ ///
+ /// The aggregation type of the metric to retrieve the baseline for.
+ ///
+ ///
+ /// The list of sensitivities (comma separated) to retrieve.
+ ///
+ ///
+ /// Allows retrieving only metadata of the baseline. On data request all
+ /// information is retrieved. Possible values include: 'Data', 'Metadata'
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this IMetricBaselineOperations operations, string resourceUri, string metricName, string timespan = default(string), System.TimeSpan? interval = default(System.TimeSpan?), string aggregation = default(string), string sensitivities = default(string), ResultType? resultType = default(ResultType?), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceUri, metricName, timespan, interval, aggregation, sensitivities, resultType, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// **Lists the baseline values for a resource**.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The identifier of the resource. It has the following structure:
+ /// subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}.
+ /// For example:
+ /// subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1
+ ///
+ ///
+ /// Information that need to be specified to calculate a baseline on a time
+ /// series.
+ ///
+ public static CalculateBaselineResponse CalculateBaseline(this IMetricBaselineOperations operations, string resourceUri, TimeSeriesInformation timeSeriesInformation)
+ {
+ return operations.CalculateBaselineAsync(resourceUri, timeSeriesInformation).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// **Lists the baseline values for a resource**.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The identifier of the resource. It has the following structure:
+ /// subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}.
+ /// For example:
+ /// subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1
+ ///
+ ///
+ /// Information that need to be specified to calculate a baseline on a time
+ /// series.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CalculateBaselineAsync(this IMetricBaselineOperations operations, string resourceUri, TimeSeriesInformation timeSeriesInformation, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CalculateBaselineWithHttpMessagesAsync(resourceUri, timeSeriesInformation, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricDefinitionsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/MetricDefinitionsOperations.cs
similarity index 95%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricDefinitionsOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/MetricDefinitionsOperations.cs
index 5a9479a776f8..b7283ddb83ae 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricDefinitionsOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/MetricDefinitionsOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,11 +6,10 @@
// 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
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
@@ -25,7 +25,7 @@ namespace Microsoft.Azure.Management.Monitor
///
/// MetricDefinitionsOperations operations.
///
- internal partial class MetricDefinitionsOperations : IServiceOperations, IMetricDefinitionsOperations
+ internal partial class MetricDefinitionsOperations : IServiceOperations, IMetricDefinitionsOperations
{
///
/// Initializes a new instance of the MetricDefinitionsOperations class.
@@ -36,7 +36,7 @@ internal partial class MetricDefinitionsOperations : IServiceOperations
/// Thrown when a required parameter is null
///
- internal MetricDefinitionsOperations(MonitorClient client)
+ internal MetricDefinitionsOperations(MonitorManagementClient client)
{
if (client == null)
{
@@ -46,9 +46,9 @@ internal MetricDefinitionsOperations(MonitorClient client)
}
///
- /// Gets a reference to the MonitorClient
+ /// Gets a reference to the MonitorManagementClient
///
- public MonitorClient Client { get; private set; }
+ public MonitorManagementClient Client { get; private set; }
///
/// Lists the metric definitions for the resource.
@@ -206,7 +206,7 @@ internal MetricDefinitionsOperations(MonitorClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricDefinitionsOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/MetricDefinitionsOperationsExtensions.cs
similarity index 97%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricDefinitionsOperationsExtensions.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/MetricDefinitionsOperationsExtensions.cs
index d97180a64058..7a799b3a6955 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricDefinitionsOperationsExtensions.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/MetricDefinitionsOperationsExtensions.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,11 +6,10 @@
// 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
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/MetricsOperations.cs
similarity index 97%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricsOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/MetricsOperations.cs
index b7e2d846eac4..13197f80d922 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricsOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/MetricsOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,11 +6,10 @@
// 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
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Microsoft.Rest.Azure.OData;
@@ -26,7 +26,7 @@ namespace Microsoft.Azure.Management.Monitor
///
/// MetricsOperations operations.
///
- internal partial class MetricsOperations : IServiceOperations, IMetricsOperations
+ internal partial class MetricsOperations : IServiceOperations, IMetricsOperations
{
///
/// Initializes a new instance of the MetricsOperations class.
@@ -37,7 +37,7 @@ internal partial class MetricsOperations : IServiceOperations, IM
///
/// Thrown when a required parameter is null
///
- internal MetricsOperations(MonitorClient client)
+ internal MetricsOperations(MonitorManagementClient client)
{
if (client == null)
{
@@ -47,9 +47,9 @@ internal MetricsOperations(MonitorClient client)
}
///
- /// Gets a reference to the MonitorClient
+ /// Gets a reference to the MonitorManagementClient
///
- public MonitorClient Client { get; private set; }
+ public MonitorManagementClient Client { get; private set; }
///
/// **Lists the metric values for a resource**.
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricsOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/MetricsOperationsExtensions.cs
similarity index 98%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricsOperationsExtensions.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/MetricsOperationsExtensions.cs
index 3655d1e418c0..f4972c302ebf 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MetricsOperationsExtensions.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/MetricsOperationsExtensions.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,11 +6,10 @@
// 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
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Microsoft.Rest.Azure.OData;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Models/ActionGroupPatchBody.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ActionGroupPatchBody.cs
new file mode 100644
index 000000000000..4c3fe3716491
--- /dev/null
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ActionGroupPatchBody.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.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// An action group object for the body of patch operations.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class ActionGroupPatchBody
+ {
+ ///
+ /// Initializes a new instance of the ActionGroupPatchBody class.
+ ///
+ public ActionGroupPatchBody()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ActionGroupPatchBody class.
+ ///
+ /// Resource tags
+ /// Indicates whether this action group is
+ /// enabled. If an action group is not enabled, then none of its
+ /// actions will be activated.
+ public ActionGroupPatchBody(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 action group is enabled. If an
+ /// action group 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/ActionGroupResource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ActionGroupResource.cs
similarity index 67%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActionGroupResource.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/ActionGroupResource.cs
index 75a2a89ce48d..b469ce2befcc 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActionGroupResource.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ActionGroupResource.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -30,7 +28,7 @@ public partial class ActionGroupResource : Resource
///
public ActionGroupResource()
{
- CustomInit();
+ CustomInit();
}
///
@@ -52,7 +50,14 @@ public ActionGroupResource()
/// 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))
+ /// The list of ITSM receivers that are
+ /// part of this action group.
+ /// The list of AzureAppPush
+ /// receivers that are part of this action group.
+ /// The list of
+ /// AutomationRunbook 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), IList itsmReceivers = default(IList), IList azureAppPushReceivers = default(IList), IList automationRunbookReceivers = default(IList))
: base(location, id, name, type, tags)
{
GroupShortName = groupShortName;
@@ -60,6 +65,9 @@ public ActionGroupResource()
EmailReceivers = emailReceivers;
SmsReceivers = smsReceivers;
WebhookReceivers = webhookReceivers;
+ ItsmReceivers = itsmReceivers;
+ AzureAppPushReceivers = azureAppPushReceivers;
+ AutomationRunbookReceivers = automationRunbookReceivers;
CustomInit();
}
@@ -104,6 +112,27 @@ public ActionGroupResource()
[JsonProperty(PropertyName = "properties.webhookReceivers")]
public IList WebhookReceivers { get; set; }
+ ///
+ /// Gets or sets the list of ITSM receivers that are part of this
+ /// action group.
+ ///
+ [JsonProperty(PropertyName = "properties.itsmReceivers")]
+ public IList ItsmReceivers { get; set; }
+
+ ///
+ /// Gets or sets the list of AzureAppPush receivers that are part of
+ /// this action group.
+ ///
+ [JsonProperty(PropertyName = "properties.azureAppPushReceivers")]
+ public IList AzureAppPushReceivers { get; set; }
+
+ ///
+ /// Gets or sets the list of AutomationRunbook receivers that are part
+ /// of this action group.
+ ///
+ [JsonProperty(PropertyName = "properties.automationRunbookReceivers")]
+ public IList AutomationRunbookReceivers { get; set; }
+
///
/// Validate the object.
///
@@ -154,6 +183,36 @@ public override void Validate()
}
}
}
+ if (ItsmReceivers != null)
+ {
+ foreach (var element3 in ItsmReceivers)
+ {
+ if (element3 != null)
+ {
+ element3.Validate();
+ }
+ }
+ }
+ if (AzureAppPushReceivers != null)
+ {
+ foreach (var element4 in AzureAppPushReceivers)
+ {
+ if (element4 != null)
+ {
+ element4.Validate();
+ }
+ }
+ }
+ if (AutomationRunbookReceivers != null)
+ {
+ foreach (var element5 in AutomationRunbookReceivers)
+ {
+ if (element5 != null)
+ {
+ element5.Validate();
+ }
+ }
+ }
}
}
}
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertActionGroup.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ActivityLogAlertActionGroup.cs
similarity index 91%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertActionGroup.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/ActivityLogAlertActionGroup.cs
index 6fcfb91bc2f5..07b3b047ba2a 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertActionGroup.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ActivityLogAlertActionGroup.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -29,7 +27,7 @@ public partial class ActivityLogAlertActionGroup
///
public ActivityLogAlertActionGroup()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertActionList.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ActivityLogAlertActionList.cs
similarity index 86%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertActionList.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/ActivityLogAlertActionList.cs
index 3a6929e7bcf8..a9de7c860ae5 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertActionList.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ActivityLogAlertActionList.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -27,7 +25,7 @@ public partial class ActivityLogAlertActionList
///
public ActivityLogAlertActionList()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertAllOfCondition.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ActivityLogAlertAllOfCondition.cs
similarity index 90%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertAllOfCondition.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/ActivityLogAlertAllOfCondition.cs
index 4baf4af4c540..bd35eba74812 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertAllOfCondition.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ActivityLogAlertAllOfCondition.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -30,7 +28,7 @@ public partial class ActivityLogAlertAllOfCondition
///
public ActivityLogAlertAllOfCondition()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertLeafCondition.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ActivityLogAlertLeafCondition.cs
similarity index 92%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertLeafCondition.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/ActivityLogAlertLeafCondition.cs
index ec5af6a93398..8a951407ad02 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertLeafCondition.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ActivityLogAlertLeafCondition.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -28,7 +26,7 @@ public partial class ActivityLogAlertLeafCondition
///
public ActivityLogAlertLeafCondition()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertPatchBody.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ActivityLogAlertPatchBody.cs
similarity index 89%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertPatchBody.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/ActivityLogAlertPatchBody.cs
index b9acfc5140a2..78a700645914 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertPatchBody.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ActivityLogAlertPatchBody.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -30,7 +28,7 @@ public partial class ActivityLogAlertPatchBody
///
public ActivityLogAlertPatchBody()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertResource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ActivityLogAlertResource.cs
similarity index 95%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertResource.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/ActivityLogAlertResource.cs
index f230ff4f01fb..8ca7e0796dbd 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ActivityLogAlertResource.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ActivityLogAlertResource.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -30,7 +28,7 @@ public partial class ActivityLogAlertResource : Resource
///
public ActivityLogAlertResource()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/AggregationType.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/AggregationType.cs
similarity index 92%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/AggregationType.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/AggregationType.cs
index c20da177a949..fed1698e35fb 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/AggregationType.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/AggregationType.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -37,8 +36,10 @@ public enum AggregationType
}
internal static class AggregationTypeEnumExtension
{
- internal static string ToSerializedValue(this AggregationType? value) =>
- value == null ? null : ((AggregationType)value).ToSerializedValue();
+ internal static string ToSerializedValue(this AggregationType? value)
+ {
+ return value == null ? null : ((AggregationType)value).ToSerializedValue();
+ }
internal static string ToSerializedValue(this AggregationType value)
{
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AlertRuleResource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/AlertRuleResource.cs
similarity index 95%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AlertRuleResource.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/AlertRuleResource.cs
index 126a838160a0..3720c83e68d9 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AlertRuleResource.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/AlertRuleResource.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -30,7 +28,7 @@ public partial class AlertRuleResource : Resource
///
public AlertRuleResource()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AlertRuleResourcePatch.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/AlertRuleResourcePatch.cs
similarity index 94%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AlertRuleResourcePatch.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/AlertRuleResourcePatch.cs
index 7d7cca1e07ca..b80302c7690e 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AlertRuleResourcePatch.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/AlertRuleResourcePatch.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -30,7 +28,7 @@ public partial class AlertRuleResourcePatch
///
public AlertRuleResourcePatch()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Models/AutomationRunbookReceiver.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/AutomationRunbookReceiver.cs
new file mode 100644
index 000000000000..cfedf1c65816
--- /dev/null
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/AutomationRunbookReceiver.cs
@@ -0,0 +1,119 @@
+//
+// 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.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The Azure Automation Runbook notification receiver.
+ ///
+ public partial class AutomationRunbookReceiver
+ {
+ ///
+ /// Initializes a new instance of the AutomationRunbookReceiver class.
+ ///
+ public AutomationRunbookReceiver()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AutomationRunbookReceiver class.
+ ///
+ /// The Azure automation account Id
+ /// which holds this runbook and authenticate to Azure
+ /// resource.
+ /// The name for this runbook.
+ /// The resource id for webhook linked
+ /// to this runbook.
+ /// Indicates whether this instance is
+ /// global runbook.
+ /// Indicates name of the webhook.
+ /// The URI where webhooks should be
+ /// sent.
+ public AutomationRunbookReceiver(string automationAccountId, string runbookName, string webhookResourceId, bool isGlobalRunbook, string name = default(string), string serviceUri = default(string))
+ {
+ AutomationAccountId = automationAccountId;
+ RunbookName = runbookName;
+ WebhookResourceId = webhookResourceId;
+ IsGlobalRunbook = isGlobalRunbook;
+ Name = name;
+ ServiceUri = serviceUri;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the Azure automation account Id which holds this
+ /// runbook and authenticate to Azure resource.
+ ///
+ [JsonProperty(PropertyName = "automationAccountId")]
+ public string AutomationAccountId { get; set; }
+
+ ///
+ /// Gets or sets the name for this runbook.
+ ///
+ [JsonProperty(PropertyName = "runbookName")]
+ public string RunbookName { get; set; }
+
+ ///
+ /// Gets or sets the resource id for webhook linked to this runbook.
+ ///
+ [JsonProperty(PropertyName = "webhookResourceId")]
+ public string WebhookResourceId { get; set; }
+
+ ///
+ /// Gets or sets indicates whether this instance is global runbook.
+ ///
+ [JsonProperty(PropertyName = "isGlobalRunbook")]
+ public bool IsGlobalRunbook { get; set; }
+
+ ///
+ /// Gets or sets indicates name of the webhook.
+ ///
+ [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 (AutomationAccountId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "AutomationAccountId");
+ }
+ if (RunbookName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "RunbookName");
+ }
+ if (WebhookResourceId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "WebhookResourceId");
+ }
+ }
+ }
+}
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleNotification.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/AutoscaleNotification.cs
similarity index 90%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleNotification.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/AutoscaleNotification.cs
index e924e0bbd6a6..8ac9f845761d 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleNotification.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/AutoscaleNotification.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -27,7 +25,7 @@ public partial class AutoscaleNotification
///
public AutoscaleNotification()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleProfile.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/AutoscaleProfile.cs
similarity index 94%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleProfile.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/AutoscaleProfile.cs
index 0f7b62895217..ac0e4a09c11f 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleProfile.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/AutoscaleProfile.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -28,7 +26,7 @@ public partial class AutoscaleProfile
///
public AutoscaleProfile()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleSettingResource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/AutoscaleSettingResource.cs
similarity index 95%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleSettingResource.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/AutoscaleSettingResource.cs
index c5a53f0ea6f4..7ce1047ae27f 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleSettingResource.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/AutoscaleSettingResource.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -30,7 +28,7 @@ public partial class AutoscaleSettingResource : Resource
///
public AutoscaleSettingResource()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleSettingResourcePatch.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/AutoscaleSettingResourcePatch.cs
similarity index 95%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleSettingResourcePatch.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/AutoscaleSettingResourcePatch.cs
index 2dca10d46c53..fc9d799fc6cc 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/AutoscaleSettingResourcePatch.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/AutoscaleSettingResourcePatch.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -31,7 +29,7 @@ public partial class AutoscaleSettingResourcePatch
///
public AutoscaleSettingResourcePatch()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Models/AzureAppPushReceiver.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/AzureAppPushReceiver.cs
new file mode 100644
index 000000000000..70ccc8b1dab0
--- /dev/null
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/AzureAppPushReceiver.cs
@@ -0,0 +1,81 @@
+//
+// 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.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The Azure mobile App push notification receiver.
+ ///
+ public partial class AzureAppPushReceiver
+ {
+ ///
+ /// Initializes a new instance of the AzureAppPushReceiver class.
+ ///
+ public AzureAppPushReceiver()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AzureAppPushReceiver class.
+ ///
+ /// The name of the Azure mobile app push receiver.
+ /// Names must be unique across all receivers within an action
+ /// group.
+ /// The email address registered for the
+ /// Azure mobile app.
+ public AzureAppPushReceiver(string name, string emailAddress)
+ {
+ Name = name;
+ EmailAddress = emailAddress;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the name of the Azure mobile app push 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 registered for the Azure mobile app.
+ ///
+ [JsonProperty(PropertyName = "emailAddress")]
+ public string EmailAddress { get; 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/Models/Baseline.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/Baseline.cs
new file mode 100644
index 000000000000..2aefd3ac9a2c
--- /dev/null
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/Baseline.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.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The baseline values for a single sensitivity value.
+ ///
+ public partial class Baseline
+ {
+ ///
+ /// Initializes a new instance of the Baseline class.
+ ///
+ public Baseline()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Baseline class.
+ ///
+ /// the sensitivity of the baseline. Possible
+ /// values include: 'Low', 'Medium', 'High'
+ /// The low thresholds of the
+ /// baseline.
+ /// The high thresholds of the
+ /// baseline.
+ public Baseline(Sensitivity sensitivity, IList lowThresholds, IList highThresholds)
+ {
+ Sensitivity = sensitivity;
+ LowThresholds = lowThresholds;
+ HighThresholds = highThresholds;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the sensitivity of the baseline. Possible values
+ /// include: 'Low', 'Medium', 'High'
+ ///
+ [JsonProperty(PropertyName = "sensitivity")]
+ public Sensitivity Sensitivity { get; set; }
+
+ ///
+ /// Gets or sets the low thresholds of the baseline.
+ ///
+ [JsonProperty(PropertyName = "lowThresholds")]
+ public IList LowThresholds { get; set; }
+
+ ///
+ /// Gets or sets the high thresholds of the baseline.
+ ///
+ [JsonProperty(PropertyName = "highThresholds")]
+ public IList HighThresholds { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (LowThresholds == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "LowThresholds");
+ }
+ if (HighThresholds == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "HighThresholds");
+ }
+ }
+ }
+}
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Models/BaselineMetadataValue.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/BaselineMetadataValue.cs
new file mode 100644
index 000000000000..637a70d9b84b
--- /dev/null
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/BaselineMetadataValue.cs
@@ -0,0 +1,72 @@
+//
+// 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.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Represents a baseline metadata value.
+ ///
+ public partial class BaselineMetadataValue
+ {
+ ///
+ /// Initializes a new instance of the BaselineMetadataValue class.
+ ///
+ public BaselineMetadataValue()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the BaselineMetadataValue class.
+ ///
+ /// the name of the metadata.
+ /// the value of the metadata.
+ public BaselineMetadataValue(LocalizableString name = default(LocalizableString), string value = default(string))
+ {
+ Name = name;
+ Value = value;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the name of the metadata.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public LocalizableString Name { get; set; }
+
+ ///
+ /// Gets or sets the value of the metadata.
+ ///
+ [JsonProperty(PropertyName = "value")]
+ public string Value { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Name != null)
+ {
+ Name.Validate();
+ }
+ }
+ }
+}
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Models/BaselineResponse.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/BaselineResponse.cs
new file mode 100644
index 000000000000..e5ed2e926842
--- /dev/null
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/BaselineResponse.cs
@@ -0,0 +1,171 @@
+//
+// 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.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The response to a baseline query.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class BaselineResponse
+ {
+ ///
+ /// Initializes a new instance of the BaselineResponse class.
+ ///
+ public BaselineResponse()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the BaselineResponse class.
+ ///
+ /// the metric baseline Id.
+ /// the resource type of the baseline
+ /// resource.
+ /// the name and the display name of the metric,
+ /// i.e. it is localizable string.
+ /// The timespan for which the data was
+ /// retrieved. Its value consists of two datatimes concatenated,
+ /// separated by '/'. This may be adjusted in the future and returned
+ /// back from what was originally requested.
+ /// The interval (window size) for which the
+ /// metric data was returned in. This may be adjusted in the future
+ /// and returned back from what was originally requested. This is not
+ /// present if a metadata request was made.
+ /// The aggregation type of the
+ /// metric.
+ /// the array of timestamps of the
+ /// baselines.
+ /// the baseline values for each
+ /// sensitivity.
+ /// the baseline metadata values.
+ public BaselineResponse(string id = default(string), string type = default(string), LocalizableString name = default(LocalizableString), string timespan = default(string), System.TimeSpan? interval = default(System.TimeSpan?), string aggregation = default(string), IList timestamps = default(IList), IList baseline = default(IList), IList metadata = default(IList))
+ {
+ Id = id;
+ Type = type;
+ Name = name;
+ Timespan = timespan;
+ Interval = interval;
+ Aggregation = aggregation;
+ Timestamps = timestamps;
+ Baseline = baseline;
+ Metadata = metadata;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the metric baseline Id.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ ///
+ /// Gets the resource type of the baseline resource.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ ///
+ /// Gets the name and the display name of the metric, i.e. it is
+ /// localizable string.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public LocalizableString Name { get; private set; }
+
+ ///
+ /// Gets or sets the timespan for which the data was retrieved. Its
+ /// value consists of two datatimes concatenated, separated by '/'.
+ /// This may be adjusted in the future and returned back from what was
+ /// originally requested.
+ ///
+ [JsonProperty(PropertyName = "properties.timespan")]
+ public string Timespan { get; set; }
+
+ ///
+ /// Gets or sets the interval (window size) for which the metric data
+ /// was returned in. This may be adjusted in the future and returned
+ /// back from what was originally requested. This is not present if a
+ /// metadata request was made.
+ ///
+ [JsonProperty(PropertyName = "properties.interval")]
+ public System.TimeSpan? Interval { get; set; }
+
+ ///
+ /// Gets or sets the aggregation type of the metric.
+ ///
+ [JsonProperty(PropertyName = "properties.aggregation")]
+ public string Aggregation { get; set; }
+
+ ///
+ /// Gets or sets the array of timestamps of the baselines.
+ ///
+ [JsonProperty(PropertyName = "properties.timestamps")]
+ public IList Timestamps { get; set; }
+
+ ///
+ /// Gets or sets the baseline values for each sensitivity.
+ ///
+ [JsonProperty(PropertyName = "properties.baseline")]
+ public IList Baseline { get; set; }
+
+ ///
+ /// Gets or sets the baseline metadata values.
+ ///
+ [JsonProperty(PropertyName = "properties.metadata")]
+ public IList Metadata { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Name != null)
+ {
+ Name.Validate();
+ }
+ if (Baseline != null)
+ {
+ foreach (var element in Baseline)
+ {
+ if (element != null)
+ {
+ element.Validate();
+ }
+ }
+ }
+ if (Metadata != null)
+ {
+ foreach (var element1 in Metadata)
+ {
+ if (element1 != null)
+ {
+ element1.Validate();
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Models/CalculateBaselineResponse.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/CalculateBaselineResponse.cs
new file mode 100644
index 000000000000..e3eb35f269f7
--- /dev/null
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/CalculateBaselineResponse.cs
@@ -0,0 +1,100 @@
+//
+// 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.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The response to a calcualte baseline call.
+ ///
+ public partial class CalculateBaselineResponse
+ {
+ ///
+ /// Initializes a new instance of the CalculateBaselineResponse class.
+ ///
+ public CalculateBaselineResponse()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CalculateBaselineResponse class.
+ ///
+ /// the resource type of the baseline
+ /// resource.
+ /// the baseline values for each
+ /// sensitivity.
+ /// the array of timestamps of the
+ /// baselines.
+ public CalculateBaselineResponse(string type, IList baseline, IList timestamps = default(IList))
+ {
+ Type = type;
+ Timestamps = timestamps;
+ Baseline = baseline;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the resource type of the baseline resource.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; set; }
+
+ ///
+ /// Gets or sets the array of timestamps of the baselines.
+ ///
+ [JsonProperty(PropertyName = "timestamps")]
+ public IList Timestamps { get; set; }
+
+ ///
+ /// Gets or sets the baseline values for each sensitivity.
+ ///
+ [JsonProperty(PropertyName = "baseline")]
+ public IList Baseline { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Type == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Type");
+ }
+ if (Baseline == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Baseline");
+ }
+ if (Baseline != null)
+ {
+ foreach (var element in Baseline)
+ {
+ if (element != null)
+ {
+ element.Validate();
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/CategoryType.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/CategoryType.cs
similarity index 82%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/CategoryType.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/CategoryType.cs
index cfe05f5ad412..ffd36dc58673 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/CategoryType.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/CategoryType.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -30,8 +28,10 @@ public enum CategoryType
}
internal static class CategoryTypeEnumExtension
{
- internal static string ToSerializedValue(this CategoryType? value) =>
- value == null ? null : ((CategoryType)value).ToSerializedValue();
+ internal static string ToSerializedValue(this CategoryType? value)
+ {
+ return value == null ? null : ((CategoryType)value).ToSerializedValue();
+ }
internal static string ToSerializedValue(this CategoryType value)
{
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ComparisonOperationType.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ComparisonOperationType.cs
similarity index 88%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ComparisonOperationType.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/ComparisonOperationType.cs
index f76142fac19a..7c4846aeb1f2 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ComparisonOperationType.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ComparisonOperationType.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -38,8 +36,10 @@ public enum ComparisonOperationType
}
internal static class ComparisonOperationTypeEnumExtension
{
- internal static string ToSerializedValue(this ComparisonOperationType? value) =>
- value == null ? null : ((ComparisonOperationType)value).ToSerializedValue();
+ internal static string ToSerializedValue(this ComparisonOperationType? value)
+ {
+ return value == null ? null : ((ComparisonOperationType)value).ToSerializedValue();
+ }
internal static string ToSerializedValue(this ComparisonOperationType value)
{
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ConditionOperator.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ConditionOperator.cs
similarity index 86%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ConditionOperator.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/ConditionOperator.cs
index 730b548d0940..7b4003f6cb1d 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ConditionOperator.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ConditionOperator.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -34,8 +32,10 @@ public enum ConditionOperator
}
internal static class ConditionOperatorEnumExtension
{
- internal static string ToSerializedValue(this ConditionOperator? value) =>
- value == null ? null : ((ConditionOperator)value).ToSerializedValue();
+ internal static string ToSerializedValue(this ConditionOperator? value)
+ {
+ return value == null ? null : ((ConditionOperator)value).ToSerializedValue();
+ }
internal static string ToSerializedValue(this ConditionOperator value)
{
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/DiagnosticSettingsCategoryResource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/DiagnosticSettingsCategoryResource.cs
similarity index 89%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/DiagnosticSettingsCategoryResource.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/DiagnosticSettingsCategoryResource.cs
index 3d4792c8d80d..3f4fa9680901 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/DiagnosticSettingsCategoryResource.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/DiagnosticSettingsCategoryResource.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -29,7 +27,7 @@ public partial class DiagnosticSettingsCategoryResource : ProxyOnlyResource
///
public DiagnosticSettingsCategoryResource()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/DiagnosticSettingsCategoryResourceCollection.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/DiagnosticSettingsCategoryResourceCollection.cs
similarity index 87%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/DiagnosticSettingsCategoryResourceCollection.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/DiagnosticSettingsCategoryResourceCollection.cs
index 3e373ec4948d..8da998542cca 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/DiagnosticSettingsCategoryResourceCollection.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/DiagnosticSettingsCategoryResourceCollection.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -28,7 +26,7 @@ public partial class DiagnosticSettingsCategoryResourceCollection
///
public DiagnosticSettingsCategoryResourceCollection()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/DiagnosticSettingsResource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/DiagnosticSettingsResource.cs
similarity index 95%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/DiagnosticSettingsResource.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/DiagnosticSettingsResource.cs
index bcf769de0983..0c4f6f6d3678 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/DiagnosticSettingsResource.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/DiagnosticSettingsResource.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -30,7 +28,7 @@ public partial class DiagnosticSettingsResource : ProxyOnlyResource
///
public DiagnosticSettingsResource()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/DiagnosticSettingsResourceCollection.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/DiagnosticSettingsResourceCollection.cs
similarity index 86%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/DiagnosticSettingsResourceCollection.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/DiagnosticSettingsResourceCollection.cs
index 8d7385273d7f..2ee813f37406 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/DiagnosticSettingsResourceCollection.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/DiagnosticSettingsResourceCollection.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -28,7 +26,7 @@ public partial class DiagnosticSettingsResourceCollection
///
public DiagnosticSettingsResourceCollection()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/EmailNotification.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/EmailNotification.cs
similarity index 91%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/EmailNotification.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/EmailNotification.cs
index 2e0a41b14557..ba475ecb62f2 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/EmailNotification.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/EmailNotification.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -27,7 +25,7 @@ public partial class EmailNotification
///
public EmailNotification()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/EmailReceiver.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/EmailReceiver.cs
similarity index 91%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/EmailReceiver.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/EmailReceiver.cs
index a523cdc29ee9..e918d145deea 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/EmailReceiver.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/EmailReceiver.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -26,7 +24,7 @@ public partial class EmailReceiver
///
public EmailReceiver()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/EnableRequest.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/EnableRequest.cs
similarity index 87%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/EnableRequest.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/EnableRequest.cs
index 9159921aaacc..8eccdf87f2fe 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/EnableRequest.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/EnableRequest.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -26,7 +24,7 @@ public partial class EnableRequest
///
public EnableRequest()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/ErrorResponse.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ErrorResponse.cs
similarity index 92%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/ErrorResponse.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/ErrorResponse.cs
index 78682c9b31c1..2f93fbb9e247 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/ErrorResponse.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ErrorResponse.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Newtonsoft.Json;
using System.Linq;
@@ -24,7 +23,7 @@ public partial class ErrorResponse
///
public ErrorResponse()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/ErrorResponseException.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ErrorResponseException.cs
similarity index 91%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/ErrorResponseException.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/ErrorResponseException.cs
index 31565c3466ae..ad8fecdf5136 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/ErrorResponseException.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ErrorResponseException.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,19 +6,17 @@
// 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.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
///
/// Exception thrown for an invalid response with ErrorResponse
/// information.
///
- public class ErrorResponseException : RestException
+ public partial class ErrorResponseException : RestException
{
///
/// Gets information about the associated HTTP request.
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/EventData.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/EventData.cs
similarity index 99%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/EventData.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/EventData.cs
index a66819b05d13..ee90c9bdbe0d 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/EventData.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/EventData.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -26,7 +25,7 @@ public partial class EventData
///
public EventData()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/EventLevel.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/EventLevel.cs
similarity index 91%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/EventLevel.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/EventLevel.cs
index e9c95d149f58..ac449a2bab87 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/EventLevel.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/EventLevel.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -35,8 +34,10 @@ public enum EventLevel
}
internal static class EventLevelEnumExtension
{
- internal static string ToSerializedValue(this EventLevel? value) =>
- value == null ? null : ((EventLevel)value).ToSerializedValue();
+ internal static string ToSerializedValue(this EventLevel? value)
+ {
+ return value == null ? null : ((EventLevel)value).ToSerializedValue();
+ }
internal static string ToSerializedValue(this EventLevel value)
{
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/HttpRequestInfo.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/HttpRequestInfo.cs
similarity index 94%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/HttpRequestInfo.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/HttpRequestInfo.cs
index 45fdff160335..142ff887d3f5 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/HttpRequestInfo.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/HttpRequestInfo.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Newtonsoft.Json;
using System.Linq;
@@ -24,7 +23,7 @@ public partial class HttpRequestInfo
///
public HttpRequestInfo()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Incident.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/Incident.cs
similarity index 92%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Incident.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/Incident.cs
index 61558b61f733..34d66152f227 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Incident.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/Incident.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
- using Microsoft.Azure.Management.Monitor.Management;
using Newtonsoft.Json;
using System.Linq;
@@ -25,7 +23,7 @@ public partial class Incident
///
public Incident()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Models/ItsmReceiver.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ItsmReceiver.cs
new file mode 100644
index 000000000000..cdfc85928005
--- /dev/null
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ItsmReceiver.cs
@@ -0,0 +1,122 @@
+//
+// 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.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// An Itsm receiver.
+ ///
+ public partial class ItsmReceiver
+ {
+ ///
+ /// Initializes a new instance of the ItsmReceiver class.
+ ///
+ public ItsmReceiver()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ItsmReceiver class.
+ ///
+ /// The name of the Itsm receiver. Names must be
+ /// unique across all receivers within an action group.
+ /// OMS LA instance identifier.
+ /// Unique identification of ITSM connection
+ /// among multiple defined in above workspace.
+ /// JSON blob for the configurations
+ /// of the ITSM action. CreateMultipleWorkItems option will be part of
+ /// this blob as well.
+ /// Region in which workspace resides. Supported
+ /// values:'centralindia','japaneast','southeastasia','australiasoutheast','uksouth','westcentralus','canadacentral','eastus','westeurope'
+ public ItsmReceiver(string name, string workspaceId, string connectionId, string ticketConfiguration, string region)
+ {
+ Name = name;
+ WorkspaceId = workspaceId;
+ ConnectionId = connectionId;
+ TicketConfiguration = ticketConfiguration;
+ Region = region;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the name of the Itsm receiver. Names must be unique
+ /// across all receivers within an action group.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets OMS LA instance identifier.
+ ///
+ [JsonProperty(PropertyName = "workspaceId")]
+ public string WorkspaceId { get; set; }
+
+ ///
+ /// Gets or sets unique identification of ITSM connection among
+ /// multiple defined in above workspace.
+ ///
+ [JsonProperty(PropertyName = "connectionId")]
+ public string ConnectionId { get; set; }
+
+ ///
+ /// Gets or sets JSON blob for the configurations of the ITSM action.
+ /// CreateMultipleWorkItems option will be part of this blob as well.
+ ///
+ [JsonProperty(PropertyName = "ticketConfiguration")]
+ public string TicketConfiguration { get; set; }
+
+ ///
+ /// Gets or sets region in which workspace resides. Supported
+ /// values:'centralindia','japaneast','southeastasia','australiasoutheast','uksouth','westcentralus','canadacentral','eastus','westeurope'
+ ///
+ [JsonProperty(PropertyName = "region")]
+ public string Region { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Name");
+ }
+ if (WorkspaceId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "WorkspaceId");
+ }
+ if (ConnectionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "ConnectionId");
+ }
+ if (TicketConfiguration == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "TicketConfiguration");
+ }
+ if (Region == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Region");
+ }
+ }
+ }
+}
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/LocalizableString.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/LocalizableString.cs
similarity index 94%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/LocalizableString.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/LocalizableString.cs
index 73d636b65462..6db03f4d1e61 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/LocalizableString.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/LocalizableString.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
@@ -25,7 +24,7 @@ public partial class LocalizableString
///
public LocalizableString()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LocationThresholdRuleCondition.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/LocationThresholdRuleCondition.cs
similarity index 92%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LocationThresholdRuleCondition.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/LocationThresholdRuleCondition.cs
index 9e53d3de1325..d8cfb0db1d24 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LocationThresholdRuleCondition.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/LocationThresholdRuleCondition.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -28,7 +26,7 @@ public partial class LocationThresholdRuleCondition : RuleCondition
///
public LocationThresholdRuleCondition()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LogProfileResource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/LogProfileResource.cs
similarity index 95%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LogProfileResource.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/LogProfileResource.cs
index fa5ffe9fc05a..a709d9399b93 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LogProfileResource.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/LogProfileResource.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -30,7 +28,7 @@ public partial class LogProfileResource : Resource
///
public LogProfileResource()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LogProfileResourcePatch.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/LogProfileResourcePatch.cs
similarity index 95%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LogProfileResourcePatch.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/LogProfileResourcePatch.cs
index 8a8dfbbe7447..a3622df0b0ea 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LogProfileResourcePatch.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/LogProfileResourcePatch.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -30,7 +28,7 @@ public partial class LogProfileResourcePatch
///
public LogProfileResourcePatch()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LogSettings.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/LogSettings.cs
similarity index 92%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LogSettings.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/LogSettings.cs
index 56ec479b513e..fed0ef407cda 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/LogSettings.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/LogSettings.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
- using Microsoft.Azure.Management.Monitor.Management;
using Newtonsoft.Json;
using System.Linq;
@@ -26,7 +24,7 @@ public partial class LogSettings
///
public LogSettings()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ManagementEventAggregationCondition.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ManagementEventAggregationCondition.cs
similarity index 91%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ManagementEventAggregationCondition.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/ManagementEventAggregationCondition.cs
index 89d7c733f16e..0e2b2b3efa68 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ManagementEventAggregationCondition.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ManagementEventAggregationCondition.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
- using Microsoft.Azure.Management.Monitor.Management;
using Newtonsoft.Json;
using System.Linq;
@@ -26,7 +24,7 @@ public partial class ManagementEventAggregationCondition
///
public ManagementEventAggregationCondition()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ManagementEventRuleCondition.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ManagementEventRuleCondition.cs
similarity index 90%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ManagementEventRuleCondition.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/ManagementEventRuleCondition.cs
index 6f6e857ed2f5..4ede5a411148 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ManagementEventRuleCondition.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ManagementEventRuleCondition.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
- using Microsoft.Azure.Management.Monitor.Management;
using Newtonsoft.Json;
using System.Linq;
@@ -27,7 +25,7 @@ public partial class ManagementEventRuleCondition : RuleCondition
///
public ManagementEventRuleCondition()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetadataValue.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/MetadataValue.cs
similarity index 93%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetadataValue.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/MetadataValue.cs
index cd35ad38380f..84b70cfdc04d 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetadataValue.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/MetadataValue.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Newtonsoft.Json;
using System.Linq;
@@ -24,7 +23,7 @@ public partial class MetadataValue
///
public MetadataValue()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Metric.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/Metric.cs
similarity index 96%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Metric.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/Metric.cs
index e4337660f22a..4d3c62eb0a59 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Metric.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/Metric.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
@@ -27,7 +26,7 @@ public partial class Metric
///
public Metric()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetricAvailability.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/MetricAvailability.cs
similarity index 94%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetricAvailability.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/MetricAvailability.cs
index 512659d82f5c..c60ef65fd5e1 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetricAvailability.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/MetricAvailability.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Newtonsoft.Json;
using System.Linq;
@@ -25,7 +24,7 @@ public partial class MetricAvailability
///
public MetricAvailability()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetricDefinition.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/MetricDefinition.cs
similarity index 97%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetricDefinition.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/MetricDefinition.cs
index e1e3aefd69ec..c57f89718adc 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetricDefinition.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/MetricDefinition.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -26,7 +25,7 @@ public partial class MetricDefinition
///
public MetricDefinition()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/MetricSettings.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/MetricSettings.cs
similarity index 93%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/MetricSettings.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/MetricSettings.cs
index d07507c0c4f7..bf7657b2a3b8 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/MetricSettings.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/MetricSettings.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
- using Microsoft.Azure.Management.Monitor.Management;
using Newtonsoft.Json;
using System.Linq;
@@ -26,7 +24,7 @@ public partial class MetricSettings
///
public MetricSettings()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/MetricStatisticType.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/MetricStatisticType.cs
similarity index 85%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/MetricStatisticType.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/MetricStatisticType.cs
index 7ee5134306b4..a216b1bf4555 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/MetricStatisticType.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/MetricStatisticType.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -34,8 +32,10 @@ public enum MetricStatisticType
}
internal static class MetricStatisticTypeEnumExtension
{
- internal static string ToSerializedValue(this MetricStatisticType? value) =>
- value == null ? null : ((MetricStatisticType)value).ToSerializedValue();
+ internal static string ToSerializedValue(this MetricStatisticType? value)
+ {
+ return value == null ? null : ((MetricStatisticType)value).ToSerializedValue();
+ }
internal static string ToSerializedValue(this MetricStatisticType value)
{
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/MetricTrigger.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/MetricTrigger.cs
similarity index 96%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/MetricTrigger.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/MetricTrigger.cs
index 8b8350772a70..6dcf352ce1b1 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/MetricTrigger.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/MetricTrigger.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -26,7 +24,7 @@ public partial class MetricTrigger
///
public MetricTrigger()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetricValue.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/MetricValue.cs
similarity index 96%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetricValue.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/MetricValue.cs
index dc11a56d7fbc..edc2c9feef9b 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/MetricValue.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/MetricValue.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Newtonsoft.Json;
using System.Linq;
@@ -24,7 +23,7 @@ public partial class MetricValue
///
public MetricValue()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Operation.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/Operation.cs
similarity index 87%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Operation.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/Operation.cs
index 574043b0f37c..36aaffbdcbcb 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Operation.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/Operation.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
- using Microsoft.Azure.Management.Monitor.Management;
using Newtonsoft.Json;
using System.Linq;
@@ -25,7 +23,7 @@ public partial class Operation
///
public Operation()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/OperationDisplay.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/OperationDisplay.cs
similarity index 89%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/OperationDisplay.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/OperationDisplay.cs
index ed5b74f66f66..5276f6f48621 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/OperationDisplay.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/OperationDisplay.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
- using Microsoft.Azure.Management.Monitor.Management;
using Newtonsoft.Json;
using System.Linq;
@@ -25,7 +23,7 @@ public partial class OperationDisplay
///
public OperationDisplay()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/OperationListResult.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/OperationListResult.cs
similarity index 89%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/OperationListResult.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/OperationListResult.cs
index 4c0f59c40a19..010df5c4c192 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/OperationListResult.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/OperationListResult.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -29,7 +27,7 @@ public partial class OperationListResult
///
public OperationListResult()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Page.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/Page.cs
similarity index 92%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Page.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/Page.cs
index 491c2292921b..f13b6312d35f 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Page.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/Page.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Newtonsoft.Json;
@@ -27,7 +26,7 @@ public class Page : IPage
///
/// Gets the link to the next page.
///
- [JsonProperty("")]
+ [JsonProperty("nextLink")]
public string NextPageLink { get; private set; }
[JsonProperty("value")]
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Page1.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/Page1.cs
similarity index 92%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Page1.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/Page1.cs
index f2c140b2c31d..8eb5b9de7c3e 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Page1.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/Page1.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Newtonsoft.Json;
@@ -27,7 +26,7 @@ public class Page1 : IPage
///
/// Gets the link to the next page.
///
- [JsonProperty("nextLink")]
+ [JsonProperty("")]
public string NextPageLink { get; private set; }
[JsonProperty("value")]
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ProxyOnlyResource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ProxyOnlyResource.cs
similarity index 88%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ProxyOnlyResource.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/ProxyOnlyResource.cs
index 4da39c6f0467..cd2757f49843 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ProxyOnlyResource.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ProxyOnlyResource.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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.Azure;
using Newtonsoft.Json;
@@ -27,7 +25,7 @@ public partial class ProxyOnlyResource : IResource
///
public ProxyOnlyResource()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ReceiverStatus.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ReceiverStatus.cs
similarity index 84%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ReceiverStatus.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/ReceiverStatus.cs
index 690584c0816c..1cfd443df30e 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ReceiverStatus.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ReceiverStatus.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -32,8 +30,10 @@ public enum ReceiverStatus
}
internal static class ReceiverStatusEnumExtension
{
- internal static string ToSerializedValue(this ReceiverStatus? value) =>
- value == null ? null : ((ReceiverStatus)value).ToSerializedValue();
+ internal static string ToSerializedValue(this ReceiverStatus? value)
+ {
+ return value == null ? null : ((ReceiverStatus)value).ToSerializedValue();
+ }
internal static string ToSerializedValue(this ReceiverStatus value)
{
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Recurrence.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/Recurrence.cs
similarity index 91%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Recurrence.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/Recurrence.cs
index f21ea0955590..a3b4d8341260 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Recurrence.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/Recurrence.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -27,7 +25,7 @@ public partial class Recurrence
///
public Recurrence()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RecurrenceFrequency.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/RecurrenceFrequency.cs
similarity index 89%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RecurrenceFrequency.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/RecurrenceFrequency.cs
index 834742573103..27b48299752a 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RecurrenceFrequency.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/RecurrenceFrequency.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -42,8 +40,10 @@ public enum RecurrenceFrequency
}
internal static class RecurrenceFrequencyEnumExtension
{
- internal static string ToSerializedValue(this RecurrenceFrequency? value) =>
- value == null ? null : ((RecurrenceFrequency)value).ToSerializedValue();
+ internal static string ToSerializedValue(this RecurrenceFrequency? value)
+ {
+ return value == null ? null : ((RecurrenceFrequency)value).ToSerializedValue();
+ }
internal static string ToSerializedValue(this RecurrenceFrequency value)
{
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RecurrentSchedule.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/RecurrentSchedule.cs
similarity index 97%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RecurrentSchedule.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/RecurrentSchedule.cs
index 0f05c74e4363..b6f810f83b62 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RecurrentSchedule.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/RecurrentSchedule.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -28,7 +26,7 @@ public partial class RecurrentSchedule
///
public RecurrentSchedule()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Resource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/Resource.cs
similarity index 92%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Resource.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/Resource.cs
index 9f6a5684dfcf..d3ccce82751b 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/Resource.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/Resource.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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.Azure;
using Newtonsoft.Json;
@@ -29,7 +27,7 @@ public partial class Resource : IResource
///
public Resource()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Response.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/Response.cs
similarity index 97%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Response.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/Response.cs
index 6536eeda6942..3a7aae3b4d46 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Response.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/Response.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
@@ -27,7 +26,7 @@ public partial class Response
///
public Response()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/ResultType.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ResultType.cs
similarity index 88%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/ResultType.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/ResultType.cs
index bea07aca6088..d0133162a521 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/ResultType.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ResultType.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -29,8 +28,10 @@ public enum ResultType
}
internal static class ResultTypeEnumExtension
{
- internal static string ToSerializedValue(this ResultType? value) =>
- value == null ? null : ((ResultType)value).ToSerializedValue();
+ internal static string ToSerializedValue(this ResultType? value)
+ {
+ return value == null ? null : ((ResultType)value).ToSerializedValue();
+ }
internal static string ToSerializedValue(this ResultType value)
{
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RetentionPolicy.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/RetentionPolicy.cs
similarity index 90%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RetentionPolicy.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/RetentionPolicy.cs
index 6bb1495e19bd..683b0b6aa07a 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RetentionPolicy.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/RetentionPolicy.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -26,7 +24,7 @@ public partial class RetentionPolicy
///
public RetentionPolicy()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleAction.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleAction.cs
similarity index 77%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleAction.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleAction.cs
index 0250fea579b2..5343ce85fdd6 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleAction.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleAction.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
- using Microsoft.Azure.Management.Monitor.Management;
using System.Linq;
///
@@ -25,7 +23,7 @@ public partial class RuleAction
///
public RuleAction()
{
- CustomInit();
+ CustomInit();
}
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleCondition.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleCondition.cs
similarity index 86%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleCondition.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleCondition.cs
index 48ffdccdf466..a784e064f69b 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleCondition.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleCondition.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
- using Microsoft.Azure.Management.Monitor.Management;
using Newtonsoft.Json;
using System.Linq;
@@ -25,7 +23,7 @@ public partial class RuleCondition
///
public RuleCondition()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleDataSource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleDataSource.cs
similarity index 86%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleDataSource.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleDataSource.cs
index ccdcce05410c..64f93af629ca 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleDataSource.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleDataSource.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
- using Microsoft.Azure.Management.Monitor.Management;
using Newtonsoft.Json;
using System.Linq;
@@ -25,7 +23,7 @@ public partial class RuleDataSource
///
public RuleDataSource()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleEmailAction.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleEmailAction.cs
similarity index 90%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleEmailAction.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleEmailAction.cs
index f3fe89502920..5c8972fa6dec 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleEmailAction.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleEmailAction.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -29,7 +27,7 @@ public partial class RuleEmailAction : RuleAction
///
public RuleEmailAction()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleManagementEventClaimsDataSource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleManagementEventClaimsDataSource.cs
similarity index 85%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleManagementEventClaimsDataSource.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleManagementEventClaimsDataSource.cs
index 56de5a0d0ebc..d2acb8d1268c 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleManagementEventClaimsDataSource.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleManagementEventClaimsDataSource.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
- using Microsoft.Azure.Management.Monitor.Management;
using Newtonsoft.Json;
using System.Linq;
@@ -26,7 +24,7 @@ public partial class RuleManagementEventClaimsDataSource
///
public RuleManagementEventClaimsDataSource()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleManagementEventDataSource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleManagementEventDataSource.cs
similarity index 95%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleManagementEventDataSource.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleManagementEventDataSource.cs
index 25093f0bc209..f63b7fb514fe 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleManagementEventDataSource.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleManagementEventDataSource.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
- using Microsoft.Azure.Management.Monitor.Management;
using Newtonsoft.Json;
using System.Linq;
@@ -28,7 +26,7 @@ public partial class RuleManagementEventDataSource : RuleDataSource
///
public RuleManagementEventDataSource()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleMetricDataSource.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleMetricDataSource.cs
similarity index 88%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleMetricDataSource.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleMetricDataSource.cs
index 8b25ea8d8931..d9a2e97448e7 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleMetricDataSource.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleMetricDataSource.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
- using Microsoft.Azure.Management.Monitor.Management;
using Newtonsoft.Json;
using System.Linq;
@@ -27,7 +25,7 @@ public partial class RuleMetricDataSource : RuleDataSource
///
public RuleMetricDataSource()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleWebhookAction.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleWebhookAction.cs
similarity index 90%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleWebhookAction.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleWebhookAction.cs
index 28dfef8465b3..b70d12e5444b 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/RuleWebhookAction.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/RuleWebhookAction.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -29,7 +27,7 @@ public partial class RuleWebhookAction : RuleAction
///
public RuleWebhookAction()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleAction.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ScaleAction.cs
similarity index 93%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleAction.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/ScaleAction.cs
index 66df78509995..f8e59a53dc7f 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleAction.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ScaleAction.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
- using Microsoft.Azure.Management.Monitor.Management;
using Newtonsoft.Json;
using System.Linq;
@@ -25,7 +23,7 @@ public partial class ScaleAction
///
public ScaleAction()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleCapacity.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ScaleCapacity.cs
similarity index 93%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleCapacity.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/ScaleCapacity.cs
index de4097089222..755f92253b1f 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleCapacity.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ScaleCapacity.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -26,7 +24,7 @@ public partial class ScaleCapacity
///
public ScaleCapacity()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleDirection.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ScaleDirection.cs
similarity index 84%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleDirection.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/ScaleDirection.cs
index 4d4d16f0b1ae..858c37739fdb 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleDirection.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ScaleDirection.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -32,8 +30,10 @@ public enum ScaleDirection
}
internal static class ScaleDirectionEnumExtension
{
- internal static string ToSerializedValue(this ScaleDirection? value) =>
- value == null ? null : ((ScaleDirection)value).ToSerializedValue();
+ internal static string ToSerializedValue(this ScaleDirection? value)
+ {
+ return value == null ? null : ((ScaleDirection)value).ToSerializedValue();
+ }
internal static string ToSerializedValue(this ScaleDirection value)
{
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleRule.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ScaleRule.cs
similarity index 91%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleRule.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/ScaleRule.cs
index f662f126aa45..2f061a1523d5 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleRule.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ScaleRule.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -26,7 +24,7 @@ public partial class ScaleRule
///
public ScaleRule()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleType.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ScaleType.cs
similarity index 85%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleType.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/ScaleType.cs
index 06548d7caee3..14e8b058ef78 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ScaleType.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ScaleType.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -32,8 +30,10 @@ public enum ScaleType
}
internal static class ScaleTypeEnumExtension
{
- internal static string ToSerializedValue(this ScaleType? value) =>
- value == null ? null : ((ScaleType)value).ToSerializedValue();
+ internal static string ToSerializedValue(this ScaleType? value)
+ {
+ return value == null ? null : ((ScaleType)value).ToSerializedValue();
+ }
internal static string ToSerializedValue(this ScaleType value)
{
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/SenderAuthorization.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/SenderAuthorization.cs
similarity index 94%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/SenderAuthorization.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/SenderAuthorization.cs
index 745980c70adb..b039c91346dd 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/SenderAuthorization.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/SenderAuthorization.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Newtonsoft.Json;
using System.Linq;
@@ -26,7 +25,7 @@ public partial class SenderAuthorization
///
public SenderAuthorization()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Models/Sensitivity.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/Sensitivity.cs
new file mode 100644
index 000000000000..44e3f73a0387
--- /dev/null
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/Sensitivity.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.Models
+{
+ using Newtonsoft.Json;
+ using Newtonsoft.Json.Converters;
+ using System.Runtime;
+ using System.Runtime.Serialization;
+
+ ///
+ /// Defines values for Sensitivity.
+ ///
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum Sensitivity
+ {
+ [EnumMember(Value = "Low")]
+ Low,
+ [EnumMember(Value = "Medium")]
+ Medium,
+ [EnumMember(Value = "High")]
+ High
+ }
+ internal static class SensitivityEnumExtension
+ {
+ internal static string ToSerializedValue(this Sensitivity? value)
+ {
+ return value == null ? null : ((Sensitivity)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this Sensitivity value)
+ {
+ switch( value )
+ {
+ case Sensitivity.Low:
+ return "Low";
+ case Sensitivity.Medium:
+ return "Medium";
+ case Sensitivity.High:
+ return "High";
+ }
+ return null;
+ }
+
+ internal static Sensitivity? ParseSensitivity(this string value)
+ {
+ switch( value )
+ {
+ case "Low":
+ return Sensitivity.Low;
+ case "Medium":
+ return Sensitivity.Medium;
+ case "High":
+ return Sensitivity.High;
+ }
+ return null;
+ }
+ }
+}
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/SmsReceiver.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/SmsReceiver.cs
similarity index 93%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/SmsReceiver.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/SmsReceiver.cs
index af6aa9b82b78..53fe83945f35 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/SmsReceiver.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/SmsReceiver.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -26,7 +24,7 @@ public partial class SmsReceiver
///
public SmsReceiver()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ThresholdRuleCondition.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ThresholdRuleCondition.cs
similarity index 94%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ThresholdRuleCondition.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/ThresholdRuleCondition.cs
index 881912768dbe..e376a972718d 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/ThresholdRuleCondition.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/ThresholdRuleCondition.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
- using Microsoft.Azure.Management.Monitor.Management;
using Newtonsoft.Json;
using System.Linq;
@@ -26,7 +24,7 @@ public partial class ThresholdRuleCondition : RuleCondition
///
public ThresholdRuleCondition()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/TimeAggregationOperator.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/TimeAggregationOperator.cs
similarity index 87%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/TimeAggregationOperator.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/TimeAggregationOperator.cs
index dbda98883d55..863bbac3ce8a 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/TimeAggregationOperator.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/TimeAggregationOperator.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -36,8 +34,10 @@ public enum TimeAggregationOperator
}
internal static class TimeAggregationOperatorEnumExtension
{
- internal static string ToSerializedValue(this TimeAggregationOperator? value) =>
- value == null ? null : ((TimeAggregationOperator)value).ToSerializedValue();
+ internal static string ToSerializedValue(this TimeAggregationOperator? value)
+ {
+ return value == null ? null : ((TimeAggregationOperator)value).ToSerializedValue();
+ }
internal static string ToSerializedValue(this TimeAggregationOperator value)
{
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/TimeAggregationType.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/TimeAggregationType.cs
similarity index 87%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/TimeAggregationType.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/TimeAggregationType.cs
index 007966cec29e..34185559b546 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/TimeAggregationType.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/TimeAggregationType.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -36,8 +34,10 @@ public enum TimeAggregationType
}
internal static class TimeAggregationTypeEnumExtension
{
- internal static string ToSerializedValue(this TimeAggregationType? value) =>
- value == null ? null : ((TimeAggregationType)value).ToSerializedValue();
+ internal static string ToSerializedValue(this TimeAggregationType? value)
+ {
+ return value == null ? null : ((TimeAggregationType)value).ToSerializedValue();
+ }
internal static string ToSerializedValue(this TimeAggregationType value)
{
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/TimeSeriesElement.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/TimeSeriesElement.cs
similarity index 94%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/TimeSeriesElement.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/TimeSeriesElement.cs
index 03aa057caae2..6d30fba03f4f 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/TimeSeriesElement.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/TimeSeriesElement.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -27,7 +26,7 @@ public partial class TimeSeriesElement
///
public TimeSeriesElement()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Models/TimeSeriesInformation.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/TimeSeriesInformation.cs
new file mode 100644
index 000000000000..4e6eb4bb17b5
--- /dev/null
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/TimeSeriesInformation.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.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The time series info needed for calculating the baseline.
+ ///
+ public partial class TimeSeriesInformation
+ {
+ ///
+ /// Initializes a new instance of the TimeSeriesInformation class.
+ ///
+ public TimeSeriesInformation()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the TimeSeriesInformation class.
+ ///
+ /// the list of sensitivities for
+ /// calculating the baseline.
+ /// The metric values to calculate the
+ /// baseline.
+ /// the array of timestamps of the
+ /// baselines.
+ public TimeSeriesInformation(IList sensitivities, IList values, IList timestamps = default(IList))
+ {
+ Sensitivities = sensitivities;
+ Values = values;
+ Timestamps = timestamps;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the list of sensitivities for calculating the
+ /// baseline.
+ ///
+ [JsonProperty(PropertyName = "sensitivities")]
+ public IList Sensitivities { get; set; }
+
+ ///
+ /// Gets or sets the metric values to calculate the baseline.
+ ///
+ [JsonProperty(PropertyName = "values")]
+ public IList Values { get; set; }
+
+ ///
+ /// Gets or sets the array of timestamps of the baselines.
+ ///
+ [JsonProperty(PropertyName = "timestamps")]
+ public IList Timestamps { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Sensitivities == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Sensitivities");
+ }
+ if (Values == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Values");
+ }
+ }
+ }
+}
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/TimeWindow.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/TimeWindow.cs
similarity index 97%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/TimeWindow.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/TimeWindow.cs
index bd74e471a10e..ce1fae9e1e13 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/TimeWindow.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/TimeWindow.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
- using Microsoft.Azure.Management.Monitor.Management;
using Newtonsoft.Json;
using System.Linq;
@@ -25,7 +23,7 @@ public partial class TimeWindow
///
public TimeWindow()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Unit.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/Unit.cs
similarity index 94%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Unit.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/Unit.cs
index 954a893a8f71..a48250d9d459 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/Unit.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/Unit.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -43,8 +42,10 @@ public enum Unit
}
internal static class UnitEnumExtension
{
- internal static string ToSerializedValue(this Unit? value) =>
- value == null ? null : ((Unit)value).ToSerializedValue();
+ internal static string ToSerializedValue(this Unit? value)
+ {
+ return value == null ? null : ((Unit)value).ToSerializedValue();
+ }
internal static string ToSerializedValue(this Unit value)
{
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/WebhookNotification.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/WebhookNotification.cs
similarity index 88%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/WebhookNotification.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/WebhookNotification.cs
index 6205162f0322..fb61f5519717 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/WebhookNotification.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/WebhookNotification.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -27,7 +25,7 @@ public partial class WebhookNotification
///
public WebhookNotification()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/WebhookReceiver.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Models/WebhookReceiver.cs
similarity index 90%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/WebhookReceiver.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Models/WebhookReceiver.cs
index a94a6059bb89..407fc4c66554 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Models/WebhookReceiver.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Models/WebhookReceiver.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,13 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor.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;
@@ -26,7 +24,7 @@ public partial class WebhookReceiver
///
public WebhookReceiver()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IMonitorClient.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IMonitorClient.cs
deleted file mode 100644
index 6ec69f8f88eb..000000000000
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IMonitorClient.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace Microsoft.Azure.Management.Monitor
-{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using Newtonsoft.Json;
-
- ///
- /// Monitor Client
- ///
- public partial interface IMonitorClient : System.IDisposable
- {
- ///
- /// The base URI of the service.
- ///
- System.Uri BaseUri { get; set; }
-
- ///
- /// Gets or sets json serialization settings.
- ///
- JsonSerializerSettings SerializationSettings { get; }
-
- ///
- /// Gets or sets json deserialization settings.
- ///
- JsonSerializerSettings DeserializationSettings { get; }
-
- ///
- /// Credentials needed for the client to connect to Azure.
- ///
- ServiceClientCredentials Credentials { get; }
-
- ///
- /// The Azure subscription Id.
- ///
- string SubscriptionId { get; set; }
-
- ///
- /// Gets or sets the preferred language for the response.
- ///
- string AcceptLanguage { get; set; }
-
- ///
- /// Gets or sets the retry timeout in seconds for Long Running
- /// Operations. Default value is 30.
- ///
- int? LongRunningOperationRetryTimeout { get; set; }
-
- ///
- /// When set to true a unique x-ms-client-request-id value is generated
- /// and included in each request. Default is true.
- ///
- bool? GenerateClientRequestId { get; set; }
-
-
- ///
- /// Gets the IUsageMetricsOperations.
- ///
- IUsageMetricsOperations UsageMetrics { get; }
-
- ///
- /// Gets the IActivityLogsOperations.
- ///
- IActivityLogsOperations ActivityLogs { get; }
-
- ///
- /// Gets the IEventCategoriesOperations.
- ///
- IEventCategoriesOperations EventCategories { get; }
-
- ///
- /// Gets the ITenantActivityLogsOperations.
- ///
- ITenantActivityLogsOperations TenantActivityLogs { get; }
-
- ///
- /// Gets the IMetricDefinitionsOperations.
- ///
- IMetricDefinitionsOperations MetricDefinitions { get; }
-
- ///
- /// Gets the IMetricsOperations.
- ///
- IMetricsOperations Metrics { get; }
-
- }
-}
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IUsageMetricsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IUsageMetricsOperations.cs
deleted file mode 100644
index 8b5268022e2e..000000000000
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/IUsageMetricsOperations.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace Microsoft.Azure.Management.Monitor
-{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Microsoft.Rest.Azure.OData;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// UsageMetricsOperations operations.
- ///
- public partial interface IUsageMetricsOperations
- {
- ///
- /// The List operation lists the usage metrics for the
- /// resource.<br>**WARNING**: This operation will be *deprecated*
- /// in the next release.
- ///
- ///
- /// The identifier of the resource.
- ///
- ///
- /// Client Api Version. NOTE: This is not a client property, it must be
- /// explicit in the call and there is no default value.
- ///
- ///
- /// OData parameters to apply 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>> ListWithHttpMessagesAsync(string resourceUri, string apiVersion, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/UsageMetric.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/UsageMetric.cs
deleted file mode 100644
index 0768915573c3..000000000000
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/Models/UsageMetric.cs
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace Microsoft.Azure.Management.Monitor.Models
-{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Usage Metric data.
- ///
- public partial class UsageMetric
- {
- ///
- /// Initializes a new instance of the UsageMetric class.
- ///
- public UsageMetric()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the UsageMetric class.
- ///
- /// the usage metric name and display name.
- /// the current value for the usage
- /// metric.
- /// the id for the usage metric.
- /// the quota limit the usage metric.
- /// the unit for the usage metric.
- /// the next reset time for the current
- /// value.
- /// the amount of time it takes to reset the
- /// value.
- public UsageMetric(LocalizableString name = default(LocalizableString), double? currentValue = default(double?), string id = default(string), double? limit = default(double?), string unit = default(string), System.DateTime? nextResetTime = default(System.DateTime?), System.TimeSpan? quotaPeriod = default(System.TimeSpan?))
- {
- Name = name;
- CurrentValue = currentValue;
- Id = id;
- Limit = limit;
- 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.
- ///
- [JsonProperty(PropertyName = "name")]
- public LocalizableString Name { get; set; }
-
- ///
- /// Gets or sets the current value for the usage metric.
- ///
- [JsonProperty(PropertyName = "currentValue")]
- public double? CurrentValue { get; set; }
-
- ///
- /// Gets or sets the id for the usage metric.
- ///
- [JsonProperty(PropertyName = "id")]
- public string Id { get; set; }
-
- ///
- /// Gets or sets the quota limit the usage metric.
- ///
- [JsonProperty(PropertyName = "limit")]
- public double? Limit { get; set; }
-
- ///
- /// Gets or sets the unit for the usage metric.
- ///
- [JsonProperty(PropertyName = "unit")]
- public string Unit { get; set; }
-
- ///
- /// Gets or sets the next reset time for the current value.
- ///
- [JsonProperty(PropertyName = "nextResetTime")]
- public System.DateTime? NextResetTime { get; set; }
-
- ///
- /// Gets or sets the amount of time it takes to reset the value.
- ///
- [JsonProperty(PropertyName = "quotaPeriod")]
- public System.TimeSpan? QuotaPeriod { get; set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public virtual void Validate()
- {
- if (Name != null)
- {
- Name.Validate();
- }
- }
- }
-}
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MonitorClient.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MonitorClient.cs
deleted file mode 100644
index cee3e5e685dd..000000000000
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/MonitorClient.cs
+++ /dev/null
@@ -1,341 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace Microsoft.Azure.Management.Monitor
-{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Microsoft.Rest.Serialization;
- using Models;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Net;
- using System.Net.Http;
-
- ///
- /// Monitor Client
- ///
- public partial class MonitorClient : ServiceClient, IMonitorClient, IAzureClient
- {
- ///
- /// The base URI of the service.
- ///
- public System.Uri BaseUri { get; set; }
-
- ///
- /// Gets or sets json serialization settings.
- ///
- public JsonSerializerSettings SerializationSettings { get; private set; }
-
- ///
- /// Gets or sets json deserialization settings.
- ///
- public JsonSerializerSettings DeserializationSettings { get; private set; }
-
- ///
- /// Credentials needed for the client to connect to Azure.
- ///
- public ServiceClientCredentials Credentials { get; private set; }
-
- ///
- /// The Azure subscription Id.
- ///
- public string SubscriptionId { get; set; }
-
- ///
- /// Gets or sets the preferred language for the response.
- ///
- public string AcceptLanguage { get; set; }
-
- ///
- /// Gets or sets the retry timeout in seconds for Long Running Operations.
- /// Default value is 30.
- ///
- public int? LongRunningOperationRetryTimeout { get; set; }
-
- ///
- /// When set to true a unique x-ms-client-request-id value is generated and
- /// included in each request. Default is true.
- ///
- public bool? GenerateClientRequestId { get; set; }
-
- ///
- /// Gets the IUsageMetricsOperations.
- ///
- public virtual IUsageMetricsOperations UsageMetrics { get; private set; }
-
- ///
- /// Gets the IActivityLogsOperations.
- ///
- public virtual IActivityLogsOperations ActivityLogs { get; private set; }
-
- ///
- /// Gets the IEventCategoriesOperations.
- ///
- public virtual IEventCategoriesOperations EventCategories { get; private set; }
-
- ///
- /// Gets the ITenantActivityLogsOperations.
- ///
- public virtual ITenantActivityLogsOperations TenantActivityLogs { get; private set; }
-
- ///
- /// Gets the IMetricDefinitionsOperations.
- ///
- public virtual IMetricDefinitionsOperations MetricDefinitions { get; private set; }
-
- ///
- /// Gets the IMetricsOperations.
- ///
- public virtual IMetricsOperations Metrics { get; private set; }
-
- ///
- /// Initializes a new instance of the MonitorClient class.
- ///
- ///
- /// Optional. The delegating handlers to add to the http client pipeline.
- ///
- protected MonitorClient(params DelegatingHandler[] handlers) : base(handlers)
- {
- Initialize();
- }
-
- ///
- /// Initializes a new instance of the MonitorClient class.
- ///
- ///
- /// Optional. The http client handler used to handle http transport.
- ///
- ///
- /// Optional. The delegating handlers to add to the http client pipeline.
- ///
- protected MonitorClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers)
- {
- Initialize();
- }
-
- ///
- /// Initializes a new instance of the MonitorClient class.
- ///
- ///
- /// Optional. The base URI of the service.
- ///
- ///
- /// Optional. The delegating handlers to add to the http client pipeline.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- protected MonitorClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)
- {
- if (baseUri == null)
- {
- throw new System.ArgumentNullException("baseUri");
- }
- BaseUri = baseUri;
- }
-
- ///
- /// Initializes a new instance of the MonitorClient class.
- ///
- ///
- /// Optional. The base URI of the service.
- ///
- ///
- /// Optional. The http client handler used to handle http transport.
- ///
- ///
- /// Optional. The delegating handlers to add to the http client pipeline.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- protected MonitorClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
- {
- if (baseUri == null)
- {
- throw new System.ArgumentNullException("baseUri");
- }
- BaseUri = baseUri;
- }
-
- ///
- /// Initializes a new instance of the MonitorClient class.
- ///
- ///
- /// Required. Credentials needed for the client to connect to Azure.
- ///
- ///
- /// Optional. The delegating handlers to add to the http client pipeline.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- public MonitorClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)
- {
- if (credentials == null)
- {
- throw new System.ArgumentNullException("credentials");
- }
- Credentials = credentials;
- if (Credentials != null)
- {
- Credentials.InitializeServiceClient(this);
- }
- }
-
- ///
- /// Initializes a new instance of the MonitorClient class.
- ///
- ///
- /// Required. Credentials needed for the client to connect to Azure.
- ///
- ///
- /// Optional. The http client handler used to handle http transport.
- ///
- ///
- /// Optional. The delegating handlers to add to the http client pipeline.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- public MonitorClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
- {
- if (credentials == null)
- {
- throw new System.ArgumentNullException("credentials");
- }
- Credentials = credentials;
- if (Credentials != null)
- {
- Credentials.InitializeServiceClient(this);
- }
- }
-
- ///
- /// Initializes a new instance of the MonitorClient class.
- ///
- ///
- /// Optional. The base URI of the service.
- ///
- ///
- /// Required. Credentials needed for the client to connect to Azure.
- ///
- ///
- /// Optional. The delegating handlers to add to the http client pipeline.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- public MonitorClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)
- {
- if (baseUri == null)
- {
- throw new System.ArgumentNullException("baseUri");
- }
- if (credentials == null)
- {
- throw new System.ArgumentNullException("credentials");
- }
- BaseUri = baseUri;
- Credentials = credentials;
- if (Credentials != null)
- {
- Credentials.InitializeServiceClient(this);
- }
- }
-
- ///
- /// Initializes a new instance of the MonitorClient class.
- ///
- ///
- /// Optional. The base URI of the service.
- ///
- ///
- /// Required. Credentials needed for the client to connect to Azure.
- ///
- ///
- /// Optional. The http client handler used to handle http transport.
- ///
- ///
- /// Optional. The delegating handlers to add to the http client pipeline.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- public MonitorClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
- {
- if (baseUri == null)
- {
- throw new System.ArgumentNullException("baseUri");
- }
- if (credentials == null)
- {
- throw new System.ArgumentNullException("credentials");
- }
- BaseUri = baseUri;
- Credentials = credentials;
- if (Credentials != null)
- {
- Credentials.InitializeServiceClient(this);
- }
- }
-
- ///
- /// An optional partial-method to perform custom initialization.
- ///
- partial void CustomInitialize();
- ///
- /// Initializes client properties.
- ///
- private void Initialize()
- {
- UsageMetrics = new UsageMetricsOperations(this);
- ActivityLogs = new ActivityLogsOperations(this);
- EventCategories = new EventCategoriesOperations(this);
- TenantActivityLogs = new TenantActivityLogsOperations(this);
- MetricDefinitions = new MetricDefinitionsOperations(this);
- Metrics = new MetricsOperations(this);
- BaseUri = new System.Uri("https://management.azure.com");
- AcceptLanguage = "en-US";
- LongRunningOperationRetryTimeout = 30;
- GenerateClientRequestId = true;
- SerializationSettings = new JsonSerializerSettings
- {
- Formatting = Newtonsoft.Json.Formatting.Indented,
- DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
- DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
- NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
- ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
- ContractResolver = new ReadOnlyJsonContractResolver(),
- Converters = new List
- {
- new Iso8601TimeSpanConverter()
- }
- };
- DeserializationSettings = new JsonSerializerSettings
- {
- DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
- DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
- NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
- ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
- ContractResolver = new ReadOnlyJsonContractResolver(),
- Converters = new List
- {
- new Iso8601TimeSpanConverter()
- }
- };
- CustomInitialize();
- DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
- }
- }
-}
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/UsageMetricsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/UsageMetricsOperations.cs
deleted file mode 100644
index 2c1213866f7f..000000000000
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/UsageMetricsOperations.cs
+++ /dev/null
@@ -1,251 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace Microsoft.Azure.Management.Monitor
-{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Microsoft.Rest.Azure.OData;
- using Models;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Net;
- using System.Net.Http;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// UsageMetricsOperations operations.
- ///
- internal partial class UsageMetricsOperations : IServiceOperations, IUsageMetricsOperations
- {
- ///
- /// Initializes a new instance of the UsageMetricsOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal UsageMetricsOperations(MonitorClient client)
- {
- if (client == null)
- {
- throw new System.ArgumentNullException("client");
- }
- Client = client;
- }
-
- ///
- /// Gets a reference to the MonitorClient
- ///
- public MonitorClient Client { get; private set; }
-
- ///
- /// The List operation lists the usage metrics for the
- /// resource.<br>**WARNING**: This operation will be *deprecated* in the
- /// next release.
- ///
- ///
- /// The identifier of the resource.
- ///
- ///
- /// Client Api Version. NOTE: This is not a client property, it must be
- /// explicit in the call and there is no default value.
- ///
- ///
- /// OData parameters to apply 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>> ListWithHttpMessagesAsync(string resourceUri, string apiVersion, ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceUri == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceUri");
- }
- if (apiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "apiVersion");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("odataQuery", odataQuery);
- tracingParameters.Add("resourceUri", resourceUri);
- tracingParameters.Add("apiVersion", apiVersion);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{resourceUri}/usages").ToString();
- _url = _url.Replace("{resourceUri}", resourceUri);
- List _queryParameters = new List();
- if (odataQuery != null)
- {
- var _odataFilter = odataQuery.ToString();
- if (!string.IsNullOrEmpty(_odataFilter))
- {
- _queryParameters.Add(_odataFilter);
- }
- }
- 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/Monitor/UsageMetricsOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/UsageMetricsOperationsExtensions.cs
deleted file mode 100644
index b492482fbff7..000000000000
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/UsageMetricsOperationsExtensions.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace Microsoft.Azure.Management.Monitor
-{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Microsoft.Rest.Azure.OData;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for UsageMetricsOperations.
- ///
- public static partial class UsageMetricsOperationsExtensions
- {
- ///
- /// The List operation lists the usage metrics for the
- /// resource.<br>**WARNING**: This operation will be *deprecated* in the
- /// next release.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The identifier of the resource.
- ///
- ///
- /// Client Api Version. NOTE: This is not a client property, it must be
- /// explicit in the call and there is no default value.
- ///
- ///
- /// OData parameters to apply to the operation.
- ///
- public static IEnumerable List(this IUsageMetricsOperations operations, string resourceUri, string apiVersion, ODataQuery odataQuery = default(ODataQuery))
- {
- return ((IUsageMetricsOperations)operations).ListAsync(resourceUri, apiVersion, odataQuery).GetAwaiter().GetResult();
- }
-
- ///
- /// The List operation lists the usage metrics for the
- /// resource.<br>**WARNING**: This operation will be *deprecated* in the
- /// next release.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The identifier of the resource.
- ///
- ///
- /// Client Api Version. NOTE: This is not a client property, it must be
- /// explicit in the call and there is no default value.
- ///
- ///
- /// OData parameters to apply to the operation.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task> ListAsync(this IUsageMetricsOperations operations, string resourceUri, string apiVersion, ODataQuery odataQuery = default(ODataQuery), CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListWithHttpMessagesAsync(resourceUri, apiVersion, odataQuery, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- }
-}
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/MonitorManagementClient.cs b/src/SDKs/Monitor/Management.Monitor/Generated/MonitorManagementClient.cs
similarity index 90%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/MonitorManagementClient.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/MonitorManagementClient.cs
index 0334f4661c01..5f855f799351 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/MonitorManagementClient.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/MonitorManagementClient.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Microsoft.Rest.Serialization;
@@ -114,6 +113,36 @@ public partial class MonitorManagementClient : ServiceClient
public virtual IActivityLogAlertsOperations ActivityLogAlerts { get; private set; }
+ ///
+ /// Gets the IActivityLogsOperations.
+ ///
+ public virtual IActivityLogsOperations ActivityLogs { get; private set; }
+
+ ///
+ /// Gets the IEventCategoriesOperations.
+ ///
+ public virtual IEventCategoriesOperations EventCategories { get; private set; }
+
+ ///
+ /// Gets the ITenantActivityLogsOperations.
+ ///
+ public virtual ITenantActivityLogsOperations TenantActivityLogs { get; private set; }
+
+ ///
+ /// Gets the IMetricDefinitionsOperations.
+ ///
+ public virtual IMetricDefinitionsOperations MetricDefinitions { get; private set; }
+
+ ///
+ /// Gets the IMetricsOperations.
+ ///
+ public virtual IMetricsOperations Metrics { get; private set; }
+
+ ///
+ /// Gets the IMetricBaselineOperations.
+ ///
+ public virtual IMetricBaselineOperations MetricBaseline { get; private set; }
+
///
/// Initializes a new instance of the MonitorManagementClient class.
///
@@ -324,6 +353,12 @@ private void Initialize()
DiagnosticSettingsCategory = new DiagnosticSettingsCategoryOperations(this);
ActionGroups = new ActionGroupsOperations(this);
ActivityLogAlerts = new ActivityLogAlertsOperations(this);
+ ActivityLogs = new ActivityLogsOperations(this);
+ EventCategories = new EventCategoriesOperations(this);
+ TenantActivityLogs = new TenantActivityLogsOperations(this);
+ MetricDefinitions = new MetricDefinitionsOperations(this);
+ Metrics = new MetricsOperations(this);
+ MetricBaseline = new MetricBaselineOperations(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/Operations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/Operations.cs
similarity index 98%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Operations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/Operations.cs
index 4fdf8930a105..8e15790a2f9b 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/Operations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/Operations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/OperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/OperationsExtensions.cs
similarity index 91%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/OperationsExtensions.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/OperationsExtensions.cs
index ba66b52e08ce..20dca99b5bd7 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Management/Monitor/OperationsExtensions.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/OperationsExtensions.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,12 +6,10 @@
// 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
+namespace Microsoft.Azure.Management.Monitor
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.Monitor;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/SdkInfo_MonitorClient.cs b/src/SDKs/Monitor/Management.Monitor/Generated/SdkInfo_MonitorClient.cs
new file mode 100644
index 000000000000..3a5b83aabd15
--- /dev/null
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/SdkInfo_MonitorClient.cs
@@ -0,0 +1,32 @@
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+internal static partial class SdkInfo
+{
+ public static IEnumerable> ApiInfo_MonitorClient
+ {
+ get
+ {
+ return new Tuple[]
+ {
+ new Tuple("insights", "ActionGroups", "2017-04-01"),
+ new Tuple("insights", "ActivityLogAlerts", "2017-04-01"),
+ new Tuple("insights", "ActivityLogs", "2015-04-01"),
+ new Tuple("insights", "AlertRuleIncidents", "2016-03-01"),
+ new Tuple("insights", "AlertRules", "2016-03-01"),
+ new Tuple("insights", "AutoscaleSettings", "2015-04-01"),
+ new Tuple("insights", "DiagnosticSettings", "2017-05-01-preview"),
+ new Tuple("insights", "DiagnosticSettingsCategory", "2017-05-01-preview"),
+ new Tuple("insights", "EventCategories", "2015-04-01"),
+ new Tuple("insights", "LogProfiles", "2016-03-01"),
+ new Tuple("insights", "MetricBaseline", "2017-11-01-preview"),
+ new Tuple("insights", "MetricDefinitions", "2017-05-01-preview"),
+ new Tuple("insights", "Metrics", "2017-05-01-preview"),
+ new Tuple("insights", "Operations", "2015-04-01"),
+ new Tuple("insights", "TenantActivityLogs", "2015-04-01"),
+ }.AsEnumerable();
+ }
+ }
+}
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/TenantActivityLogsOperations.cs b/src/SDKs/Monitor/Management.Monitor/Generated/TenantActivityLogsOperations.cs
similarity index 97%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/TenantActivityLogsOperations.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/TenantActivityLogsOperations.cs
index 427a775e0027..ed9e35a8f8e1 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/TenantActivityLogsOperations.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/TenantActivityLogsOperations.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,11 +6,10 @@
// 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
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Microsoft.Rest.Azure.OData;
@@ -26,7 +26,7 @@ namespace Microsoft.Azure.Management.Monitor
///
/// TenantActivityLogsOperations operations.
///
- internal partial class TenantActivityLogsOperations : IServiceOperations, ITenantActivityLogsOperations
+ internal partial class TenantActivityLogsOperations : IServiceOperations, ITenantActivityLogsOperations
{
///
/// Initializes a new instance of the TenantActivityLogsOperations class.
@@ -37,7 +37,7 @@ internal partial class TenantActivityLogsOperations : IServiceOperations
/// Thrown when a required parameter is null
///
- internal TenantActivityLogsOperations(MonitorClient client)
+ internal TenantActivityLogsOperations(MonitorManagementClient client)
{
if (client == null)
{
@@ -47,9 +47,9 @@ internal TenantActivityLogsOperations(MonitorClient client)
}
///
- /// Gets a reference to the MonitorClient
+ /// Gets a reference to the MonitorManagementClient
///
- public MonitorClient Client { get; private set; }
+ public MonitorManagementClient Client { get; private set; }
///
/// Gets the Activity Logs for the Tenant.<br>Everything that is
@@ -223,7 +223,7 @@ internal TenantActivityLogsOperations(MonitorClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
@@ -396,7 +396,7 @@ internal TenantActivityLogsOperations(MonitorClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
diff --git a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/TenantActivityLogsOperationsExtensions.cs b/src/SDKs/Monitor/Management.Monitor/Generated/TenantActivityLogsOperationsExtensions.cs
similarity index 97%
rename from src/SDKs/Monitor/Management.Monitor/Generated/Monitor/TenantActivityLogsOperationsExtensions.cs
rename to src/SDKs/Monitor/Management.Monitor/Generated/TenantActivityLogsOperationsExtensions.cs
index e0335cd3b16c..c604bbc8afd4 100644
--- a/src/SDKs/Monitor/Management.Monitor/Generated/Monitor/TenantActivityLogsOperationsExtensions.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Generated/TenantActivityLogsOperationsExtensions.cs
@@ -1,3 +1,4 @@
+//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
@@ -5,11 +6,10 @@
// 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
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Microsoft.Rest.Azure.OData;
@@ -47,7 +47,7 @@ public static partial class TenantActivityLogsOperationsExtensions
///
public static IPage List(this ITenantActivityLogsOperations operations, ODataQuery odataQuery = default(ODataQuery), string select = default(string))
{
- return ((ITenantActivityLogsOperations)operations).ListAsync(odataQuery, select).GetAwaiter().GetResult();
+ return operations.ListAsync(odataQuery, select).GetAwaiter().GetResult();
}
///
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 e08a95e48f4d..a2097646fd33 100644
--- a/src/SDKs/Monitor/Management.Monitor/Microsoft.Azure.Management.Monitor.csproj
+++ b/src/SDKs/Monitor/Management.Monitor/Microsoft.Azure.Management.Monitor.csproj
@@ -6,7 +6,7 @@
Microsoft Azure Monitor Library
Microsoft.Azure.Management.Monitor
- 0.18.1-preview
+ 0.19.0-preview
Microsoft.Azure.Management.Monitor
Management.Monitor;Management.Monitoring;metrics;alerts;autoscale;activityLogs;events;operations;logs;
See https://aka.ms/azure-sdk-for-net/monitor/changelog for release notes.
diff --git a/src/SDKs/Monitor/Management.Monitor/Properties/AssemblyInfo.cs b/src/SDKs/Monitor/Management.Monitor/Properties/AssemblyInfo.cs
index 781376332d64..e6788dc696f6 100644
--- a/src/SDKs/Monitor/Management.Monitor/Properties/AssemblyInfo.cs
+++ b/src/SDKs/Monitor/Management.Monitor/Properties/AssemblyInfo.cs
@@ -3,13 +3,12 @@
using System.Reflection;
using System.Resources;
-using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Microsoft Azure Monitor Library")]
[assembly: AssemblyDescription("Provides Microsoft Azure Monitor operations.")]
-[assembly: AssemblyVersion("0.18.1.0")]
-[assembly: AssemblyFileVersion("0.18.1.0")]
+[assembly: AssemblyVersion("0.19.0.0")]
+[assembly: AssemblyFileVersion("0.19.0.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
index 600c6e864506..a18938b8673e 100644
--- a/src/SDKs/Monitor/Monitor.Tests/BasicTests/ActionGroupsTests.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/BasicTests/ActionGroupsTests.cs
@@ -7,8 +7,8 @@
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 Microsoft.Azure.Management.Monitor;
+using Microsoft.Azure.Management.Monitor.Models;
using Xunit;
using Microsoft.Rest.Azure;
@@ -110,6 +110,38 @@ public void ListActionGroupsByResourceGroupTest()
AreEqual(expectedParameters.ToList(), actualGroups.ToList());
}
+ [Fact]
+ [Trait("Category", "Mock")]
+ public void UpdateActionGroupTest()
+ {
+ 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);
+
+ ActionGroupPatchBody bodyParameter = new ActionGroupPatchBody
+ {
+ Enabled = true,
+ Tags = null
+ };
+
+ var result = insightsClient.ActionGroups.Update(
+ resourceGroupName: "rg1",
+ actionGroupName: expectedParameters.Name,
+ actionGroupPatch: bodyParameter);
+
+ AreEqual(expectedParameters, result);
+ }
+
[Fact]
[Trait("Category", "Mock")]
public void DeleteActionGroupTest()
@@ -170,6 +202,9 @@ private static void AreEqual(ActionGroupResource exp, ActionGroupResource act)
AreEqual(exp.EmailReceivers, act.EmailReceivers);
AreEqual(exp.SmsReceivers, act.SmsReceivers);
AreEqual(exp.WebhookReceivers, act.WebhookReceivers);
+ AreEqual(exp.ItsmReceivers, act.ItsmReceivers);
+ AreEqual(exp.AzureAppPushReceivers, act.AzureAppPushReceivers);
+ AreEqual(exp.AutomationRunbookReceivers, act.AutomationRunbookReceivers);
}
}
@@ -217,6 +252,39 @@ private static void AreEqual(IList exp, IList
}
}
+ 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)
@@ -246,11 +314,47 @@ private static void AreEqual(WebhookReceiver exp, WebhookReceiver act)
}
}
+ private static void AreEqual(AzureAppPushReceiver exp, AzureAppPushReceiver act)
+ {
+ if (exp != null)
+ {
+ Assert.Equal(exp.EmailAddress, act.EmailAddress);
+ Assert.Equal(exp.Name, act.Name);
+ }
+ }
+
+ private static void AreEqual(ItsmReceiver exp, ItsmReceiver act)
+ {
+ if (exp != null)
+ {
+ Assert.Equal(exp.Name, act.Name);
+ Assert.Equal(exp.Region, act.Region);
+ Assert.Equal(exp.TicketConfiguration, act.TicketConfiguration);
+ Assert.Equal(exp.WorkspaceId, act.WorkspaceId);
+ Assert.Equal(exp.ConnectionId, act.ConnectionId);
+ }
+ }
+
+ private static void AreEqual(AutomationRunbookReceiver exp, AutomationRunbookReceiver act)
+ {
+ if (exp != null)
+ {
+ Assert.Equal(exp.AutomationAccountId, act.AutomationAccountId);
+ Assert.Equal(exp.IsGlobalRunbook, act.IsGlobalRunbook);
+ Assert.Equal(exp.Name, act.Name);
+ Assert.Equal(exp.RunbookName, act.RunbookName);
+ Assert.Equal(exp.ServiceUri, act.ServiceUri);
+ }
+ }
+
private static ActionGroupResource GetCreateOrUpdateActionGroupParameter(
string name = "name1",
List emailReceivers = null,
List smsReceivers = null,
- List webhookReceivers = null)
+ List webhookReceivers = null,
+ List azureAppPushReceivers = null,
+ List itsmReceivers = null,
+ List automationRunbookReceivers = null)
{
// Name and id won't be serialized since they are readonly
return new ActionGroupResource(
@@ -265,7 +369,10 @@ private static ActionGroupResource GetCreateOrUpdateActionGroupParameter(
},
emailReceivers: emailReceivers,
smsReceivers: smsReceivers,
- webhookReceivers: webhookReceivers
+ webhookReceivers: webhookReceivers,
+ azureAppPushReceivers: azureAppPushReceivers,
+ itsmReceivers: itsmReceivers,
+ automationRunbookReceivers: automationRunbookReceivers
);
}
}
diff --git a/src/SDKs/Monitor/Monitor.Tests/BasicTests/ActivityLogAlertsTests.cs b/src/SDKs/Monitor/Monitor.Tests/BasicTests/ActivityLogAlertsTests.cs
index c2221c67d7fe..1c5d11387963 100644
--- a/src/SDKs/Monitor/Monitor.Tests/BasicTests/ActivityLogAlertsTests.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/BasicTests/ActivityLogAlertsTests.cs
@@ -7,8 +7,8 @@
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 Microsoft.Azure.Management.Monitor;
+using Microsoft.Azure.Management.Monitor.Models;
using Xunit;
using Microsoft.Rest.Azure;
diff --git a/src/SDKs/Monitor/Monitor.Tests/BasicTests/AlertsTests.cs b/src/SDKs/Monitor/Monitor.Tests/BasicTests/AlertsTests.cs
index 5b09a80aa8c7..5a1db72eb0a3 100644
--- a/src/SDKs/Monitor/Monitor.Tests/BasicTests/AlertsTests.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/BasicTests/AlertsTests.cs
@@ -7,8 +7,8 @@
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 Microsoft.Azure.Management.Monitor;
+using Microsoft.Azure.Management.Monitor.Models;
using Xunit;
namespace Monitor.Tests.BasicTests
diff --git a/src/SDKs/Monitor/Monitor.Tests/BasicTests/AutoscaleTests.cs b/src/SDKs/Monitor/Monitor.Tests/BasicTests/AutoscaleTests.cs
index 65b4815b2bf0..2b5e0fdd1c53 100644
--- a/src/SDKs/Monitor/Monitor.Tests/BasicTests/AutoscaleTests.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/BasicTests/AutoscaleTests.cs
@@ -6,8 +6,8 @@
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 Microsoft.Azure.Management.Monitor;
+using Microsoft.Azure.Management.Monitor.Models;
using Xunit;
namespace Monitor.Tests.BasicTests
diff --git a/src/SDKs/Monitor/Monitor.Tests/BasicTests/DiagnosticSettingsTests.cs b/src/SDKs/Monitor/Monitor.Tests/BasicTests/DiagnosticSettingsTests.cs
index 830b872b86ee..dc677a0352c7 100644
--- a/src/SDKs/Monitor/Monitor.Tests/BasicTests/DiagnosticSettingsTests.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/BasicTests/DiagnosticSettingsTests.cs
@@ -6,8 +6,8 @@
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 Microsoft.Azure.Management.Monitor;
+using Microsoft.Azure.Management.Monitor.Models;
using Xunit;
namespace Monitor.Tests.BasicTests
@@ -169,7 +169,7 @@ private static void AreEqual(DiagnosticSettingsResource exp, DiagnosticSettingsR
if (exp == null)
{
- Assert.Equal(null, act);
+ Assert.Null(act);
}
Assert.False(act == null, "Actual value can't be null");
@@ -217,7 +217,7 @@ private static void CompareLists(IList exp, IList act)
if (exp == null)
{
- Assert.Equal(null, act);
+ Assert.Null(act);
}
Assert.False(act == null, "Actual value can't be null");
diff --git a/src/SDKs/Monitor/Monitor.Tests/BasicTests/EventDataTests.cs b/src/SDKs/Monitor/Monitor.Tests/BasicTests/EventDataTests.cs
index 70e6c82ea5b1..eaf498488384 100644
--- a/src/SDKs/Monitor/Monitor.Tests/BasicTests/EventDataTests.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/BasicTests/EventDataTests.cs
@@ -62,7 +62,7 @@ public void ListEventsTest()
var startTime = DateTimeOffset.Parse("2014-03-11T01:00:00.00Z");
var endTime = DateTimeOffset.Parse("2014-03-11T02:00:00.00Z");
- var insightsClient = GetMonitorClient(handler);
+ var insightsClient = GetMonitorManagementClient(handler);
var filterString = new ODataQuery(p => (p.EventTimestamp >= startTime) && (p.EventTimestamp < endTime));
@@ -86,7 +86,7 @@ public void ListEventsNextTest()
};
var handler = new RecordedDelegatingHandler(response) { StatusCodeToReturn = HttpStatusCode.OK };
- var insightsClient = GetMonitorClient(handler);
+ var insightsClient = GetMonitorManagementClient(handler);
var actualEventDataCollection = insightsClient.ActivityLogs.ListNext("http://www.microsoft.com");
diff --git a/src/SDKs/Monitor/Monitor.Tests/BasicTests/LogProfilesTests.cs b/src/SDKs/Monitor/Monitor.Tests/BasicTests/LogProfilesTests.cs
index 1834bbf8fb0e..84f6e62319d7 100644
--- a/src/SDKs/Monitor/Monitor.Tests/BasicTests/LogProfilesTests.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/BasicTests/LogProfilesTests.cs
@@ -6,8 +6,8 @@
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 Microsoft.Azure.Management.Monitor;
+using Microsoft.Azure.Management.Monitor.Models;
using Xunit;
namespace Monitor.Tests.BasicTests
@@ -189,7 +189,7 @@ private static void CompareListString(IList exp, IList act)
if (exp == null)
{
- Assert.Equal(null, act);
+ Assert.Null(act);
}
Assert.False(act == null, "List can't be null");
diff --git a/src/SDKs/Monitor/Monitor.Tests/BasicTests/MetricsTests.cs b/src/SDKs/Monitor/Monitor.Tests/BasicTests/MetricsTests.cs
index 18f66147b747..763565d10874 100644
--- a/src/SDKs/Monitor/Monitor.Tests/BasicTests/MetricsTests.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/BasicTests/MetricsTests.cs
@@ -29,7 +29,7 @@ public void GetMetricDefinitionsTest()
};
RecordedDelegatingHandler handler = new RecordedDelegatingHandler(response);
- var insightsClient = GetMonitorClient(handler);
+ var insightsClient = GetMonitorManagementClient(handler);
var actualMetricDefinitions = insightsClient.MetricDefinitions.ListAsync(resourceUri: ResourceUri, cancellationToken: new CancellationToken()).Result;
@@ -47,7 +47,7 @@ public void GetMetricsTest()
};
RecordedDelegatingHandler handler = new RecordedDelegatingHandler(response);
- var insightsClient = GetMonitorClient(handler);
+ var insightsClient = GetMonitorManagementClient(handler);
var actualMetrics = insightsClient.Metrics.ListAsync(
resourceUri: ResourceUri,
diff --git a/src/SDKs/Monitor/Monitor.Tests/BasicTests/OperationsTests.cs b/src/SDKs/Monitor/Monitor.Tests/BasicTests/OperationsTests.cs
index 1a553c46ec83..39ab501da351 100644
--- a/src/SDKs/Monitor/Monitor.Tests/BasicTests/OperationsTests.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/BasicTests/OperationsTests.cs
@@ -6,8 +6,8 @@
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 Microsoft.Azure.Management.Monitor;
+using Microsoft.Azure.Management.Monitor.Models;
using Xunit;
namespace Monitor.Tests.BasicTests
diff --git a/src/SDKs/Monitor/Monitor.Tests/BasicTests/TestBaseTests.cs b/src/SDKs/Monitor/Monitor.Tests/BasicTests/TestBaseTests.cs
index 768384a78c65..e56f7499aac8 100644
--- a/src/SDKs/Monitor/Monitor.Tests/BasicTests/TestBaseTests.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/BasicTests/TestBaseTests.cs
@@ -4,26 +4,12 @@
using System;
using Monitor.Tests.Helpers;
using Microsoft.Azure.Management.Monitor;
-using Microsoft.Azure.Management.Monitor.Management;
using Microsoft.Rest;
namespace Monitor.Tests.BasicTests
{
public class TestBase
{
- protected MonitorClient GetMonitorClient(RecordedDelegatingHandler handler)
- {
- handler.IsPassThrough = false;
- var tokenProvider = new StringTokenProvider("granted", "SimpleString");
- var id = Guid.NewGuid().ToString();
- var token = new TokenCredentials(tokenProvider: tokenProvider, tenantId: id, callerId: id);
- var client = new MonitorClient(token, handler);
- token.InitializeServiceClient(client);
- client.SubscriptionId = id;
-
- return client;
- }
-
protected MonitorManagementClient GetMonitorManagementClient(RecordedDelegatingHandler handler)
{
handler.IsPassThrough = false;
diff --git a/src/SDKs/Monitor/Monitor.Tests/BasicTests/UsagesTests.cs b/src/SDKs/Monitor/Monitor.Tests/BasicTests/UsagesTests.cs
deleted file mode 100644
index e09b232db936..000000000000
--- a/src/SDKs/Monitor/Monitor.Tests/BasicTests/UsagesTests.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-// 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 System.Net.Http;
-using Monitor.Tests.Helpers;
-using Microsoft.Azure.Management.Monitor;
-using Microsoft.Azure.Management.Monitor.Models;
-using Xunit;
-using Newtonsoft.Json;
-
-namespace Monitor.Tests.BasicTests
-{
- public class UsagesTests : TestBase
- {
- [Fact]
- [Trait("Category", "Mock")]
- public void ListUsageTest()
- {
- string resourceUri = "/subscriptions/123456789/resourceGroups/rg/providers/rp/rUri";
- List expectedUsageMetricCollection = GetUsageMetricCollection(resourceUri);
-
- var handler = new RecordedDelegatingHandler();
- var insightsClient = GetMonitorClient(handler);
- var serializedObject = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(expectedUsageMetricCollection, insightsClient.SerializationSettings);
-
- var response = new HttpResponseMessage(HttpStatusCode.OK)
- {
- Content = new StringContent(string.Concat("{ \"value\":", serializedObject, "}"))
- };
-
- handler = new RecordedDelegatingHandler(response) { StatusCodeToReturn = HttpStatusCode.OK };
- insightsClient = GetMonitorClient(handler);
-
- string filterString = "name.value eq 'CPUTime' or name.value eq 'Requests'";
- IEnumerable actualRespose = insightsClient.UsageMetrics.List(resourceUri: resourceUri, apiVersion: "2014-04-01", odataQuery: filterString);
-
- AreEqual(expectedUsageMetricCollection, actualRespose.GetEnumerator());
- }
-
- private static List GetUsageMetricCollection(string resourceUri)
- {
- return new List()
- {
- new UsageMetric(
- id: "The id",
- currentValue: 10.1,
- limit: 100.2,
- name: new LocalizableString(
- localizedValue: "Cpu Percentage",
- value: "CpuPercentage"),
- nextResetTime: DateTime.UtcNow.AddDays(1),
- quotaPeriod: TimeSpan.FromDays(1),
- unit: Unit.Percent.ToString()
- )
- };
- }
-
- private static void AreEqual(List exp, IEnumerator act)
- {
- if (exp != null)
- {
- List actList = new List();
- while (act.MoveNext())
- {
- actList.Add(act.Current);
- }
-
- Assert.Equal(exp.Count, actList.Count);
-
- for (int i = 0; i < exp.Count; i++)
- {
- AreEqual(exp[i], actList[i]);
- }
- }
- else
- {
- Assert.Null(act);
- }
- }
-
- private static void AreEqual(UsageMetric exp, UsageMetric act)
- {
- if (exp != null)
- {
- Assert.Equal(exp.CurrentValue, act.CurrentValue);
- Assert.Equal(exp.Limit, act.Limit);
- Assert.Equal(exp.NextResetTime, act.NextResetTime);
- Assert.Equal(exp.QuotaPeriod, act.QuotaPeriod);
- Assert.Equal(exp.Unit, act.Unit);
- Utilities.AreEqual(exp.Name, act.Name);
- }
- }
- }
-}
diff --git a/src/SDKs/Monitor/Monitor.Tests/Helpers/JsonExtensions.cs b/src/SDKs/Monitor/Monitor.Tests/Helpers/JsonExtensions.cs
index 61532268c024..4860590638a4 100644
--- a/src/SDKs/Monitor/Monitor.Tests/Helpers/JsonExtensions.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/Helpers/JsonExtensions.cs
@@ -6,7 +6,7 @@
using System.Globalization;
using System.Reflection;
using System.Xml;
-using Microsoft.Azure.Management.Monitor.Management.Models;
+using Microsoft.Azure.Management.Monitor.Models;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
diff --git a/src/SDKs/Monitor/Monitor.Tests/Helpers/Utilities.cs b/src/SDKs/Monitor/Monitor.Tests/Helpers/Utilities.cs
index 45e99a64ce36..1f1d32d69583 100644
--- a/src/SDKs/Monitor/Monitor.Tests/Helpers/Utilities.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/Helpers/Utilities.cs
@@ -3,7 +3,6 @@
using System;
using System.Collections.Generic;
-using Microsoft.Azure.Management.Monitor.Management.Models;
using Microsoft.Azure.Management.Monitor.Models;
using Xunit;
@@ -540,7 +539,7 @@ private static void CompareListString(IList exp, IList act)
if (exp == null)
{
- Assert.Equal(null, act);
+ Assert.Null(act);
}
Assert.False(act == null, "List can't be null");
@@ -571,7 +570,7 @@ public static void AreEqual(DiagnosticSettingsResource exp, DiagnosticSettingsRe
if (exp == null)
{
- Assert.Equal(null, act);
+ Assert.Null(act);
}
Assert.False(act == null, "Actual value can't be null");
diff --git a/src/SDKs/Monitor/Monitor.Tests/Monitor.Tests.csproj b/src/SDKs/Monitor/Monitor.Tests/Monitor.Tests.csproj
index b83570e3dc51..cbf3aaa90789 100644
--- a/src/SDKs/Monitor/Monitor.Tests/Monitor.Tests.csproj
+++ b/src/SDKs/Monitor/Monitor.Tests/Monitor.Tests.csproj
@@ -22,7 +22,7 @@
-
+
@@ -32,4 +32,4 @@
-
\ No newline at end of file
+
diff --git a/src/SDKs/Monitor/Monitor.Tests/Properties/AssemblyInfo.cs b/src/SDKs/Monitor/Monitor.Tests/Properties/AssemblyInfo.cs
index e8726da59bfd..842629989d3a 100644
--- a/src/SDKs/Monitor/Monitor.Tests/Properties/AssemblyInfo.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/Properties/AssemblyInfo.cs
@@ -8,14 +8,14 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
-[assembly: AssemblyTitle("Monitoring.Tests")]
+/*[assembly: AssemblyTitle("Monitoring.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("MSIT")]
[assembly: AssemblyProduct("Monitoring.Tests")]
[assembly: AssemblyCopyright("Copyright © MSIT 2013")]
[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
+[assembly: AssemblyCulture("")] */
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
@@ -35,5 +35,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+/*[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")] */
diff --git a/src/SDKs/Monitor/Monitor.Tests/Scenarios/ActionGroupsTests.cs b/src/SDKs/Monitor/Monitor.Tests/Scenarios/ActionGroupsTests.cs
index 8fa7498b1780..2976fc7e142c 100644
--- a/src/SDKs/Monitor/Monitor.Tests/Scenarios/ActionGroupsTests.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/Scenarios/ActionGroupsTests.cs
@@ -5,8 +5,8 @@
using System.Linq;
using System.Net;
using Monitor.Tests.Helpers;
-using Microsoft.Azure.Management.Monitor.Management;
-using Microsoft.Azure.Management.Monitor.Management.Models;
+using Microsoft.Azure.Management.Monitor;
+using Microsoft.Azure.Management.Monitor.Models;
using Xunit;
using Microsoft.Rest.Azure;
using Microsoft.Rest.ClientRuntime.Azure.TestFramework;
diff --git a/src/SDKs/Monitor/Monitor.Tests/Scenarios/ActivityLogAlertsTests.cs b/src/SDKs/Monitor/Monitor.Tests/Scenarios/ActivityLogAlertsTests.cs
index 41f29ce6b80e..6158cf222953 100644
--- a/src/SDKs/Monitor/Monitor.Tests/Scenarios/ActivityLogAlertsTests.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/Scenarios/ActivityLogAlertsTests.cs
@@ -7,8 +7,8 @@
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 Microsoft.Azure.Management.Monitor;
+using Microsoft.Azure.Management.Monitor.Models;
using Xunit;
using Microsoft.Rest.Azure;
using Microsoft.Rest.ClientRuntime.Azure.TestFramework;
diff --git a/src/SDKs/Monitor/Monitor.Tests/Scenarios/AlertsTests.cs b/src/SDKs/Monitor/Monitor.Tests/Scenarios/AlertsTests.cs
index c1b83b57e950..d2fcf515d3d0 100644
--- a/src/SDKs/Monitor/Monitor.Tests/Scenarios/AlertsTests.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/Scenarios/AlertsTests.cs
@@ -6,8 +6,8 @@
using System.Linq;
using System.Net;
using Monitor.Tests.Helpers;
-using Microsoft.Azure.Management.Monitor.Management;
-using Microsoft.Azure.Management.Monitor.Management.Models;
+using Microsoft.Azure.Management.Monitor;
+using Microsoft.Azure.Management.Monitor.Models;
using Xunit;
using Microsoft.Rest.ClientRuntime.Azure.TestFramework;
using Microsoft.Rest.Azure;
@@ -70,7 +70,8 @@ public void MetricBasedRule()
var selected = listOfRules.Where(r => string.Equals(r.Id, retrievedRule.Id, StringComparison.OrdinalIgnoreCase)).ToList();
Assert.NotNull(selected);
- Assert.Equal(1, selected.Count);
+ Assert.NotEmpty(selected);
+ Assert.True(selected.Count == 1);
Utilities.AreEqual(retrievedRule, selected[0]);
}
@@ -91,8 +92,7 @@ public void MetricBasedRule()
);
AlertRuleResource updatedRule = null;
- Assert.Throws(
- typeof(ErrorResponseException),
+ Assert.Throws(
() => updatedRule = insightsClient.AlertRules.Update(
resourceGroupName: ResourceGroupName,
ruleName: RuleName,
@@ -124,8 +124,7 @@ public void MetricBasedRule()
resourceGroupName: ResourceGroupName,
ruleName: RuleName);
- Assert.Throws(
- typeof(CloudException),
+ Assert.Throws(
() => insightsClient.AlertRules.Get(
resourceGroupName: ResourceGroupName,
ruleName: RuleName));
@@ -182,7 +181,7 @@ public void ListGetIncidentsTest()
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));
+ Assert.Equal(string.Format(provider: CultureInfo.InvariantCulture, format: ResourceId, args: insightsClient.SubscriptionId), incidentsList[0].RuleName, ignoreCase: true);
}
if (incidentsList.Count > 0)
diff --git a/src/SDKs/Monitor/Monitor.Tests/Scenarios/AutoscaleTests.cs b/src/SDKs/Monitor/Monitor.Tests/Scenarios/AutoscaleTests.cs
index 8d18894c9e7e..c93218432b97 100644
--- a/src/SDKs/Monitor/Monitor.Tests/Scenarios/AutoscaleTests.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/Scenarios/AutoscaleTests.cs
@@ -5,8 +5,8 @@
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 Microsoft.Azure.Management.Monitor;
+using Microsoft.Azure.Management.Monitor.Models;
using Xunit;
using Microsoft.Rest.ClientRuntime.Azure.TestFramework;
using System.Globalization;
@@ -85,8 +85,7 @@ public void MetricBasedFixedAndRecurrent()
);
AutoscaleSettingResource updatedSetting = null;
- Assert.Throws(
- typeof(ErrorResponseException),
+ Assert.Throws(
() => updatedSetting = insightsClient.AutoscaleSettings.Update(
resourceGroupName: ResourceGroup,
autoscaleSettingName: SettingName,
@@ -127,8 +126,7 @@ public void MetricBasedFixedAndRecurrent()
autoscaleSettingName: SettingName);
// Retrieve again the setting created above (must fail)
- Assert.Throws(
- typeof(ErrorResponseException),
+ Assert.Throws(
() => insightsClient.AutoscaleSettings.Get(
resourceGroupName: ResourceGroup,
autoscaleSettingName: SettingName));
diff --git a/src/SDKs/Monitor/Monitor.Tests/Scenarios/DiagnosticSettingsTests.cs b/src/SDKs/Monitor/Monitor.Tests/Scenarios/DiagnosticSettingsTests.cs
index aaba655d0e2b..7a268c55ad49 100644
--- a/src/SDKs/Monitor/Monitor.Tests/Scenarios/DiagnosticSettingsTests.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/Scenarios/DiagnosticSettingsTests.cs
@@ -5,8 +5,8 @@
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 Microsoft.Azure.Management.Monitor;
+using Microsoft.Azure.Management.Monitor.Models;
using Xunit;
using Microsoft.Rest.ClientRuntime.Azure.TestFramework;
@@ -27,7 +27,7 @@ public DiagnosticSettingsTests()
///
/// User needs several permissions before executing these commands. Otherwise it fails for some authorization issue.
///
- [Fact]
+ [Fact(Skip = "This feature is about to be changed.")]
[Trait("Category", "Scenario")]
public void CreateGetUpdateDiagnosticSetting()
{
diff --git a/src/SDKs/Monitor/Monitor.Tests/Scenarios/EventDataTests.cs b/src/SDKs/Monitor/Monitor.Tests/Scenarios/EventDataTests.cs
index 36af4cdc09df..aaf444819a45 100644
--- a/src/SDKs/Monitor/Monitor.Tests/Scenarios/EventDataTests.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/Scenarios/EventDataTests.cs
@@ -63,7 +63,7 @@ public void ListEventsTest()
{
List expectedEventDataCollection = GetEventDataCollection();
- var insightsClient = GetMonitorClient(context, handler);
+ var insightsClient = GetMonitorManagementClient(context, handler);
var startTime = DateTimeOffset.Parse("2017-08-01T00:00:00.00Z");
var endTime = DateTimeOffset.Parse("2017-08-01T23:59:00.00Z");
@@ -91,7 +91,7 @@ public void ListEventsNextTest()
{
List expectedEventDataCollection = GetEventDataCollection();
- var insightsClient = GetMonitorClient(context, handler);
+ var insightsClient = GetMonitorManagementClient(context, handler);
var actualEventDataCollection = insightsClient.ActivityLogs.ListNext("http://www.microsoft.com");
diff --git a/src/SDKs/Monitor/Monitor.Tests/Scenarios/LogProfilesTests.cs b/src/SDKs/Monitor/Monitor.Tests/Scenarios/LogProfilesTests.cs
index cdb2e6ca9ce5..e29ee287ec7a 100644
--- a/src/SDKs/Monitor/Monitor.Tests/Scenarios/LogProfilesTests.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/Scenarios/LogProfilesTests.cs
@@ -5,12 +5,12 @@
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;
+using Microsoft.Azure.Management.Monitor;
+using Microsoft.Azure.Management.Monitor.Models;
namespace Monitor.Tests.Scenarios
{
diff --git a/src/SDKs/Monitor/Monitor.Tests/Scenarios/MetricsTests.cs b/src/SDKs/Monitor/Monitor.Tests/Scenarios/MetricsTests.cs
index 60c11b79af9b..600a074c7e29 100644
--- a/src/SDKs/Monitor/Monitor.Tests/Scenarios/MetricsTests.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/Scenarios/MetricsTests.cs
@@ -37,7 +37,7 @@ public void GetMetricDefinitionsTest()
{
using (MockContext context = MockContext.Start(this.GetType().FullName))
{
- var insightsClient = GetMonitorClient(context, handler);
+ var insightsClient = GetMonitorManagementClient(context, handler);
// ***** read definitions for single-dim metrics here
@@ -69,7 +69,7 @@ public void GetMetricsTest()
{
using (MockContext context = MockContext.Start(this.GetType().FullName))
{
- var insightsClient = GetMonitorClient(context, handler);
+ var insightsClient = GetMonitorManagementClient(context, handler);
// **** First reading metrics from the old API
@@ -149,7 +149,7 @@ private void Check(Response act, bool multiDim = false)
var metric = act.Value[0];
Assert.False(string.IsNullOrWhiteSpace(metric.Id));
Assert.NotNull(metric.Name);
- Assert.Equal(metric.Type, "Microsoft.Insights/metrics");
+ Assert.Equal("Microsoft.Insights/metrics", metric.Type);
Assert.NotNull(metric.Timeseries);
if (metric.Timeseries.Count > 0)
@@ -181,7 +181,7 @@ private void CheckMetadata(Response act)
var metric = act.Value[0];
Assert.False(string.IsNullOrWhiteSpace(metric.Id));
Assert.NotNull(metric.Name);
- Assert.Equal(metric.Type, "Microsoft.Insights/metrics");
+ Assert.Equal("Microsoft.Insights/metrics", metric.Type);
Assert.NotNull(metric.Timeseries);
if (metric.Timeseries.Count > 0)
diff --git a/src/SDKs/Monitor/Monitor.Tests/Scenarios/OperationsTests.cs b/src/SDKs/Monitor/Monitor.Tests/Scenarios/OperationsTests.cs
index eb2254578b5b..b0df5f289410 100644
--- a/src/SDKs/Monitor/Monitor.Tests/Scenarios/OperationsTests.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/Scenarios/OperationsTests.cs
@@ -6,8 +6,8 @@
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 Microsoft.Azure.Management.Monitor;
+using Microsoft.Azure.Management.Monitor.Models;
using Xunit;
using Microsoft.Rest.ClientRuntime.Azure.TestFramework;
@@ -24,7 +24,7 @@ public OperationsTests()
}
[Fact]
- [Trait("Category", "Mock")]
+ [Trait("Category", "Scenario")]
public void ListOperationsTest()
{
using (MockContext context = MockContext.Start(this.GetType().FullName))
diff --git a/src/SDKs/Monitor/Monitor.Tests/Scenarios/TestBaseTests.cs b/src/SDKs/Monitor/Monitor.Tests/Scenarios/TestBaseTests.cs
index 4f98ce8395b6..40cfaa7a545d 100644
--- a/src/SDKs/Monitor/Monitor.Tests/Scenarios/TestBaseTests.cs
+++ b/src/SDKs/Monitor/Monitor.Tests/Scenarios/TestBaseTests.cs
@@ -6,8 +6,6 @@
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;
@@ -33,39 +31,6 @@ public TestBase()
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)
diff --git a/src/SDKs/Monitor/changelog.md b/src/SDKs/Monitor/changelog.md
index 3f6949245004..a62823850755 100644
--- a/src/SDKs/Monitor/changelog.md
+++ b/src/SDKs/Monitor/changelog.md
@@ -23,3 +23,10 @@
- The new Api version for the whole metrics API is 2017-05-01-preview. Before it was 2016-09-01 for metrics and 2016-03-01 for metric definitions.
- The calls can retrieve single-dimension metrics with the proper set of parameters. So the change is not completely a breaking change, but it would certainly require some adjustments in the calls.
+
+**Notes**
+
+- New receivers added to Actiongroup, swagger is already updated and this is version is like a base version now.
+- Going forward changes in Actiongroup will be done with change in version.
+- Added a patch action for Actiongroup.
+
diff --git a/src/SDKs/_metadata/monitor_data-plane.txt b/src/SDKs/_metadata/monitor_data-plane.txt
index 7b851bf4c8c0..57ab1b5a05bc 100644
--- a/src/SDKs/_metadata/monitor_data-plane.txt
+++ b/src/SDKs/_metadata/monitor_data-plane.txt
@@ -1,10 +1,11 @@
-2017-09-22 22:25:47 UTC
+2018-02-07 18:40:44 UTC
1) azure-rest-api-specs repository information
GitHub user: Azure
-Branch: current
-Commit: 772f496ee3a76238ae14ab84997f6aca45e5418b
+Branch: master
+Commit: 0ca5641ea0bbacfe14d240a871fb322fc8981194
2) AutoRest information
Requested version: latest
-Latest version: 1.2.2
+Bootstrapper version: C:\Users\shriku\AppData\Roaming\npm `-- autorest@2.0.4245
+Latest installed version:
diff --git a/src/SDKs/_metadata/monitor_resource-manager.txt b/src/SDKs/_metadata/monitor_resource-manager.txt
index 08dc99681442..abd6bfa1b7fa 100644
--- a/src/SDKs/_metadata/monitor_resource-manager.txt
+++ b/src/SDKs/_metadata/monitor_resource-manager.txt
@@ -1,10 +1,11 @@
-2017-09-22 22:24:37 UTC
+2018-02-07 18:40:28 UTC
1) azure-rest-api-specs repository information
GitHub user: Azure
-Branch: current
-Commit: 772f496ee3a76238ae14ab84997f6aca45e5418b
+Branch: master
+Commit: 0ca5641ea0bbacfe14d240a871fb322fc8981194
2) AutoRest information
Requested version: latest
-Latest version: 1.2.2
+Bootstrapper version: C:\Users\shriku\AppData\Roaming\npm `-- autorest@2.0.4245
+Latest installed version: