diff --git a/eng/mgmt/mgmtmetadata/datadog_resource-manager.txt b/eng/mgmt/mgmtmetadata/datadog_resource-manager.txt
new file mode 100644
index 0000000000000..257f0550fb77a
--- /dev/null
+++ b/eng/mgmt/mgmtmetadata/datadog_resource-manager.txt
@@ -0,0 +1,14 @@
+Installing AutoRest version: v2
+AutoRest installed successfully.
+Commencing code generation
+Generating CSharp code
+Executing AutoRest command
+cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/datadog/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\work\azure-sdk-for-net\sdk
+2020-10-09 01:08:52 UTC
+Azure-rest-api-specs repository information
+GitHub fork: Azure
+Branch: master
+Commit: 183db615e7e870d12668972c874897f095fe256c
+AutoRest information
+Requested version: v2
+Bootstrapper version: autorest@2.0.4413
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/AzSdk.RP.props b/sdk/datadog/Microsoft.Azure.Management.Datadog/AzSdk.RP.props
new file mode 100644
index 0000000000000..e76727bfc708c
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/AzSdk.RP.props
@@ -0,0 +1,7 @@
+
+
+
+ Datadog_2020-02-01-preview;
+ $(PackageTags);$(CommonTags);$(AzureApiTag);
+
+
\ No newline at end of file
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/Microsoft.Azure.Management.Datadog.sln b/sdk/datadog/Microsoft.Azure.Management.Datadog/Microsoft.Azure.Management.Datadog.sln
new file mode 100644
index 0000000000000..04caeaddb6401
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/Microsoft.Azure.Management.Datadog.sln
@@ -0,0 +1,28 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26228.4
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Datadog.Tests", "tests\Microsoft.Azure.Management.Datadog.Tests.csproj", "{CCDAE481-FF4A-4018-88EF-C3FE4AEB4C8B}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Datadog", "src\Microsoft.Azure.Management.Datadog.csproj", "{18EFDFC3-523F-4AA2-BD40-21CB366C83EF}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {CCDAE481-FF4A-4018-88EF-C3FE4AEB4C8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CCDAE481-FF4A-4018-88EF-C3FE4AEB4C8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CCDAE481-FF4A-4018-88EF-C3FE4AEB4C8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CCDAE481-FF4A-4018-88EF-C3FE4AEB4C8B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {18EFDFC3-523F-4AA2-BD40-21CB366C83EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {18EFDFC3-523F-4AA2-BD40-21CB366C83EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {18EFDFC3-523F-4AA2-BD40-21CB366C83EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {18EFDFC3-523F-4AA2-BD40-21CB366C83EF}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ApiKeysOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ApiKeysOperations.cs
new file mode 100644
index 0000000000000..769079fd90606
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ApiKeysOperations.cs
@@ -0,0 +1,808 @@
+//
+// 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.Datadog
+{
+ 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;
+
+ ///
+ /// ApiKeysOperations operations.
+ ///
+ internal partial class ApiKeysOperations : IServiceOperations, IApiKeysOperations
+ {
+ ///
+ /// Initializes a new instance of the ApiKeysOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal ApiKeysOperations(MicrosoftDatadogClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the MicrosoftDatadogClient
+ ///
+ public MicrosoftDatadogClient Client { get; private set; }
+
+ ///
+ /// List the api keys for a given monitor resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// 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 resourceGroupName, string monitorName, 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 (monitorName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "monitorName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("monitorName", monitorName);
+ 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("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listApiKeys").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ResourceProviderDefaultErrorResponse _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 the default api key.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// 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> GetDefaultKeyWithHttpMessagesAsync(string resourceGroupName, string monitorName, 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 (monitorName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "monitorName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("monitorName", monitorName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "GetDefaultKey", 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.Datadog/monitors/{monitorName}/getDefaultKey").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ResourceProviderDefaultErrorResponse _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;
+ }
+
+ ///
+ /// Set the default api key.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task SetDefaultKeyWithHttpMessagesAsync(string resourceGroupName, string monitorName, DatadogApiKey body = default(DatadogApiKey), 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 (monitorName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "monitorName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (body != null)
+ {
+ body.Validate();
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("monitorName", monitorName);
+ tracingParameters.Add("body", body);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "SetDefaultKey", 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.Datadog/monitors/{monitorName}/setDefaultKey").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ 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(body != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(body, 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 ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// List the api keys for a given monitor resource.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ApiKeysOperationsExtensions.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ApiKeysOperationsExtensions.cs
new file mode 100644
index 0000000000000..81015b2c1588c
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ApiKeysOperationsExtensions.cs
@@ -0,0 +1,180 @@
+//
+// 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.Datadog
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for ApiKeysOperations.
+ ///
+ public static partial class ApiKeysOperationsExtensions
+ {
+ ///
+ /// List the api keys for a given monitor resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ public static IPage List(this IApiKeysOperations operations, string resourceGroupName, string monitorName)
+ {
+ return operations.ListAsync(resourceGroupName, monitorName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List the api keys for a given monitor resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this IApiKeysOperations operations, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, monitorName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Get the default api key.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ public static DatadogApiKey GetDefaultKey(this IApiKeysOperations operations, string resourceGroupName, string monitorName)
+ {
+ return operations.GetDefaultKeyAsync(resourceGroupName, monitorName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Get the default api key.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetDefaultKeyAsync(this IApiKeysOperations operations, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetDefaultKeyWithHttpMessagesAsync(resourceGroupName, monitorName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Set the default api key.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ ///
+ public static void SetDefaultKey(this IApiKeysOperations operations, string resourceGroupName, string monitorName, DatadogApiKey body = default(DatadogApiKey))
+ {
+ operations.SetDefaultKeyAsync(resourceGroupName, monitorName, body).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Set the default api key.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task SetDefaultKeyAsync(this IApiKeysOperations operations, string resourceGroupName, string monitorName, DatadogApiKey body = default(DatadogApiKey), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.SetDefaultKeyWithHttpMessagesAsync(resourceGroupName, monitorName, body, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// List the api keys for a given monitor resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this IApiKeysOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List the api keys for a given monitor resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListNextAsync(this IApiKeysOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/HostsOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/HostsOperations.cs
new file mode 100644
index 0000000000000..ed1219877a563
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/HostsOperations.cs
@@ -0,0 +1,420 @@
+//
+// 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.Datadog
+{
+ 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;
+
+ ///
+ /// HostsOperations operations.
+ ///
+ internal partial class HostsOperations : IServiceOperations, IHostsOperations
+ {
+ ///
+ /// Initializes a new instance of the HostsOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal HostsOperations(MicrosoftDatadogClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the MicrosoftDatadogClient
+ ///
+ public MicrosoftDatadogClient Client { get; private set; }
+
+ ///
+ /// List the hosts for a given monitor resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// 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 resourceGroupName, string monitorName, 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 (monitorName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "monitorName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("monitorName", monitorName);
+ 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("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listHosts").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// List the hosts for a given monitor resource.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/HostsOperationsExtensions.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/HostsOperationsExtensions.cs
new file mode 100644
index 0000000000000..44029db154e8a
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/HostsOperationsExtensions.cs
@@ -0,0 +1,99 @@
+//
+// 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.Datadog
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for HostsOperations.
+ ///
+ public static partial class HostsOperationsExtensions
+ {
+ ///
+ /// List the hosts for a given monitor resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ public static IPage List(this IHostsOperations operations, string resourceGroupName, string monitorName)
+ {
+ return operations.ListAsync(resourceGroupName, monitorName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List the hosts for a given monitor resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this IHostsOperations operations, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, monitorName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// List the hosts for a given monitor resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this IHostsOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List the hosts for a given monitor resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListNextAsync(this IHostsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IApiKeysOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IApiKeysOperations.cs
new file mode 100644
index 0000000000000..f41c56a87efe0
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IApiKeysOperations.cs
@@ -0,0 +1,126 @@
+//
+// 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.Datadog
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// ApiKeysOperations operations.
+ ///
+ public partial interface IApiKeysOperations
+ {
+ ///
+ /// List the api keys for a given monitor resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource
+ /// belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get the default api key.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource
+ /// belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetDefaultKeyWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Set the default api key.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource
+ /// belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task SetDefaultKeyWithHttpMessagesAsync(string resourceGroupName, string monitorName, DatadogApiKey body = default(DatadogApiKey), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List the api keys for a given monitor resource.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IHostsOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IHostsOperations.cs
new file mode 100644
index 0000000000000..c715ef29b2e45
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IHostsOperations.cs
@@ -0,0 +1,75 @@
+//
+// 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.Datadog
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// HostsOperations operations.
+ ///
+ public partial interface IHostsOperations
+ {
+ ///
+ /// List the hosts for a given monitor resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource
+ /// belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List the hosts for a given monitor resource.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ILinkedResourcesOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ILinkedResourcesOperations.cs
new file mode 100644
index 0000000000000..4db15d26a5c1c
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ILinkedResourcesOperations.cs
@@ -0,0 +1,77 @@
+//
+// 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.Datadog
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// LinkedResourcesOperations operations.
+ ///
+ public partial interface ILinkedResourcesOperations
+ {
+ ///
+ /// List all Azure resources associated to the same Datadog
+ /// organization as the target resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource
+ /// belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List all Azure resources associated to the same Datadog
+ /// organization as the target resource.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMicrosoftDatadogClient.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMicrosoftDatadogClient.cs
new file mode 100644
index 0000000000000..c545fa3335702
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMicrosoftDatadogClient.cs
@@ -0,0 +1,117 @@
+//
+// 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.Datadog
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+
+ ///
+ ///
+ public partial interface IMicrosoftDatadogClient : 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 Microsoft Azure subscription ID.
+ ///
+ string SubscriptionId { get; set; }
+
+ ///
+ /// The API version to use for this operation.
+ ///
+ string ApiVersion { get; }
+
+ ///
+ /// The preferred language for the response.
+ ///
+ string AcceptLanguage { get; set; }
+
+ ///
+ /// The retry timeout in seconds for Long Running Operations. Default
+ /// value is 30.
+ ///
+ int? LongRunningOperationRetryTimeout { get; set; }
+
+ ///
+ /// Whether a unique x-ms-client-request-id should be generated. When
+ /// set to true a unique x-ms-client-request-id value is generated and
+ /// included in each request. Default is true.
+ ///
+ bool? GenerateClientRequestId { get; set; }
+
+
+ ///
+ /// Gets the IApiKeysOperations.
+ ///
+ IApiKeysOperations ApiKeys { get; }
+
+ ///
+ /// Gets the IHostsOperations.
+ ///
+ IHostsOperations Hosts { get; }
+
+ ///
+ /// Gets the ILinkedResourcesOperations.
+ ///
+ ILinkedResourcesOperations LinkedResources { get; }
+
+ ///
+ /// Gets the IMonitoredResourcesOperations.
+ ///
+ IMonitoredResourcesOperations MonitoredResources { get; }
+
+ ///
+ /// Gets the IOperations.
+ ///
+ IOperations Operations { get; }
+
+ ///
+ /// Gets the IMonitorsOperations.
+ ///
+ IMonitorsOperations Monitors { get; }
+
+ ///
+ /// Gets the IRefreshSetPasswordOperations.
+ ///
+ IRefreshSetPasswordOperations RefreshSetPassword { get; }
+
+ ///
+ /// Gets the ITagRulesOperations.
+ ///
+ ITagRulesOperations TagRules { get; }
+
+ ///
+ /// Gets the ISingleSignOnConfigurationsOperations.
+ ///
+ ISingleSignOnConfigurationsOperations SingleSignOnConfigurations { get; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMonitoredResourcesOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMonitoredResourcesOperations.cs
new file mode 100644
index 0000000000000..1f10b2a0bc604
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMonitoredResourcesOperations.cs
@@ -0,0 +1,77 @@
+//
+// 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.Datadog
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// MonitoredResourcesOperations operations.
+ ///
+ public partial interface IMonitoredResourcesOperations
+ {
+ ///
+ /// List the resources currently being monitored by the Datadog monitor
+ /// resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource
+ /// belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List the resources currently being monitored by the Datadog monitor
+ /// resource.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMonitorsOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMonitorsOperations.cs
new file mode 100644
index 0000000000000..5b573323c75ed
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMonitorsOperations.cs
@@ -0,0 +1,269 @@
+//
+// 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.Datadog
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// MonitorsOperations operations.
+ ///
+ public partial interface IMonitorsOperations
+ {
+ ///
+ /// List all monitors under the specified subscription.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List all monitors under the specified resource group.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource
+ /// belongs.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get the properties of a specific monitor resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource
+ /// belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create a monitor resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource
+ /// belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CreateWithHttpMessagesAsync(string resourceGroupName, string monitorName, DatadogMonitorResource body = default(DatadogMonitorResource), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Update a monitor resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource
+ /// belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string monitorName, DatadogMonitorResourceUpdateParameters body = default(DatadogMonitorResourceUpdateParameters), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete a monitor resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource
+ /// belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task DeleteWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create a monitor resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource
+ /// belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string monitorName, DatadogMonitorResource body = default(DatadogMonitorResource), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete a monitor resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource
+ /// belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List all monitors under the specified subscription.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List all monitors under the specified resource group.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IOperations.cs
new file mode 100644
index 0000000000000..e5846ca36703a
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IOperations.cs
@@ -0,0 +1,70 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Datadog
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Operations operations.
+ ///
+ public partial interface IOperations
+ {
+ ///
+ /// List all operations provided by Microsoft.Datadog for the
+ /// 2020-02-01-preview api version.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List all operations provided by Microsoft.Datadog for the
+ /// 2020-02-01-preview api version.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IRefreshSetPasswordOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IRefreshSetPasswordOperations.cs
new file mode 100644
index 0000000000000..c95070e8df9bc
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IRefreshSetPasswordOperations.cs
@@ -0,0 +1,53 @@
+//
+// 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.Datadog
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// RefreshSetPasswordOperations operations.
+ ///
+ public partial interface IRefreshSetPasswordOperations
+ {
+ ///
+ /// Refresh the set password link and return a latest one.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource
+ /// belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ISingleSignOnConfigurationsOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ISingleSignOnConfigurationsOperations.cs
new file mode 100644
index 0000000000000..176d2bc8cd65e
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ISingleSignOnConfigurationsOperations.cs
@@ -0,0 +1,165 @@
+//
+// 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.Datadog
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// SingleSignOnConfigurationsOperations operations.
+ ///
+ public partial interface ISingleSignOnConfigurationsOperations
+ {
+ ///
+ /// List the single sign-on configurations for a given monitor
+ /// resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource
+ /// belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Configures single-sign-on for this resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource
+ /// belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string monitorName, string configurationName, DatadogSingleSignOnProperties properties = default(DatadogSingleSignOnProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets the datadog single sign-on resource for the given Monitor.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource
+ /// belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string monitorName, string configurationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Configures single-sign-on for this resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource
+ /// belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string monitorName, string configurationName, DatadogSingleSignOnProperties properties = default(DatadogSingleSignOnProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List the single sign-on configurations for a given monitor
+ /// resource.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ITagRulesOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ITagRulesOperations.cs
new file mode 100644
index 0000000000000..0befb5e6db1d7
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ITagRulesOperations.cs
@@ -0,0 +1,133 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Datadog
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// TagRulesOperations operations.
+ ///
+ public partial interface ITagRulesOperations
+ {
+ ///
+ /// List the tag rules for a given monitor resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource
+ /// belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create or update a tag rule set for a given monitor resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource
+ /// belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string monitorName, string ruleSetName, MonitoringTagRulesProperties properties = default(MonitoringTagRulesProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get a tag rule set for a given monitor resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource
+ /// belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(string resourceGroupName, string monitorName, string ruleSetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List the tag rules for a given monitor resource.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/LinkedResourcesOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/LinkedResourcesOperations.cs
new file mode 100644
index 0000000000000..895cfe9333317
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/LinkedResourcesOperations.cs
@@ -0,0 +1,422 @@
+//
+// 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.Datadog
+{
+ 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;
+
+ ///
+ /// LinkedResourcesOperations operations.
+ ///
+ internal partial class LinkedResourcesOperations : IServiceOperations, ILinkedResourcesOperations
+ {
+ ///
+ /// Initializes a new instance of the LinkedResourcesOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal LinkedResourcesOperations(MicrosoftDatadogClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the MicrosoftDatadogClient
+ ///
+ public MicrosoftDatadogClient Client { get; private set; }
+
+ ///
+ /// List all Azure resources associated to the same Datadog organization as the
+ /// target resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// 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 resourceGroupName, string monitorName, 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 (monitorName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "monitorName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("monitorName", monitorName);
+ 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("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listLinkedResources").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// List all Azure resources associated to the same Datadog organization as the
+ /// target resource.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/LinkedResourcesOperationsExtensions.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/LinkedResourcesOperationsExtensions.cs
new file mode 100644
index 0000000000000..befe4e89caefe
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/LinkedResourcesOperationsExtensions.cs
@@ -0,0 +1,103 @@
+//
+// 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.Datadog
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for LinkedResourcesOperations.
+ ///
+ public static partial class LinkedResourcesOperationsExtensions
+ {
+ ///
+ /// List all Azure resources associated to the same Datadog organization as the
+ /// target resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ public static IPage List(this ILinkedResourcesOperations operations, string resourceGroupName, string monitorName)
+ {
+ return operations.ListAsync(resourceGroupName, monitorName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List all Azure resources associated to the same Datadog organization as the
+ /// target resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this ILinkedResourcesOperations operations, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, monitorName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// List all Azure resources associated to the same Datadog organization as the
+ /// target resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this ILinkedResourcesOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List all Azure resources associated to the same Datadog organization as the
+ /// target resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListNextAsync(this ILinkedResourcesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MicrosoftDatadogClient.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MicrosoftDatadogClient.cs
new file mode 100644
index 0000000000000..bbbac3388bcd5
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MicrosoftDatadogClient.cs
@@ -0,0 +1,403 @@
+//
+// 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.Datadog
+{
+ 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;
+
+ public partial class MicrosoftDatadogClient : ServiceClient, IMicrosoftDatadogClient, 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 Microsoft Azure subscription ID.
+ ///
+ public string SubscriptionId { get; set; }
+
+ ///
+ /// The API version to use for this operation.
+ ///
+ public string ApiVersion { get; private set; }
+
+ ///
+ /// The preferred language for the response.
+ ///
+ public string AcceptLanguage { get; set; }
+
+ ///
+ /// The retry timeout in seconds for Long Running Operations. Default value is
+ /// 30.
+ ///
+ public int? LongRunningOperationRetryTimeout { get; set; }
+
+ ///
+ /// Whether a unique x-ms-client-request-id should be generated. When set to
+ /// true a unique x-ms-client-request-id value is generated and included in
+ /// each request. Default is true.
+ ///
+ public bool? GenerateClientRequestId { get; set; }
+
+ ///
+ /// Gets the IApiKeysOperations.
+ ///
+ public virtual IApiKeysOperations ApiKeys { get; private set; }
+
+ ///
+ /// Gets the IHostsOperations.
+ ///
+ public virtual IHostsOperations Hosts { get; private set; }
+
+ ///
+ /// Gets the ILinkedResourcesOperations.
+ ///
+ public virtual ILinkedResourcesOperations LinkedResources { get; private set; }
+
+ ///
+ /// Gets the IMonitoredResourcesOperations.
+ ///
+ public virtual IMonitoredResourcesOperations MonitoredResources { get; private set; }
+
+ ///
+ /// Gets the IOperations.
+ ///
+ public virtual IOperations Operations { get; private set; }
+
+ ///
+ /// Gets the IMonitorsOperations.
+ ///
+ public virtual IMonitorsOperations Monitors { get; private set; }
+
+ ///
+ /// Gets the IRefreshSetPasswordOperations.
+ ///
+ public virtual IRefreshSetPasswordOperations RefreshSetPassword { get; private set; }
+
+ ///
+ /// Gets the ITagRulesOperations.
+ ///
+ public virtual ITagRulesOperations TagRules { get; private set; }
+
+ ///
+ /// Gets the ISingleSignOnConfigurationsOperations.
+ ///
+ public virtual ISingleSignOnConfigurationsOperations SingleSignOnConfigurations { get; private set; }
+
+ ///
+ /// Initializes a new instance of the MicrosoftDatadogClient class.
+ ///
+ ///
+ /// HttpClient to be used
+ ///
+ ///
+ /// True: will dispose the provided httpClient on calling MicrosoftDatadogClient.Dispose(). False: will not dispose provided httpClient
+ protected MicrosoftDatadogClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)
+ {
+ Initialize();
+ }
+
+ ///
+ /// Initializes a new instance of the MicrosoftDatadogClient class.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ protected MicrosoftDatadogClient(params DelegatingHandler[] handlers) : base(handlers)
+ {
+ Initialize();
+ }
+
+ ///
+ /// Initializes a new instance of the MicrosoftDatadogClient class.
+ ///
+ ///
+ /// Optional. The http client handler used to handle http transport.
+ ///
+ ///
+ /// Optional. The delegating handlers to add to the http client pipeline.
+ ///
+ protected MicrosoftDatadogClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers)
+ {
+ Initialize();
+ }
+
+ ///
+ /// Initializes a new instance of the MicrosoftDatadogClient 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 MicrosoftDatadogClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)
+ {
+ if (baseUri == null)
+ {
+ throw new System.ArgumentNullException("baseUri");
+ }
+ BaseUri = baseUri;
+ }
+
+ ///
+ /// Initializes a new instance of the MicrosoftDatadogClient 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 MicrosoftDatadogClient(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 MicrosoftDatadogClient 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 MicrosoftDatadogClient(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 MicrosoftDatadogClient class.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// HttpClient to be used
+ ///
+ ///
+ /// True: will dispose the provided httpClient on calling MicrosoftDatadogClient.Dispose(). False: will not dispose provided httpClient
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public MicrosoftDatadogClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
+ ///
+ /// Initializes a new instance of the MicrosoftDatadogClient 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 MicrosoftDatadogClient(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 MicrosoftDatadogClient 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 MicrosoftDatadogClient(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 MicrosoftDatadogClient 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 MicrosoftDatadogClient(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()
+ {
+ ApiKeys = new ApiKeysOperations(this);
+ Hosts = new HostsOperations(this);
+ LinkedResources = new LinkedResourcesOperations(this);
+ MonitoredResources = new MonitoredResourcesOperations(this);
+ Operations = new Operations(this);
+ Monitors = new MonitorsOperations(this);
+ RefreshSetPassword = new RefreshSetPasswordOperations(this);
+ TagRules = new TagRulesOperations(this);
+ SingleSignOnConfigurations = new SingleSignOnConfigurationsOperations(this);
+ BaseUri = new System.Uri("https://management.azure.com");
+ ApiVersion = "2020-02-01-preview";
+ 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/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogApiKey.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogApiKey.cs
new file mode 100644
index 0000000000000..05c6ca54d6072
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogApiKey.cs
@@ -0,0 +1,86 @@
+//
+// 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.Datadog.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class DatadogApiKey
+ {
+ ///
+ /// Initializes a new instance of the DatadogApiKey class.
+ ///
+ public DatadogApiKey()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DatadogApiKey class.
+ ///
+ /// The value of the API key.
+ /// The user that created the API key.
+ /// The name of the API key.
+ /// The time of creation of the API key.
+ public DatadogApiKey(string key, string createdBy = default(string), string name = default(string), string created = default(string))
+ {
+ CreatedBy = createdBy;
+ Name = name;
+ Key = key;
+ Created = created;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the user that created the API key.
+ ///
+ [JsonProperty(PropertyName = "createdBy")]
+ public string CreatedBy { get; set; }
+
+ ///
+ /// Gets or sets the name of the API key.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets the value of the API key.
+ ///
+ [JsonProperty(PropertyName = "key")]
+ public string Key { get; set; }
+
+ ///
+ /// Gets or sets the time of creation of the API key.
+ ///
+ [JsonProperty(PropertyName = "created")]
+ public string Created { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Key == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Key");
+ }
+ }
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogHost.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogHost.cs
new file mode 100644
index 0000000000000..b21a035e64557
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogHost.cs
@@ -0,0 +1,74 @@
+//
+// 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.Datadog.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ public partial class DatadogHost
+ {
+ ///
+ /// Initializes a new instance of the DatadogHost class.
+ ///
+ public DatadogHost()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DatadogHost class.
+ ///
+ /// The name of the host.
+ /// The aliases for the host.
+ /// The Datadog integrations reporting metrics for
+ /// the host.
+ public DatadogHost(string name = default(string), IList aliases = default(IList), IList apps = default(IList), DatadogHostMetadata meta = default(DatadogHostMetadata))
+ {
+ Name = name;
+ Aliases = aliases;
+ Apps = apps;
+ Meta = meta;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the name of the host.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets the aliases for the host.
+ ///
+ [JsonProperty(PropertyName = "aliases")]
+ public IList Aliases { get; set; }
+
+ ///
+ /// Gets or sets the Datadog integrations reporting metrics for the
+ /// host.
+ ///
+ [JsonProperty(PropertyName = "apps")]
+ public IList Apps { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "meta")]
+ public DatadogHostMetadata Meta { get; set; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogHostMetadata.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogHostMetadata.cs
new file mode 100644
index 0000000000000..803143063431b
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogHostMetadata.cs
@@ -0,0 +1,60 @@
+//
+// 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.Datadog.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class DatadogHostMetadata
+ {
+ ///
+ /// Initializes a new instance of the DatadogHostMetadata class.
+ ///
+ public DatadogHostMetadata()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DatadogHostMetadata class.
+ ///
+ /// The agent version.
+ public DatadogHostMetadata(string agentVersion = default(string), DatadogInstallMethod installMethod = default(DatadogInstallMethod), DatadogLogsAgent logsAgent = default(DatadogLogsAgent))
+ {
+ AgentVersion = agentVersion;
+ InstallMethod = installMethod;
+ LogsAgent = logsAgent;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the agent version.
+ ///
+ [JsonProperty(PropertyName = "agentVersion")]
+ public string AgentVersion { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "installMethod")]
+ public DatadogInstallMethod InstallMethod { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "logsAgent")]
+ public DatadogLogsAgent LogsAgent { get; set; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogInstallMethod.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogInstallMethod.cs
new file mode 100644
index 0000000000000..15d8d90821cd6
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogInstallMethod.cs
@@ -0,0 +1,64 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Datadog.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class DatadogInstallMethod
+ {
+ ///
+ /// Initializes a new instance of the DatadogInstallMethod class.
+ ///
+ public DatadogInstallMethod()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DatadogInstallMethod class.
+ ///
+ /// The tool.
+ /// The tool version.
+ /// The installer version.
+ public DatadogInstallMethod(string tool = default(string), string toolVersion = default(string), string installerVersion = default(string))
+ {
+ Tool = tool;
+ ToolVersion = toolVersion;
+ InstallerVersion = installerVersion;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the tool.
+ ///
+ [JsonProperty(PropertyName = "tool")]
+ public string Tool { get; set; }
+
+ ///
+ /// Gets or sets the tool version.
+ ///
+ [JsonProperty(PropertyName = "toolVersion")]
+ public string ToolVersion { get; set; }
+
+ ///
+ /// Gets or sets the installer version.
+ ///
+ [JsonProperty(PropertyName = "installerVersion")]
+ public string InstallerVersion { get; set; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogLogsAgent.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogLogsAgent.cs
new file mode 100644
index 0000000000000..73e14d1f319c3
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogLogsAgent.cs
@@ -0,0 +1,48 @@
+//
+// 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.Datadog.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class DatadogLogsAgent
+ {
+ ///
+ /// Initializes a new instance of the DatadogLogsAgent class.
+ ///
+ public DatadogLogsAgent()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DatadogLogsAgent class.
+ ///
+ /// The transport.
+ public DatadogLogsAgent(string transport = default(string))
+ {
+ Transport = transport;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the transport.
+ ///
+ [JsonProperty(PropertyName = "transport")]
+ public string Transport { get; set; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogMonitorResource.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogMonitorResource.cs
new file mode 100644
index 0000000000000..d779b00507b45
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogMonitorResource.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.Datadog.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ public partial class DatadogMonitorResource : IResource
+ {
+ ///
+ /// Initializes a new instance of the DatadogMonitorResource class.
+ ///
+ public DatadogMonitorResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DatadogMonitorResource class.
+ ///
+ /// ARM id of the monitor resource.
+ /// Name of the monitor resource.
+ /// The type of the monitor resource.
+ public DatadogMonitorResource(string location, string id = default(string), string name = default(string), string type = default(string), ResourceSku sku = default(ResourceSku), MonitorProperties properties = default(MonitorProperties), IdentityProperties identity = default(IdentityProperties), IDictionary tags = default(IDictionary))
+ {
+ Id = id;
+ Name = name;
+ Type = type;
+ Sku = sku;
+ Properties = properties;
+ Identity = identity;
+ Tags = tags;
+ Location = location;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets ARM id of the monitor resource.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ ///
+ /// Gets name of the monitor resource.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets the type of the monitor resource.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "sku")]
+ public ResourceSku Sku { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public MonitorProperties Properties { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "identity")]
+ public IdentityProperties Identity { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "location")]
+ public string Location { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Location == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Location");
+ }
+ if (Sku != null)
+ {
+ Sku.Validate();
+ }
+ if (Properties != null)
+ {
+ Properties.Validate();
+ }
+ }
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogMonitorResourceUpdateParameters.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogMonitorResourceUpdateParameters.cs
new file mode 100644
index 0000000000000..cccfd4d63c7ae
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogMonitorResourceUpdateParameters.cs
@@ -0,0 +1,61 @@
+//
+// 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.Datadog.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The parameters for a PATCH request to a monitor resource.
+ ///
+ public partial class DatadogMonitorResourceUpdateParameters
+ {
+ ///
+ /// Initializes a new instance of the
+ /// DatadogMonitorResourceUpdateParameters class.
+ ///
+ public DatadogMonitorResourceUpdateParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// DatadogMonitorResourceUpdateParameters class.
+ ///
+ /// The new tags of the monitor resource.
+ public DatadogMonitorResourceUpdateParameters(MonitorUpdateProperties properties = default(MonitorUpdateProperties), IDictionary tags = default(IDictionary))
+ {
+ Properties = properties;
+ Tags = tags;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public MonitorUpdateProperties Properties { get; set; }
+
+ ///
+ /// Gets or sets the new tags of the monitor resource.
+ ///
+ [JsonProperty(PropertyName = "tags")]
+ public IDictionary Tags { get; set; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogOrganizationProperties.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogOrganizationProperties.cs
new file mode 100644
index 0000000000000..461996f98473d
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogOrganizationProperties.cs
@@ -0,0 +1,87 @@
+//
+// 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.Datadog.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class DatadogOrganizationProperties
+ {
+ ///
+ /// Initializes a new instance of the DatadogOrganizationProperties
+ /// class.
+ ///
+ public DatadogOrganizationProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DatadogOrganizationProperties
+ /// class.
+ ///
+ /// Name of the Datadog organization.
+ /// Id of the Datadog organization.
+ /// The auth code used to linking to an
+ /// existing datadog organization.
+ /// The client_id from an existing in
+ /// exchange for an auth token to link organization.
+ /// The Id of the Enterprise App used for
+ /// Single sign on.
+ public DatadogOrganizationProperties(string name = default(string), string id = default(string), string linkingAuthCode = default(string), string linkingClientId = default(string), string enterpriseAppId = default(string))
+ {
+ Name = name;
+ Id = id;
+ LinkingAuthCode = linkingAuthCode;
+ LinkingClientId = linkingClientId;
+ EnterpriseAppId = enterpriseAppId;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets name of the Datadog organization.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets id of the Datadog organization.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ ///
+ /// Gets or sets the auth code used to linking to an existing datadog
+ /// organization.
+ ///
+ [JsonProperty(PropertyName = "linkingAuthCode")]
+ public string LinkingAuthCode { get; set; }
+
+ ///
+ /// Gets or sets the client_id from an existing in exchange for an auth
+ /// token to link organization.
+ ///
+ [JsonProperty(PropertyName = "linkingClientId")]
+ public string LinkingClientId { get; set; }
+
+ ///
+ /// Gets or sets the Id of the Enterprise App used for Single sign on.
+ ///
+ [JsonProperty(PropertyName = "enterpriseAppId")]
+ public string EnterpriseAppId { get; set; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogSetPasswordLink.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogSetPasswordLink.cs
new file mode 100644
index 0000000000000..901692f7f040c
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogSetPasswordLink.cs
@@ -0,0 +1,46 @@
+//
+// 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.Datadog.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class DatadogSetPasswordLink
+ {
+ ///
+ /// Initializes a new instance of the DatadogSetPasswordLink class.
+ ///
+ public DatadogSetPasswordLink()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DatadogSetPasswordLink class.
+ ///
+ public DatadogSetPasswordLink(string setPasswordLink = default(string))
+ {
+ SetPasswordLink = setPasswordLink;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "setPasswordLink")]
+ public string SetPasswordLink { get; set; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogSingleSignOnProperties.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogSingleSignOnProperties.cs
new file mode 100644
index 0000000000000..d61ed71857eae
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogSingleSignOnProperties.cs
@@ -0,0 +1,70 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Datadog.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class DatadogSingleSignOnProperties
+ {
+ ///
+ /// Initializes a new instance of the DatadogSingleSignOnProperties
+ /// class.
+ ///
+ public DatadogSingleSignOnProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DatadogSingleSignOnProperties
+ /// class.
+ ///
+ /// Possible values include: 'Initial',
+ /// 'Enable', 'Disable', 'Existing'
+ /// The Id of the Enterprise App used for
+ /// Single sign-on.
+ /// The login URL specific to this
+ /// Datadog Organization.
+ public DatadogSingleSignOnProperties(string singleSignOnState = default(string), string enterpriseAppId = default(string), string singleSignOnUrl = default(string))
+ {
+ SingleSignOnState = singleSignOnState;
+ EnterpriseAppId = enterpriseAppId;
+ SingleSignOnUrl = singleSignOnUrl;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets possible values include: 'Initial', 'Enable',
+ /// 'Disable', 'Existing'
+ ///
+ [JsonProperty(PropertyName = "singleSignOnState")]
+ public string SingleSignOnState { get; set; }
+
+ ///
+ /// Gets or sets the Id of the Enterprise App used for Single sign-on.
+ ///
+ [JsonProperty(PropertyName = "enterpriseAppId")]
+ public string EnterpriseAppId { get; set; }
+
+ ///
+ /// Gets or sets the login URL specific to this Datadog Organization.
+ ///
+ [JsonProperty(PropertyName = "singleSignOnUrl")]
+ public string SingleSignOnUrl { get; set; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogSingleSignOnResource.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogSingleSignOnResource.cs
new file mode 100644
index 0000000000000..f18d9af0b5d69
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogSingleSignOnResource.cs
@@ -0,0 +1,74 @@
+//
+// 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.Datadog.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class DatadogSingleSignOnResource : IResource
+ {
+ ///
+ /// Initializes a new instance of the DatadogSingleSignOnResource
+ /// class.
+ ///
+ public DatadogSingleSignOnResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DatadogSingleSignOnResource
+ /// class.
+ ///
+ /// ARM id of the resource.
+ /// Name of the configuration.
+ /// The type of the resource.
+ public DatadogSingleSignOnResource(string id = default(string), string name = default(string), string type = default(string), DatadogSingleSignOnProperties properties = default(DatadogSingleSignOnProperties))
+ {
+ Id = id;
+ Name = name;
+ Type = type;
+ Properties = properties;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets ARM id of the resource.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ ///
+ /// Gets name of the configuration.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets the type of the resource.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public DatadogSingleSignOnProperties Properties { get; set; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ErrorResponseBody.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ErrorResponseBody.cs
new file mode 100644
index 0000000000000..6bc9344ead5d9
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ErrorResponseBody.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.Datadog.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ public partial class ErrorResponseBody
+ {
+ ///
+ /// Initializes a new instance of the ErrorResponseBody class.
+ ///
+ public ErrorResponseBody()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseBody class.
+ ///
+ public ErrorResponseBody(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList))
+ {
+ Code = code;
+ Message = message;
+ Target = target;
+ Details = details;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "code")]
+ public string Code { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "target")]
+ public string Target { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "details")]
+ public IList Details { get; set; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/FilteringTag.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/FilteringTag.cs
new file mode 100644
index 0000000000000..c114f88cbbcab
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/FilteringTag.cs
@@ -0,0 +1,70 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Datadog.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The definition of a filtering tag. Filtering tags are used for
+ /// capturing resources and include/exclude them from being monitored.
+ ///
+ public partial class FilteringTag
+ {
+ ///
+ /// Initializes a new instance of the FilteringTag class.
+ ///
+ public FilteringTag()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the FilteringTag class.
+ ///
+ /// The name (also known as the key) of the
+ /// tag.
+ /// The value of the tag.
+ /// Possible values include: 'Include',
+ /// 'Exclude'
+ public FilteringTag(string name = default(string), string value = default(string), string action = default(string))
+ {
+ Name = name;
+ Value = value;
+ Action = action;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the name (also known as the key) of the tag.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets the value of the tag.
+ ///
+ [JsonProperty(PropertyName = "value")]
+ public string Value { get; set; }
+
+ ///
+ /// Gets or sets possible values include: 'Include', 'Exclude'
+ ///
+ [JsonProperty(PropertyName = "action")]
+ public string Action { get; set; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/IdentityProperties.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/IdentityProperties.cs
new file mode 100644
index 0000000000000..649e00dfcdad7
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/IdentityProperties.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.Datadog.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class IdentityProperties
+ {
+ ///
+ /// Initializes a new instance of the IdentityProperties class.
+ ///
+ public IdentityProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the IdentityProperties class.
+ ///
+ /// The identity ID.
+ /// The tenant ID of resource.
+ /// Possible values include: 'SystemAssigned',
+ /// 'UserAssigned'
+ public IdentityProperties(string principalId = default(string), string tenantId = default(string), string type = default(string))
+ {
+ PrincipalId = principalId;
+ TenantId = tenantId;
+ Type = type;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the identity ID.
+ ///
+ [JsonProperty(PropertyName = "principalId")]
+ public string PrincipalId { get; private set; }
+
+ ///
+ /// Gets the tenant ID of resource.
+ ///
+ [JsonProperty(PropertyName = "tenantId")]
+ public string TenantId { get; private set; }
+
+ ///
+ /// Gets or sets possible values include: 'SystemAssigned',
+ /// 'UserAssigned'
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; set; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/LiftrResourceCategories.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/LiftrResourceCategories.cs
new file mode 100644
index 0000000000000..1ffbd9a0fd60f
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/LiftrResourceCategories.cs
@@ -0,0 +1,22 @@
+//
+// 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.Datadog.Models
+{
+
+ ///
+ /// Defines values for LiftrResourceCategories.
+ ///
+ public static class LiftrResourceCategories
+ {
+ public const string Unknown = "Unknown";
+ public const string MonitorLogs = "MonitorLogs";
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/LinkedResource.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/LinkedResource.cs
new file mode 100644
index 0000000000000..3463829a55ee5
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/LinkedResource.cs
@@ -0,0 +1,51 @@
+//
+// 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.Datadog.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The definition of a linked resource.
+ ///
+ public partial class LinkedResource
+ {
+ ///
+ /// Initializes a new instance of the LinkedResource class.
+ ///
+ public LinkedResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the LinkedResource class.
+ ///
+ /// The ARM id of the linked resource.
+ public LinkedResource(string id = default(string))
+ {
+ Id = id;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the ARM id of the linked resource.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; set; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/LogRules.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/LogRules.cs
new file mode 100644
index 0000000000000..6eff70a787a96
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/LogRules.cs
@@ -0,0 +1,93 @@
+//
+// 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.Datadog.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Set of rules for sending logs for the Monitor resource.
+ ///
+ public partial class LogRules
+ {
+ ///
+ /// Initializes a new instance of the LogRules class.
+ ///
+ public LogRules()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the LogRules class.
+ ///
+ /// Flag specifying if AAD logs should be
+ /// sent for the Monitor resource.
+ /// Flag specifying if Azure
+ /// subscription logs should be sent for the Monitor resource.
+ /// Flag specifying if Azure resource
+ /// logs should be sent for the Monitor resource.
+ /// List of filtering tags to be used for
+ /// capturing logs. This only takes effect if SendResourceLogs flag is
+ /// enabled. If empty, all resources will be captured. If only Exclude
+ /// action is specified, the rules will apply to the list of all
+ /// available resources. If Include actions are specified, the rules
+ /// will only include resources with the associated tags.
+ public LogRules(bool? sendAadLogs = default(bool?), bool? sendSubscriptionLogs = default(bool?), bool? sendResourceLogs = default(bool?), IList filteringTags = default(IList))
+ {
+ SendAadLogs = sendAadLogs;
+ SendSubscriptionLogs = sendSubscriptionLogs;
+ SendResourceLogs = sendResourceLogs;
+ FilteringTags = filteringTags;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets flag specifying if AAD logs should be sent for the
+ /// Monitor resource.
+ ///
+ [JsonProperty(PropertyName = "sendAadLogs")]
+ public bool? SendAadLogs { get; set; }
+
+ ///
+ /// Gets or sets flag specifying if Azure subscription logs should be
+ /// sent for the Monitor resource.
+ ///
+ [JsonProperty(PropertyName = "sendSubscriptionLogs")]
+ public bool? SendSubscriptionLogs { get; set; }
+
+ ///
+ /// Gets or sets flag specifying if Azure resource logs should be sent
+ /// for the Monitor resource.
+ ///
+ [JsonProperty(PropertyName = "sendResourceLogs")]
+ public bool? SendResourceLogs { get; set; }
+
+ ///
+ /// Gets or sets list of filtering tags to be used for capturing logs.
+ /// This only takes effect if SendResourceLogs flag is enabled. If
+ /// empty, all resources will be captured. If only Exclude action is
+ /// specified, the rules will apply to the list of all available
+ /// resources. If Include actions are specified, the rules will only
+ /// include resources with the associated tags.
+ ///
+ [JsonProperty(PropertyName = "filteringTags")]
+ public IList FilteringTags { get; set; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ManagedIdentityTypes.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ManagedIdentityTypes.cs
new file mode 100644
index 0000000000000..e6626ef4c6b69
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ManagedIdentityTypes.cs
@@ -0,0 +1,22 @@
+//
+// 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.Datadog.Models
+{
+
+ ///
+ /// Defines values for ManagedIdentityTypes.
+ ///
+ public static class ManagedIdentityTypes
+ {
+ public const string SystemAssigned = "SystemAssigned";
+ public const string UserAssigned = "UserAssigned";
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MarketplaceSubscriptionStatus.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MarketplaceSubscriptionStatus.cs
new file mode 100644
index 0000000000000..7ca947d6e37a8
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MarketplaceSubscriptionStatus.cs
@@ -0,0 +1,22 @@
+//
+// 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.Datadog.Models
+{
+
+ ///
+ /// Defines values for MarketplaceSubscriptionStatus.
+ ///
+ public static class MarketplaceSubscriptionStatus
+ {
+ public const string Active = "Active";
+ public const string Suspended = "Suspended";
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MetricRules.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MetricRules.cs
new file mode 100644
index 0000000000000..32b90a585d5ec
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MetricRules.cs
@@ -0,0 +1,61 @@
+//
+// 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.Datadog.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Set of rules for sending metrics for the Monitor resource.
+ ///
+ public partial class MetricRules
+ {
+ ///
+ /// Initializes a new instance of the MetricRules class.
+ ///
+ public MetricRules()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the MetricRules class.
+ ///
+ /// List of filtering tags to be used for
+ /// capturing metrics. If empty, all resources will be captured. If
+ /// only Exclude action is specified, the rules will apply to the list
+ /// of all available resources. If Include actions are specified, the
+ /// rules will only include resources with the associated tags.
+ public MetricRules(IList filteringTags = default(IList))
+ {
+ FilteringTags = filteringTags;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets list of filtering tags to be used for capturing
+ /// metrics. If empty, all resources will be captured. If only Exclude
+ /// action is specified, the rules will apply to the list of all
+ /// available resources. If Include actions are specified, the rules
+ /// will only include resources with the associated tags.
+ ///
+ [JsonProperty(PropertyName = "filteringTags")]
+ public IList FilteringTags { get; set; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitorProperties.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitorProperties.cs
new file mode 100644
index 0000000000000..7f124a490d6b2
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitorProperties.cs
@@ -0,0 +1,116 @@
+//
+// 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.Datadog.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Properties specific to the monitor resource.
+ ///
+ public partial class MonitorProperties
+ {
+ ///
+ /// Initializes a new instance of the MonitorProperties class.
+ ///
+ public MonitorProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the MonitorProperties class.
+ ///
+ /// Possible values include:
+ /// 'Accepted', 'Creating', 'Updating', 'Deleting', 'Succeeded',
+ /// 'Failed', 'Canceled', 'Deleted', 'NotSpecified'
+ /// Possible values include: 'Enabled',
+ /// 'Disabled'
+ /// Possible values
+ /// include: 'Active', 'Suspended'
+ /// Possible values include:
+ /// 'Unknown', 'MonitorLogs'
+ /// The priority of the
+ /// resource.
+ public MonitorProperties(string provisioningState = default(string), string monitoringStatus = default(string), string marketplaceSubscriptionStatus = default(string), DatadogOrganizationProperties datadogOrganizationProperties = default(DatadogOrganizationProperties), UserInfo userInfo = default(UserInfo), string liftrResourceCategory = default(string), int? liftrResourcePreference = default(int?))
+ {
+ ProvisioningState = provisioningState;
+ MonitoringStatus = monitoringStatus;
+ MarketplaceSubscriptionStatus = marketplaceSubscriptionStatus;
+ DatadogOrganizationProperties = datadogOrganizationProperties;
+ UserInfo = userInfo;
+ LiftrResourceCategory = liftrResourceCategory;
+ LiftrResourcePreference = liftrResourcePreference;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets possible values include: 'Accepted', 'Creating',
+ /// 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled',
+ /// 'Deleted', 'NotSpecified'
+ ///
+ [JsonProperty(PropertyName = "provisioningState")]
+ public string ProvisioningState { get; set; }
+
+ ///
+ /// Gets or sets possible values include: 'Enabled', 'Disabled'
+ ///
+ [JsonProperty(PropertyName = "monitoringStatus")]
+ public string MonitoringStatus { get; set; }
+
+ ///
+ /// Gets or sets possible values include: 'Active', 'Suspended'
+ ///
+ [JsonProperty(PropertyName = "marketplaceSubscriptionStatus")]
+ public string MarketplaceSubscriptionStatus { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "datadogOrganizationProperties")]
+ public DatadogOrganizationProperties DatadogOrganizationProperties { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "userInfo")]
+ public UserInfo UserInfo { get; set; }
+
+ ///
+ /// Gets or sets possible values include: 'Unknown', 'MonitorLogs'
+ ///
+ [JsonProperty(PropertyName = "liftrResourceCategory")]
+ public string LiftrResourceCategory { get; set; }
+
+ ///
+ /// Gets the priority of the resource.
+ ///
+ [JsonProperty(PropertyName = "liftrResourcePreference")]
+ public int? LiftrResourcePreference { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (UserInfo != null)
+ {
+ UserInfo.Validate();
+ }
+ }
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitorUpdateProperties.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitorUpdateProperties.cs
new file mode 100644
index 0000000000000..3ecb045c2166e
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitorUpdateProperties.cs
@@ -0,0 +1,53 @@
+//
+// 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.Datadog.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The set of properties that can be update in a PATCH request to a
+ /// monitor resource.
+ ///
+ public partial class MonitorUpdateProperties
+ {
+ ///
+ /// Initializes a new instance of the MonitorUpdateProperties class.
+ ///
+ public MonitorUpdateProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the MonitorUpdateProperties class.
+ ///
+ /// Possible values include: 'Enabled',
+ /// 'Disabled'
+ public MonitorUpdateProperties(string monitoringStatus = default(string))
+ {
+ MonitoringStatus = monitoringStatus;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets possible values include: 'Enabled', 'Disabled'
+ ///
+ [JsonProperty(PropertyName = "monitoringStatus")]
+ public string MonitoringStatus { get; set; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitoredResource.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitoredResource.cs
new file mode 100644
index 0000000000000..028d9ed16aa8d
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitoredResource.cs
@@ -0,0 +1,92 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.Datadog.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The properties of a resource currently being monitored by the Datadog
+ /// monitor resource.
+ ///
+ public partial class MonitoredResource
+ {
+ ///
+ /// Initializes a new instance of the MonitoredResource class.
+ ///
+ public MonitoredResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the MonitoredResource class.
+ ///
+ /// The ARM id of the resource.
+ /// Flag indicating if resource is sending
+ /// metrics to Datadog.
+ /// Reason for why the resource is
+ /// sending metrics (or why it is not sending).
+ /// Flag indicating if resource is sending
+ /// logs to Datadog.
+ /// Reason for why the resource is
+ /// sending logs (or why it is not sending).
+ public MonitoredResource(string id = default(string), bool? sendingMetrics = default(bool?), string reasonForMetricsStatus = default(string), bool? sendingLogs = default(bool?), string reasonForLogsStatus = default(string))
+ {
+ Id = id;
+ SendingMetrics = sendingMetrics;
+ ReasonForMetricsStatus = reasonForMetricsStatus;
+ SendingLogs = sendingLogs;
+ ReasonForLogsStatus = reasonForLogsStatus;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the ARM id of the resource.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; set; }
+
+ ///
+ /// Gets or sets flag indicating if resource is sending metrics to
+ /// Datadog.
+ ///
+ [JsonProperty(PropertyName = "sendingMetrics")]
+ public bool? SendingMetrics { get; set; }
+
+ ///
+ /// Gets or sets reason for why the resource is sending metrics (or why
+ /// it is not sending).
+ ///
+ [JsonProperty(PropertyName = "reasonForMetricsStatus")]
+ public string ReasonForMetricsStatus { get; set; }
+
+ ///
+ /// Gets or sets flag indicating if resource is sending logs to
+ /// Datadog.
+ ///
+ [JsonProperty(PropertyName = "sendingLogs")]
+ public bool? SendingLogs { get; set; }
+
+ ///
+ /// Gets or sets reason for why the resource is sending logs (or why it
+ /// is not sending).
+ ///
+ [JsonProperty(PropertyName = "reasonForLogsStatus")]
+ public string ReasonForLogsStatus { get; set; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitoringStatus.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitoringStatus.cs
new file mode 100644
index 0000000000000..15668e0b3857c
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitoringStatus.cs
@@ -0,0 +1,22 @@
+//
+// 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.Datadog.Models
+{
+
+ ///
+ /// Defines values for MonitoringStatus.
+ ///
+ public static class MonitoringStatus
+ {
+ public const string Enabled = "Enabled";
+ public const string Disabled = "Disabled";
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitoringTagRules.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitoringTagRules.cs
new file mode 100644
index 0000000000000..8d9088b8cf24a
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitoringTagRules.cs
@@ -0,0 +1,75 @@
+//
+// 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.Datadog.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Capture logs and metrics of Azure resources based on ARM tags.
+ ///
+ public partial class MonitoringTagRules : IResource
+ {
+ ///
+ /// Initializes a new instance of the MonitoringTagRules class.
+ ///
+ public MonitoringTagRules()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the MonitoringTagRules class.
+ ///
+ /// Name of the rule set.
+ /// The id of the rule set.
+ /// The type of the rule set.
+ public MonitoringTagRules(string name = default(string), string id = default(string), string type = default(string), MonitoringTagRulesProperties properties = default(MonitoringTagRulesProperties))
+ {
+ Name = name;
+ Id = id;
+ Type = type;
+ Properties = properties;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets name of the rule set.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets the id of the rule set.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; private set; }
+
+ ///
+ /// Gets the type of the rule set.
+ ///
+ [JsonProperty(PropertyName = "type")]
+ public string Type { get; private set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public MonitoringTagRulesProperties Properties { get; set; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitoringTagRulesProperties.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitoringTagRulesProperties.cs
new file mode 100644
index 0000000000000..5cf27df24b697
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/MonitoringTagRulesProperties.cs
@@ -0,0 +1,57 @@
+//
+// 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.Datadog.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Definition of the properties for a TagRules resource.
+ ///
+ public partial class MonitoringTagRulesProperties
+ {
+ ///
+ /// Initializes a new instance of the MonitoringTagRulesProperties
+ /// class.
+ ///
+ public MonitoringTagRulesProperties()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the MonitoringTagRulesProperties
+ /// class.
+ ///
+ public MonitoringTagRulesProperties(LogRules logRules = default(LogRules), MetricRules metricRules = default(MetricRules))
+ {
+ LogRules = logRules;
+ MetricRules = metricRules;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "logRules")]
+ public LogRules LogRules { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "metricRules")]
+ public MetricRules MetricRules { get; set; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/OperationDisplay.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/OperationDisplay.cs
new file mode 100644
index 0000000000000..0c1b6d0cb648f
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/OperationDisplay.cs
@@ -0,0 +1,80 @@
+//
+// 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.Datadog.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The object that represents the operation.
+ ///
+ public partial class OperationDisplay
+ {
+ ///
+ /// Initializes a new instance of the OperationDisplay class.
+ ///
+ public OperationDisplay()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the OperationDisplay class.
+ ///
+ /// Service provider, i.e.,
+ /// Microsoft.Datadog.
+ /// Type on which the operation is performed,
+ /// e.g., 'monitors'.
+ /// Operation type, e.g., read, write, delete,
+ /// etc.
+ /// Description of the operation, e.g.,
+ /// 'Write monitors'.
+ public OperationDisplay(string provider = default(string), string resource = default(string), string operation = default(string), string description = default(string))
+ {
+ Provider = provider;
+ Resource = resource;
+ Operation = operation;
+ Description = description;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets service provider, i.e., Microsoft.Datadog.
+ ///
+ [JsonProperty(PropertyName = "provider")]
+ public string Provider { get; set; }
+
+ ///
+ /// Gets or sets type on which the operation is performed, e.g.,
+ /// 'monitors'.
+ ///
+ [JsonProperty(PropertyName = "resource")]
+ public string Resource { get; set; }
+
+ ///
+ /// Gets or sets operation type, e.g., read, write, delete, etc.
+ ///
+ [JsonProperty(PropertyName = "operation")]
+ public string Operation { get; set; }
+
+ ///
+ /// Gets or sets description of the operation, e.g., 'Write monitors'.
+ ///
+ [JsonProperty(PropertyName = "description")]
+ public string Description { get; set; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/OperationResult.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/OperationResult.cs
new file mode 100644
index 0000000000000..c773585163462
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/OperationResult.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.Datadog.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// A Microsoft.Datadog REST API operation.
+ ///
+ public partial class OperationResult
+ {
+ ///
+ /// Initializes a new instance of the OperationResult class.
+ ///
+ public OperationResult()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the OperationResult class.
+ ///
+ /// Operation name, i.e.,
+ /// {provider}/{resource}/{operation}.
+ /// Indicates whether the operation is a
+ /// data action
+ public OperationResult(string name = default(string), OperationDisplay display = default(OperationDisplay), bool? isDataAction = default(bool?))
+ {
+ Name = name;
+ Display = display;
+ IsDataAction = isDataAction;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets operation name, i.e.,
+ /// {provider}/{resource}/{operation}.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "display")]
+ public OperationDisplay Display { get; set; }
+
+ ///
+ /// Gets or sets indicates whether the operation is a data action
+ ///
+ [JsonProperty(PropertyName = "isDataAction")]
+ public bool? IsDataAction { get; set; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/Page.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/Page.cs
new file mode 100644
index 0000000000000..c2d0c32eadd01
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/Page.cs
@@ -0,0 +1,53 @@
+//
+// 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.Datadog.Models
+{
+ 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/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ProvisioningState.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ProvisioningState.cs
new file mode 100644
index 0000000000000..4f0f988f49192
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ProvisioningState.cs
@@ -0,0 +1,29 @@
+//
+// 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.Datadog.Models
+{
+
+ ///
+ /// Defines values for ProvisioningState.
+ ///
+ public static class ProvisioningState
+ {
+ public const string Accepted = "Accepted";
+ public const string Creating = "Creating";
+ public const string Updating = "Updating";
+ public const string Deleting = "Deleting";
+ public const string Succeeded = "Succeeded";
+ public const string Failed = "Failed";
+ public const string Canceled = "Canceled";
+ public const string Deleted = "Deleted";
+ public const string NotSpecified = "NotSpecified";
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ResourceProviderDefaultErrorResponse.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ResourceProviderDefaultErrorResponse.cs
new file mode 100644
index 0000000000000..52bccfa4645cf
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ResourceProviderDefaultErrorResponse.cs
@@ -0,0 +1,48 @@
+//
+// 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.Datadog.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class ResourceProviderDefaultErrorResponse
+ {
+ ///
+ /// Initializes a new instance of the
+ /// ResourceProviderDefaultErrorResponse class.
+ ///
+ public ResourceProviderDefaultErrorResponse()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// ResourceProviderDefaultErrorResponse class.
+ ///
+ public ResourceProviderDefaultErrorResponse(ErrorResponseBody error = default(ErrorResponseBody))
+ {
+ Error = error;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "error")]
+ public ErrorResponseBody Error { get; set; }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ResourceProviderDefaultErrorResponseException.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ResourceProviderDefaultErrorResponseException.cs
new file mode 100644
index 0000000000000..1f7bc4d63fb9b
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ResourceProviderDefaultErrorResponseException.cs
@@ -0,0 +1,62 @@
+//
+// 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.Datadog.Models
+{
+ using Microsoft.Rest;
+
+ ///
+ /// Exception thrown for an invalid response with
+ /// ResourceProviderDefaultErrorResponse information.
+ ///
+ public partial class ResourceProviderDefaultErrorResponseException : 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 ResourceProviderDefaultErrorResponse Body { get; set; }
+
+ ///
+ /// Initializes a new instance of the ResourceProviderDefaultErrorResponseException class.
+ ///
+ public ResourceProviderDefaultErrorResponseException()
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the ResourceProviderDefaultErrorResponseException class.
+ ///
+ /// The exception message.
+ public ResourceProviderDefaultErrorResponseException(string message)
+ : this(message, null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the ResourceProviderDefaultErrorResponseException class.
+ ///
+ /// The exception message.
+ /// Inner exception.
+ public ResourceProviderDefaultErrorResponseException(string message, System.Exception innerException)
+ : base(message, innerException)
+ {
+ }
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ResourceSku.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ResourceSku.cs
new file mode 100644
index 0000000000000..1da1837d4e9fe
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/ResourceSku.cs
@@ -0,0 +1,62 @@
+//
+// 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.Datadog.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class ResourceSku
+ {
+ ///
+ /// Initializes a new instance of the ResourceSku class.
+ ///
+ public ResourceSku()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ResourceSku class.
+ ///
+ /// Name of the SKU.
+ public ResourceSku(string name)
+ {
+ Name = name;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets name of the SKU.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Name");
+ }
+ }
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/SingleSignOnStates.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/SingleSignOnStates.cs
new file mode 100644
index 0000000000000..d947c26e33261
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/SingleSignOnStates.cs
@@ -0,0 +1,24 @@
+//
+// 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.Datadog.Models
+{
+
+ ///
+ /// Defines values for SingleSignOnStates.
+ ///
+ public static class SingleSignOnStates
+ {
+ public const string Initial = "Initial";
+ public const string Enable = "Enable";
+ public const string Disable = "Disable";
+ public const string Existing = "Existing";
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/TagAction.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/TagAction.cs
new file mode 100644
index 0000000000000..3e067599da305
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/TagAction.cs
@@ -0,0 +1,22 @@
+//
+// 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.Datadog.Models
+{
+
+ ///
+ /// Defines values for TagAction.
+ ///
+ public static class TagAction
+ {
+ public const string Include = "Include";
+ public const string Exclude = "Exclude";
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/UserInfo.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/UserInfo.cs
new file mode 100644
index 0000000000000..3f5d83619f355
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/UserInfo.cs
@@ -0,0 +1,99 @@
+//
+// 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.Datadog.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ public partial class UserInfo
+ {
+ ///
+ /// Initializes a new instance of the UserInfo class.
+ ///
+ public UserInfo()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the UserInfo class.
+ ///
+ /// Name of the user
+ /// Email of the user used by Datadog for
+ /// contacting them if needed
+ /// Phone number of the user used by Datadog
+ /// for contacting them if needed
+ public UserInfo(string name = default(string), string emailAddress = default(string), string phoneNumber = default(string))
+ {
+ Name = name;
+ EmailAddress = emailAddress;
+ PhoneNumber = phoneNumber;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets name of the user
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets email of the user used by Datadog for contacting them
+ /// if needed
+ ///
+ [JsonProperty(PropertyName = "emailAddress")]
+ public string EmailAddress { get; set; }
+
+ ///
+ /// Gets or sets phone number of the user used by Datadog for
+ /// contacting them if needed
+ ///
+ [JsonProperty(PropertyName = "phoneNumber")]
+ public string PhoneNumber { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Name != null)
+ {
+ if (Name.Length > 50)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "Name", 50);
+ }
+ }
+ if (EmailAddress != null)
+ {
+ if (!System.Text.RegularExpressions.Regex.IsMatch(EmailAddress, "^[A-Za-z0-9._%+-]+@(?:[A-Za-z0-9-]+\\.)+[A-Za-z]{2,}$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "EmailAddress", "^[A-Za-z0-9._%+-]+@(?:[A-Za-z0-9-]+\\.)+[A-Za-z]{2,}$");
+ }
+ }
+ if (PhoneNumber != null)
+ {
+ if (PhoneNumber.Length > 40)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "PhoneNumber", 40);
+ }
+ }
+ }
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitoredResourcesOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitoredResourcesOperations.cs
new file mode 100644
index 0000000000000..386c7b53818ac
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitoredResourcesOperations.cs
@@ -0,0 +1,422 @@
+//
+// 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.Datadog
+{
+ 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;
+
+ ///
+ /// MonitoredResourcesOperations operations.
+ ///
+ internal partial class MonitoredResourcesOperations : IServiceOperations, IMonitoredResourcesOperations
+ {
+ ///
+ /// Initializes a new instance of the MonitoredResourcesOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal MonitoredResourcesOperations(MicrosoftDatadogClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the MicrosoftDatadogClient
+ ///
+ public MicrosoftDatadogClient Client { get; private set; }
+
+ ///
+ /// List the resources currently being monitored by the Datadog monitor
+ /// resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// 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 resourceGroupName, string monitorName, 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 (monitorName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "monitorName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("monitorName", monitorName);
+ 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("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listMonitoredResources").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// List the resources currently being monitored by the Datadog monitor
+ /// resource.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitoredResourcesOperationsExtensions.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitoredResourcesOperationsExtensions.cs
new file mode 100644
index 0000000000000..0cb64a4ac5b80
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitoredResourcesOperationsExtensions.cs
@@ -0,0 +1,103 @@
+//
+// 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.Datadog
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for MonitoredResourcesOperations.
+ ///
+ public static partial class MonitoredResourcesOperationsExtensions
+ {
+ ///
+ /// List the resources currently being monitored by the Datadog monitor
+ /// resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ public static IPage List(this IMonitoredResourcesOperations operations, string resourceGroupName, string monitorName)
+ {
+ return operations.ListAsync(resourceGroupName, monitorName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List the resources currently being monitored by the Datadog monitor
+ /// resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this IMonitoredResourcesOperations operations, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, monitorName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// List the resources currently being monitored by the Datadog monitor
+ /// resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this IMonitoredResourcesOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List the resources currently being monitored by the Datadog monitor
+ /// resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListNextAsync(this IMonitoredResourcesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitorsOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitorsOperations.cs
new file mode 100644
index 0000000000000..a9909dde73aed
--- /dev/null
+++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MonitorsOperations.cs
@@ -0,0 +1,1616 @@
+//
+// 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.Datadog
+{
+ 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;
+
+ ///
+ /// MonitorsOperations operations.
+ ///
+ internal partial class MonitorsOperations : IServiceOperations, IMonitorsOperations
+ {
+ ///
+ /// Initializes a new instance of the MonitorsOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal MonitorsOperations(MicrosoftDatadogClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the MicrosoftDatadogClient
+ ///
+ public MicrosoftDatadogClient Client { get; private set; }
+
+ ///
+ /// List all monitors under the specified subscription.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ 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("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Datadog/monitors").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.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 ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// List all monitors under the specified resource group.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ 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 ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ResourceProviderDefaultErrorResponse _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 the properties of a specific monitor resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string monitorName, 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 (monitorName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "monitorName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("monitorName", monitorName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ 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 ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ResourceProviderDefaultErrorResponse _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;
+ }
+
+ ///
+ /// Create a monitor resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string monitorName, DatadogMonitorResource body = default(DatadogMonitorResource), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginCreateWithHttpMessagesAsync(resourceGroupName, monitorName, body, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Update a monitor resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ ///
+ ///
+ /// 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 monitorName, DatadogMonitorResourceUpdateParameters body = default(DatadogMonitorResourceUpdateParameters), 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 (monitorName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "monitorName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("monitorName", monitorName);
+ tracingParameters.Add("body", body);
+ 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.Datadog/monitors/{monitorName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ 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(body != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(body, 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 ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Delete a monitor resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string monitorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, monitorName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Create a monitor resource.
+ ///
+ ///
+ /// The name of the resource group to which the Datadog resource belongs.
+ ///
+ ///
+ /// Monitor resource name
+ ///
+ ///
+ ///
+ ///
+ /// 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> BeginCreateWithHttpMessagesAsync(string resourceGroupName, string monitorName, DatadogMonitorResource body = default(DatadogMonitorResource), 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 (monitorName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "monitorName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.ApiVersion != null)
+ {
+ if (Client.ApiVersion.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1);
+ }
+ }
+ if (body != null)
+ {
+ body.Validate();
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("monitorName", monitorName);
+ tracingParameters.Add("body", body);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", 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.Datadog/monitors/{monitorName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{monitorName}", System.Uri.EscapeDataString(monitorName));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("PUT");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(body != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(body, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 201)
+ {
+ var ex = new ResourceProviderDefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ResourceProviderDefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 201)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///