diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMarketplaceAgreementsOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMarketplaceAgreementsOperations.cs new file mode 100644 index 000000000000..847450f717d1 --- /dev/null +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMarketplaceAgreementsOperations.cs @@ -0,0 +1,90 @@ +// +// 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; + + /// + /// MarketplaceAgreementsOperations operations. + /// + public partial interface IMarketplaceAgreementsOperations + { + /// + /// List Datadog marketplace agreements in the 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)); + /// + /// Create Datadog marketplace agreement in the subscription. + /// + /// + /// Represents the properties of the resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateWithHttpMessagesAsync(DatadogAgreementProperties properties = default(DatadogAgreementProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List Datadog marketplace agreements in the 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)); + } +} diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMicrosoftDatadogClient.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMicrosoftDatadogClient.cs index c545fa333570..de8dc9bfbdaf 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMicrosoftDatadogClient.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/IMicrosoftDatadogClient.cs @@ -68,6 +68,11 @@ public partial interface IMicrosoftDatadogClient : System.IDisposable bool? GenerateClientRequestId { get; set; } + /// + /// Gets the IMarketplaceAgreementsOperations. + /// + IMarketplaceAgreementsOperations MarketplaceAgreements { get; } + /// /// Gets the IApiKeysOperations. /// diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ISingleSignOnConfigurationsOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ISingleSignOnConfigurationsOperations.cs index 176d2bc8cd65..60b9e87d088f 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ISingleSignOnConfigurationsOperations.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ISingleSignOnConfigurationsOperations.cs @@ -61,6 +61,7 @@ public partial interface ISingleSignOnConfigurationsOperations /// Monitor resource name /// /// + /// Configuration name /// /// /// @@ -91,6 +92,7 @@ public partial interface ISingleSignOnConfigurationsOperations /// Monitor resource name /// /// + /// Configuration name /// /// /// The headers that will be added to request. @@ -119,6 +121,7 @@ public partial interface ISingleSignOnConfigurationsOperations /// Monitor resource name /// /// + /// Configuration name /// /// /// diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ITagRulesOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ITagRulesOperations.cs index 0befb5e6db1d..e7ec7f77169e 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ITagRulesOperations.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/ITagRulesOperations.cs @@ -60,6 +60,7 @@ public partial interface ITagRulesOperations /// Monitor resource name /// /// + /// Rule set name /// /// /// @@ -90,6 +91,7 @@ public partial interface ITagRulesOperations /// Monitor resource name /// /// + /// Rule set name /// /// /// The headers that will be added to request. diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MarketplaceAgreementsOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MarketplaceAgreementsOperations.cs new file mode 100644 index 000000000000..4f4456990f5c --- /dev/null +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MarketplaceAgreementsOperations.cs @@ -0,0 +1,568 @@ +// +// 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; + + /// + /// MarketplaceAgreementsOperations operations. + /// + internal partial class MarketplaceAgreementsOperations : IServiceOperations, IMarketplaceAgreementsOperations + { + /// + /// Initializes a new instance of the MarketplaceAgreementsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal MarketplaceAgreementsOperations(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 Datadog marketplace agreements in the 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"); + } + // 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/agreements").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new 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 Datadog marketplace agreement in the subscription. + /// + /// + /// Represents the properties of the resource. + /// + /// + /// 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> CreateWithHttpMessagesAsync(DatadogAgreementProperties properties = default(DatadogAgreementProperties), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + DatadogAgreementResource body = default(DatadogAgreementResource); + if (properties != null) + { + body = new DatadogAgreementResource(); + body.Properties = properties; + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("body", body); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Datadog/agreements/default").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + 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("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) + { + 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 Datadog marketplace agreements in the subscription. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> 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("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; + } + + } +} diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MarketplaceAgreementsOperationsExtensions.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MarketplaceAgreementsOperationsExtensions.cs new file mode 100644 index 000000000000..7150ebd5fd7a --- /dev/null +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MarketplaceAgreementsOperationsExtensions.cs @@ -0,0 +1,121 @@ +// +// 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 MarketplaceAgreementsOperations. + /// + public static partial class MarketplaceAgreementsOperationsExtensions + { + /// + /// List Datadog marketplace agreements in the subscription. + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this IMarketplaceAgreementsOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// List Datadog marketplace agreements in the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IMarketplaceAgreementsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Create Datadog marketplace agreement in the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Represents the properties of the resource. + /// + public static DatadogAgreementResource Create(this IMarketplaceAgreementsOperations operations, DatadogAgreementProperties properties = default(DatadogAgreementProperties)) + { + return operations.CreateAsync(properties).GetAwaiter().GetResult(); + } + + /// + /// Create Datadog marketplace agreement in the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Represents the properties of the resource. + /// + /// + /// The cancellation token. + /// + public static async Task CreateAsync(this IMarketplaceAgreementsOperations operations, DatadogAgreementProperties properties = default(DatadogAgreementProperties), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(properties, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// List Datadog marketplace agreements in the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this IMarketplaceAgreementsOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// List Datadog marketplace agreements in the subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this IMarketplaceAgreementsOperations 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 index bbbac3388bcd..6f78f68139d7 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MicrosoftDatadogClient.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/MicrosoftDatadogClient.cs @@ -71,6 +71,11 @@ public partial class MicrosoftDatadogClient : ServiceClient public bool? GenerateClientRequestId { get; set; } + /// + /// Gets the IMarketplaceAgreementsOperations. + /// + public virtual IMarketplaceAgreementsOperations MarketplaceAgreements { get; private set; } + /// /// Gets the IApiKeysOperations. /// @@ -357,6 +362,7 @@ public MicrosoftDatadogClient(System.Uri baseUri, ServiceClientCredentials crede /// private void Initialize() { + MarketplaceAgreements = new MarketplaceAgreementsOperations(this); ApiKeys = new ApiKeysOperations(this); Hosts = new HostsOperations(this); LinkedResources = new LinkedResourcesOperations(this); diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogAgreementProperties.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogAgreementProperties.cs new file mode 100644 index 000000000000..9db4aaa2077c --- /dev/null +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogAgreementProperties.cs @@ -0,0 +1,113 @@ +// +// 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; + + /// + /// Terms properties. + /// + public partial class DatadogAgreementProperties + { + /// + /// Initializes a new instance of the DatadogAgreementProperties class. + /// + public DatadogAgreementProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatadogAgreementProperties class. + /// + /// Publisher identifier string. + /// Product identifier string. + /// Plan identifier string. + /// Link to HTML with Microsoft and + /// Publisher terms. + /// Link to the privacy policy of the + /// publisher. + /// Date and time in UTC of when the + /// terms were accepted. This is empty if Accepted is false. + /// Terms signature. + /// If any version of the terms have been + /// accepted, otherwise false. + public DatadogAgreementProperties(string publisher = default(string), string product = default(string), string plan = default(string), string licenseTextLink = default(string), string privacyPolicyLink = default(string), System.DateTime? retrieveDatetime = default(System.DateTime?), string signature = default(string), bool? accepted = default(bool?)) + { + Publisher = publisher; + Product = product; + Plan = plan; + LicenseTextLink = licenseTextLink; + PrivacyPolicyLink = privacyPolicyLink; + RetrieveDatetime = retrieveDatetime; + Signature = signature; + Accepted = accepted; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets publisher identifier string. + /// + [JsonProperty(PropertyName = "publisher")] + public string Publisher { get; set; } + + /// + /// Gets or sets product identifier string. + /// + [JsonProperty(PropertyName = "product")] + public string Product { get; set; } + + /// + /// Gets or sets plan identifier string. + /// + [JsonProperty(PropertyName = "plan")] + public string Plan { get; set; } + + /// + /// Gets or sets link to HTML with Microsoft and Publisher terms. + /// + [JsonProperty(PropertyName = "licenseTextLink")] + public string LicenseTextLink { get; set; } + + /// + /// Gets or sets link to the privacy policy of the publisher. + /// + [JsonProperty(PropertyName = "privacyPolicyLink")] + public string PrivacyPolicyLink { get; set; } + + /// + /// Gets or sets date and time in UTC of when the terms were accepted. + /// This is empty if Accepted is false. + /// + [JsonProperty(PropertyName = "retrieveDatetime")] + public System.DateTime? RetrieveDatetime { get; set; } + + /// + /// Gets or sets terms signature. + /// + [JsonProperty(PropertyName = "signature")] + public string Signature { get; set; } + + /// + /// Gets or sets if any version of the terms have been accepted, + /// otherwise false. + /// + [JsonProperty(PropertyName = "accepted")] + public bool? Accepted { get; set; } + + } +} diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogAgreementResource.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogAgreementResource.cs new file mode 100644 index 000000000000..331e8377c65f --- /dev/null +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogAgreementResource.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; + + public partial class DatadogAgreementResource : IResource + { + /// + /// Initializes a new instance of the DatadogAgreementResource class. + /// + public DatadogAgreementResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatadogAgreementResource class. + /// + /// ARM id of the resource. + /// Name of the agreement. + /// The type of the resource. + /// Represents the properties of the + /// resource. + public DatadogAgreementResource(string id = default(string), string name = default(string), string type = default(string), DatadogAgreementProperties properties = default(DatadogAgreementProperties)) + { + 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 agreement. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets the type of the resource. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets or sets represents the properties of the resource. + /// + [JsonProperty(PropertyName = "properties")] + public DatadogAgreementProperties Properties { 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 index 461996f98473..7e3e22bb718b 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogOrganizationProperties.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/DatadogOrganizationProperties.cs @@ -13,6 +13,9 @@ namespace Microsoft.Azure.Management.Datadog.Models using Newtonsoft.Json; using System.Linq; + /// + /// Datadog organization properties + /// public partial class DatadogOrganizationProperties { /// 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 index 3f5d83619f35..deaa6d33be36 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/UserInfo.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/Models/UserInfo.cs @@ -14,6 +14,9 @@ namespace Microsoft.Azure.Management.Datadog.Models using Newtonsoft.Json; using System.Linq; + /// + /// User info + /// public partial class UserInfo { /// diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SdkInfo_MicrosoftDatadogClient.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SdkInfo_MicrosoftDatadogClient.cs index 8a14d17a5ea0..b6efdfb41f34 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SdkInfo_MicrosoftDatadogClient.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SdkInfo_MicrosoftDatadogClient.cs @@ -22,6 +22,7 @@ public static IEnumerable> ApiInfo_MicrosoftDatado new Tuple("Datadog", "ApiKeys", "2020-02-01-preview"), new Tuple("Datadog", "Hosts", "2020-02-01-preview"), new Tuple("Datadog", "LinkedResources", "2020-02-01-preview"), + new Tuple("Datadog", "MarketplaceAgreements", "2020-02-01-preview"), new Tuple("Datadog", "MonitoredResources", "2020-02-01-preview"), new Tuple("Datadog", "Monitors", "2020-02-01-preview"), new Tuple("Datadog", "Operations", "2020-02-01-preview"), @@ -31,16 +32,5 @@ public static IEnumerable> ApiInfo_MicrosoftDatado }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "v2"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413"; - public static readonly String AutoRestCmdExecuted = "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"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "183db615e7e870d12668972c874897f095fe256c"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SingleSignOnConfigurationsOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SingleSignOnConfigurationsOperations.cs index b3d98f639e9b..cf85946c02b7 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SingleSignOnConfigurationsOperations.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SingleSignOnConfigurationsOperations.cs @@ -258,6 +258,7 @@ internal SingleSignOnConfigurationsOperations(MicrosoftDatadogClient client) /// Monitor resource name /// /// + /// Configuration name /// /// /// @@ -284,6 +285,7 @@ internal SingleSignOnConfigurationsOperations(MicrosoftDatadogClient client) /// Monitor resource name /// /// + /// Configuration name /// /// /// Headers that will be added to request. @@ -490,6 +492,7 @@ internal SingleSignOnConfigurationsOperations(MicrosoftDatadogClient client) /// Monitor resource name /// /// + /// Configuration name /// /// /// diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SingleSignOnConfigurationsOperationsExtensions.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SingleSignOnConfigurationsOperationsExtensions.cs index b68a85fbf3a0..7c454ed047f7 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SingleSignOnConfigurationsOperationsExtensions.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/SingleSignOnConfigurationsOperationsExtensions.cs @@ -74,6 +74,7 @@ public static IPage List(this ISingleSignOnConfigur /// Monitor resource name /// /// + /// Configuration name /// /// /// @@ -95,6 +96,7 @@ public static IPage List(this ISingleSignOnConfigur /// Monitor resource name /// /// + /// Configuration name /// /// /// @@ -122,6 +124,7 @@ public static IPage List(this ISingleSignOnConfigur /// Monitor resource name /// /// + /// Configuration name /// public static DatadogSingleSignOnResource Get(this ISingleSignOnConfigurationsOperations operations, string resourceGroupName, string monitorName, string configurationName) { @@ -141,6 +144,7 @@ public static DatadogSingleSignOnResource Get(this ISingleSignOnConfigurationsOp /// Monitor resource name /// /// + /// Configuration name /// /// /// The cancellation token. @@ -166,6 +170,7 @@ public static DatadogSingleSignOnResource Get(this ISingleSignOnConfigurationsOp /// Monitor resource name /// /// + /// Configuration name /// /// /// @@ -187,6 +192,7 @@ public static DatadogSingleSignOnResource Get(this ISingleSignOnConfigurationsOp /// Monitor resource name /// /// + /// Configuration name /// /// /// diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/TagRulesOperations.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/TagRulesOperations.cs index 46f53070713f..9b8ebce40b24 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/TagRulesOperations.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/TagRulesOperations.cs @@ -258,6 +258,7 @@ internal TagRulesOperations(MicrosoftDatadogClient client) /// Monitor resource name /// /// + /// Rule set name /// /// /// @@ -479,6 +480,7 @@ internal TagRulesOperations(MicrosoftDatadogClient client) /// Monitor resource name /// /// + /// Rule set name /// /// /// Headers that will be added to request. diff --git a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/TagRulesOperationsExtensions.cs b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/TagRulesOperationsExtensions.cs index 28aa217815be..0e06ef3f1be3 100644 --- a/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/TagRulesOperationsExtensions.cs +++ b/sdk/datadog/Microsoft.Azure.Management.Datadog/src/Generated/TagRulesOperationsExtensions.cs @@ -74,6 +74,7 @@ public static IPage List(this ITagRulesOperations operations /// Monitor resource name /// /// + /// Rule set name /// /// /// @@ -95,6 +96,7 @@ public static IPage List(this ITagRulesOperations operations /// Monitor resource name /// /// + /// Rule set name /// /// /// @@ -122,6 +124,7 @@ public static IPage List(this ITagRulesOperations operations /// Monitor resource name /// /// + /// Rule set name /// public static MonitoringTagRules Get(this ITagRulesOperations operations, string resourceGroupName, string monitorName, string ruleSetName) { @@ -141,6 +144,7 @@ public static MonitoringTagRules Get(this ITagRulesOperations operations, string /// Monitor resource name /// /// + /// Rule set name /// /// /// The cancellation token.