diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b6dabbcd5be3..78fb1f071ffa 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -445,6 +445,12 @@ # ServiceLabel: %DataBox Edge # ServiceOwners: @a-t-mason @ganzee @manuaery +# PRLabel: %Datadog +/sdk/datadog/Azure.ResourceManager.*/ @jbhanuchand @ArcturusZhang @ArthurMa1978 + +# ServiceLabel: %Datadog %Mgmt +# ServiceOwners: @jbhanuchand + # PRLabel: %Defender EASM /sdk/easm/Azure.Analytics.Defender.Easm/ @thang-bit diff --git a/.vscode/cspell.json b/.vscode/cspell.json index f72f023231dc..1acd9be1d979 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -523,6 +523,7 @@ { "filename": "**/sdk/datadog/**/*.cs", "words": [ + "cspm", "liftr" ] }, diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/CHANGELOG.md b/sdk/datadog/Azure.ResourceManager.Datadog/CHANGELOG.md index be577ff016bc..bee1b529db85 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/CHANGELOG.md +++ b/sdk/datadog/Azure.ResourceManager.Datadog/CHANGELOG.md @@ -1,33 +1,29 @@ # Release History -## 1.0.0-beta.7 (Unreleased) +## 1.0.0 (2025-11-20) ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes +Updated to api version 2025-06-11. ## 1.0.0-beta.6 (2025-08-04) ### Features Added -- Make `Azure.ResourceManager.Datadog` AOT-compatible +- Make `Azure.ResourceManager.Datadog` AOT-compatible. ## 1.0.0-beta.5 (2025-03-11) ### Features Added -- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. +- Enabled the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. - Exposed `JsonModelWriteCore` for model serialization procedure. ## 1.0.0-beta.4 (2023-11-27) ### Features Added -- Enable mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. +- Enabled mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details. ### Other Changes @@ -37,7 +33,7 @@ ### Features Added -- Enable the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). +- Enabled the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder). ### Other Changes diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/README.md b/sdk/datadog/Azure.ResourceManager.Datadog/README.md index 464c5f3395cc..e00a74222b34 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/README.md +++ b/sdk/datadog/Azure.ResourceManager.Datadog/README.md @@ -19,7 +19,7 @@ This library follows the [new Azure SDK guidelines](https://azure.github.io/azur Install the Microsoft Azure Datadog management library for .NET with [NuGet](https://www.nuget.org/): ```dotnetcli -dotnet add package Azure.ResourceManager.Datadog --prerelease +dotnet add package Azure.ResourceManager.Datadog ``` ### Prerequisites diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/api/Azure.ResourceManager.Datadog.net8.0.cs b/sdk/datadog/Azure.ResourceManager.Datadog/api/Azure.ResourceManager.Datadog.net8.0.cs index e99d54eb3c19..2bb90cfa5cab 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/api/Azure.ResourceManager.Datadog.net8.0.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/api/Azure.ResourceManager.Datadog.net8.0.cs @@ -8,24 +8,106 @@ internal AzureResourceManagerDatadogContext() { } } public static partial class DatadogExtensions { - public static Azure.Response CreateOrUpdateMarketplaceAgreement(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Datadog.Models.DatadogAgreementResourceProperties body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> CreateOrUpdateMarketplaceAgreementAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Datadog.Models.DatadogAgreementResourceProperties body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response CreateOrUpdateMarketplaceAgreement(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Datadog.Models.DatadogAgreement body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CreateOrUpdateMarketplaceAgreementAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Datadog.Models.DatadogAgreement body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetDatadogMonitor(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetDatadogMonitorAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionResource GetDatadogMonitoredSubscriptionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Datadog.DatadogMonitorResource GetDatadogMonitorResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Response GetDatadogMonitorResource(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetDatadogMonitorResourceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.Datadog.DatadogMonitorResourceCollection GetDatadogMonitorResources(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetDatadogMonitorResources(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetDatadogMonitorResourcesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.Datadog.DatadogMonitorCollection GetDatadogMonitors(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetDatadogMonitors(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetDatadogMonitorsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Datadog.DatadogSingleSignOnResource GetDatadogSingleSignOnResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Pageable GetMarketplaceAgreements(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetMarketplaceAgreementsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.Datadog.MonitoringTagRuleResource GetMonitoringTagRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Datadog.DataMonitoringTagRuleResource GetDataMonitoringTagRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Pageable GetMarketplaceAgreements(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetMarketplaceAgreementsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetSubscriptionStatus(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string datadogOrganizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetSubscriptionStatusAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string datadogOrganizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetSubscriptionStatuses(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string datadogOrganizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetSubscriptionStatusesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string datadogOrganizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DatadogMonitorCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DatadogMonitorCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string monitorName, Azure.ResourceManager.Datadog.DatadogMonitorData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string monitorName, Azure.ResourceManager.Datadog.DatadogMonitorData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class DatadogMonitorResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DatadogMonitorData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogMonitorData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.Datadog.Models.DatadogMonitorProperties Properties { get { throw null; } set { } } + public string SkuName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.DatadogMonitorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.DatadogMonitorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogMonitoredSubscriptionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DatadogMonitoredSubscriptionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string configurationName, Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string configurationName, Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DatadogMonitoredSubscriptionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogMonitoredSubscriptionData() { } + public Azure.ResourceManager.Datadog.Models.DatadogSubscriptionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogMonitoredSubscriptionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DatadogMonitoredSubscriptionResource() { } + public virtual Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string monitorName, string configurationName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DatadogMonitorResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; protected DatadogMonitorResource() { } - public virtual Azure.ResourceManager.Datadog.DatadogMonitorResourceData Data { get { throw null; } } + public virtual Azure.ResourceManager.Datadog.DatadogMonitorData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -36,88 +118,48 @@ protected DatadogMonitorResource() { } public virtual Azure.Pageable GetApiKeys(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetApiKeysAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetDatadogSingleSignOnResource(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDatadogSingleSignOnResourceAsync(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.Datadog.DatadogSingleSignOnResourceCollection GetDatadogSingleSignOnResources() { throw null; } + public virtual Azure.Response GetBillingInfo(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBillingInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDatadogMonitoredSubscription(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDatadogMonitoredSubscriptionAsync(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionCollection GetDatadogMonitoredSubscriptions() { throw null; } + public virtual Azure.Response GetDatadogSingleSignOn(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDatadogSingleSignOnAsync(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Datadog.DatadogSingleSignOnCollection GetDatadogSingleSignOns() { throw null; } + public virtual Azure.Response GetDataMonitoringTagRule(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataMonitoringTagRuleAsync(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Datadog.DataMonitoringTagRuleCollection GetDataMonitoringTagRules() { throw null; } public virtual Azure.Response GetDefaultKey(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDefaultKeyAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetHosts(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetHostsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetLinkedResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetLinkedResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetMonitoredResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetMonitoredResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetMonitoringTagRule(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetMonitoringTagRuleAsync(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.Datadog.MonitoringTagRuleCollection GetMonitoringTagRules() { throw null; } + public virtual Azure.Pageable GetLinkedResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetLinkedResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetMonitoredResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetMonitoredResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RefreshSetPasswordLink(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RefreshSetPasswordLinkAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ResubscribeOrganization(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.Models.ResubscribeOrganizationContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ResubscribeOrganizationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.Models.ResubscribeOrganizationContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetDefaultKey(Azure.ResourceManager.Datadog.Models.DatadogApiKey body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task SetDefaultKeyAsync(Azure.ResourceManager.Datadog.Models.DatadogApiKey body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.Datadog.DatadogMonitorResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.DatadogMonitorResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.Models.DatadogMonitorResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.Models.DatadogMonitorResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class DatadogMonitorResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected DatadogMonitorResourceCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string monitorName, Azure.ResourceManager.Datadog.DatadogMonitorResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string monitorName, Azure.ResourceManager.Datadog.DatadogMonitorResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class DatadogMonitorResourceData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public DatadogMonitorResourceData(Azure.Core.AzureLocation location) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.ResourceManager.Datadog.Models.MonitorProperties Properties { get { throw null; } set { } } - public string SkuName { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.DatadogMonitorResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.DatadogMonitorResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class DatadogSingleSignOnResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected DatadogSingleSignOnResource() { } - public virtual Azure.ResourceManager.Datadog.DatadogSingleSignOnResourceData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string monitorName, string configurationName) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.Datadog.DatadogSingleSignOnResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.DatadogSingleSignOnResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.DatadogSingleSignOnResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.DatadogSingleSignOnResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class DatadogSingleSignOnResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected DatadogSingleSignOnResourceCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string configurationName, Azure.ResourceManager.Datadog.DatadogSingleSignOnResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string configurationName, Azure.ResourceManager.Datadog.DatadogSingleSignOnResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.Datadog.DatadogMonitorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.DatadogMonitorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.Models.DatadogMonitorPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.Models.DatadogMonitorPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DatadogSingleSignOnCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DatadogSingleSignOnCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string configurationName, Azure.ResourceManager.Datadog.DatadogSingleSignOnData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string configurationName, Azure.ResourceManager.Datadog.DatadogSingleSignOnData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -130,61 +172,78 @@ protected DatadogSingleSignOnResourceCollection() { } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class DatadogSingleSignOnResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DatadogSingleSignOnData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public DatadogSingleSignOnResourceData() { } + public DatadogSingleSignOnData() { } public Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.DatadogSingleSignOnResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.DatadogSingleSignOnResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.Datadog.DatadogSingleSignOnData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.DatadogSingleSignOnData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class MonitoringTagRuleCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class DatadogSingleSignOnResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - protected MonitoringTagRuleCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string ruleSetName, Azure.ResourceManager.Datadog.MonitoringTagRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string ruleSetName, Azure.ResourceManager.Datadog.MonitoringTagRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static readonly Azure.Core.ResourceType ResourceType; + protected DatadogSingleSignOnResource() { } + public virtual Azure.ResourceManager.Datadog.DatadogSingleSignOnData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string monitorName, string configurationName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.Datadog.DatadogSingleSignOnData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.DatadogSingleSignOnData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.DatadogSingleSignOnData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.DatadogSingleSignOnData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataMonitoringTagRuleCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataMonitoringTagRuleCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string ruleSetName, Azure.ResourceManager.Datadog.DataMonitoringTagRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string ruleSetName, Azure.ResourceManager.Datadog.DataMonitoringTagRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + public virtual Azure.Response Get(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class MonitoringTagRuleData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DataMonitoringTagRuleData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public MonitoringTagRuleData() { } - public Azure.ResourceManager.Datadog.Models.MonitoringTagRulesProperties Properties { get { throw null; } set { } } + public DataMonitoringTagRuleData() { } + public Azure.ResourceManager.Datadog.Models.MonitoringTagRuleProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.MonitoringTagRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.MonitoringTagRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.Datadog.DataMonitoringTagRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.DataMonitoringTagRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class MonitoringTagRuleResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DataMonitoringTagRuleResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; - protected MonitoringTagRuleResource() { } - public virtual Azure.ResourceManager.Datadog.MonitoringTagRuleData Data { get { throw null; } } + protected DataMonitoringTagRuleResource() { } + public virtual Azure.ResourceManager.Datadog.DataMonitoringTagRuleData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.Datadog.MonitoringTagRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.MonitoringTagRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.MonitoringTagRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.MonitoringTagRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.Datadog.DataMonitoringTagRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.DataMonitoringTagRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.DataMonitoringTagRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.DataMonitoringTagRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.Datadog.Mocking @@ -192,50 +251,72 @@ namespace Azure.ResourceManager.Datadog.Mocking public partial class MockableDatadogArmClient : Azure.ResourceManager.ArmResource { protected MockableDatadogArmClient() { } + public virtual Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionResource GetDatadogMonitoredSubscriptionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Datadog.DatadogMonitorResource GetDatadogMonitorResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Datadog.DatadogSingleSignOnResource GetDatadogSingleSignOnResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.Datadog.MonitoringTagRuleResource GetMonitoringTagRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.Datadog.DataMonitoringTagRuleResource GetDataMonitoringTagRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableDatadogResourceGroupResource : Azure.ResourceManager.ArmResource { protected MockableDatadogResourceGroupResource() { } - public virtual Azure.Response GetDatadogMonitorResource(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDatadogMonitorResourceAsync(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.Datadog.DatadogMonitorResourceCollection GetDatadogMonitorResources() { throw null; } + public virtual Azure.Response GetDatadogMonitor(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDatadogMonitorAsync(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Datadog.DatadogMonitorCollection GetDatadogMonitors() { throw null; } } public partial class MockableDatadogSubscriptionResource : Azure.ResourceManager.ArmResource { protected MockableDatadogSubscriptionResource() { } - public virtual Azure.Response CreateOrUpdateMarketplaceAgreement(Azure.ResourceManager.Datadog.Models.DatadogAgreementResourceProperties body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateMarketplaceAgreementAsync(Azure.ResourceManager.Datadog.Models.DatadogAgreementResourceProperties body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetDatadogMonitorResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetDatadogMonitorResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetMarketplaceAgreements(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetMarketplaceAgreementsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateOrUpdateMarketplaceAgreement(Azure.ResourceManager.Datadog.Models.DatadogAgreement body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateMarketplaceAgreementAsync(Azure.ResourceManager.Datadog.Models.DatadogAgreement body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDatadogMonitors(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDatadogMonitorsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetMarketplaceAgreements(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetMarketplaceAgreementsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSubscriptionStatus(string datadogOrganizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSubscriptionStatusAsync(string datadogOrganizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSubscriptionStatuses(string datadogOrganizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSubscriptionStatusesAsync(string datadogOrganizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.Datadog.Models { public static partial class ArmDatadogModelFactory { - public static Azure.ResourceManager.Datadog.Models.DatadogAgreementResourceProperties DatadogAgreementResourceProperties(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Datadog.Models.DatadogAgreementProperties properties = null) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogAgreement DatadogAgreement(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Datadog.Models.DatadogAgreementProperties properties = null) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogBillingInfoResult DatadogBillingInfoResult(Azure.ResourceManager.Datadog.Models.MarketplaceSaaSInfo marketplaceSaasInfo = null, Azure.ResourceManager.Datadog.Models.PartnerBillingEntity partnerBillingEntity = null) { throw null; } public static Azure.ResourceManager.Datadog.Models.DatadogHost DatadogHost(string name = null, System.Collections.Generic.IEnumerable aliases = null, System.Collections.Generic.IEnumerable apps = null, Azure.ResourceManager.Datadog.Models.DatadogHostMetadata meta = null) { throw null; } public static Azure.ResourceManager.Datadog.Models.DatadogHostMetadata DatadogHostMetadata(string agentVersion = null, Azure.ResourceManager.Datadog.Models.DatadogInstallMethod installMethod = null, string logsAgentTransport = null) { throw null; } public static Azure.ResourceManager.Datadog.Models.DatadogInstallMethod DatadogInstallMethod(string tool = null, string toolVersion = null, string installerVersion = null) { throw null; } - public static Azure.ResourceManager.Datadog.DatadogMonitorResourceData DatadogMonitorResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string skuName = null, Azure.ResourceManager.Datadog.Models.MonitorProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.Datadog.Models.DatadogOrganizationProperties DatadogOrganizationProperties(string name = null, string id = null, string linkingAuthCode = null, string linkingClientId = null, System.Uri redirectUri = null, string apiKey = null, string applicationKey = null, string enterpriseAppId = null) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogLinkedResourceResult DatadogLinkedResourceResult(Azure.Core.ResourceIdentifier id = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?)) { throw null; } + public static Azure.ResourceManager.Datadog.DatadogMonitorData DatadogMonitorData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Datadog.Models.DatadogMonitorProperties properties = null, string skuName = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogMonitoredResourceResult DatadogMonitoredResourceResult(Azure.Core.ResourceIdentifier id = null, bool? isSendingMetricsEnabled = default(bool?), string reasonForMetricsStatus = null, bool? isSendingLogsEnabled = default(bool?), string reasonForLogsStatus = null) { throw null; } + public static Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionData DatadogMonitoredSubscriptionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Datadog.Models.DatadogSubscriptionProperties properties = null) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogMonitorProperties DatadogMonitorProperties(Azure.ResourceManager.Datadog.Models.DatadogProvisioningState? provisioningState = default(Azure.ResourceManager.Datadog.Models.DatadogProvisioningState?), Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus? monitoringStatus = default(Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus?), Azure.ResourceManager.Datadog.Models.MarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = default(Azure.ResourceManager.Datadog.Models.MarketplaceSubscriptionStatus?), Azure.ResourceManager.Datadog.Models.DatadogOrganizationProperties datadogOrganizationProperties = null, Azure.ResourceManager.Datadog.Models.DatadogUserInfo userInfo = null, Azure.ResourceManager.Datadog.Models.DatadogLiftrResourceCategory? liftrResourceCategory = default(Azure.ResourceManager.Datadog.Models.DatadogLiftrResourceCategory?), int? liftrResourcePreference = default(int?)) { throw null; } public static Azure.ResourceManager.Datadog.Models.DatadogSetPasswordLink DatadogSetPasswordLink(string setPasswordLink = null) { throw null; } - public static Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnProperties DatadogSingleSignOnProperties(Azure.ResourceManager.Datadog.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.Datadog.Models.ProvisioningState?), Azure.ResourceManager.Datadog.Models.SingleSignOnState? singleSignOnState = default(Azure.ResourceManager.Datadog.Models.SingleSignOnState?), string enterpriseAppId = null, System.Uri singleSignOnUri = null) { throw null; } - public static Azure.ResourceManager.Datadog.DatadogSingleSignOnResourceData DatadogSingleSignOnResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnProperties properties = null) { throw null; } - public static Azure.ResourceManager.Datadog.Models.MonitoredResourceContent MonitoredResourceContent(string id = null, bool? sendingMetrics = default(bool?), string reasonForMetricsStatus = null, bool? sendingLogs = default(bool?), string reasonForLogsStatus = null) { throw null; } - public static Azure.ResourceManager.Datadog.MonitoringTagRuleData MonitoringTagRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Datadog.Models.MonitoringTagRulesProperties properties = null) { throw null; } - public static Azure.ResourceManager.Datadog.Models.MonitoringTagRulesProperties MonitoringTagRulesProperties(Azure.ResourceManager.Datadog.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.Datadog.Models.ProvisioningState?), Azure.ResourceManager.Datadog.Models.LogRules logRules = null, System.Collections.Generic.IEnumerable metricRulesFilteringTags = null) { throw null; } - public static Azure.ResourceManager.Datadog.Models.MonitorProperties MonitorProperties(Azure.ResourceManager.Datadog.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.Datadog.Models.ProvisioningState?), Azure.ResourceManager.Datadog.Models.MonitoringStatus? monitoringStatus = default(Azure.ResourceManager.Datadog.Models.MonitoringStatus?), Azure.ResourceManager.Datadog.Models.MarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = default(Azure.ResourceManager.Datadog.Models.MarketplaceSubscriptionStatus?), Azure.ResourceManager.Datadog.Models.DatadogOrganizationProperties datadogOrganizationProperties = null, Azure.ResourceManager.Datadog.Models.UserInfo userInfo = null, Azure.ResourceManager.Datadog.Models.LiftrResourceCategory? liftrResourceCategory = default(Azure.ResourceManager.Datadog.Models.LiftrResourceCategory?), int? liftrResourcePreference = default(int?)) { throw null; } + public static Azure.ResourceManager.Datadog.DatadogSingleSignOnData DatadogSingleSignOnData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnProperties properties = null) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnProperties DatadogSingleSignOnProperties(Azure.ResourceManager.Datadog.Models.DatadogProvisioningState? provisioningState = default(Azure.ResourceManager.Datadog.Models.DatadogProvisioningState?), Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState? singleSignOnState = default(Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState?), string enterpriseAppId = null, System.Uri singleSignOnUri = null) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogSubscriptionStatusProperties DatadogSubscriptionStatusProperties(string name = null, bool? isCreationSupported = default(bool?)) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogSubscriptionStatusResult DatadogSubscriptionStatusResult(Azure.ResourceManager.Datadog.Models.DatadogSubscriptionStatusProperties properties = null) { throw null; } + public static Azure.ResourceManager.Datadog.DataMonitoringTagRuleData DataMonitoringTagRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Datadog.Models.MonitoringTagRuleProperties properties = null) { throw null; } + public static Azure.ResourceManager.Datadog.Models.MarketplaceSaaSInfo MarketplaceSaaSInfo(string marketplaceSubscriptionId = null, string marketplaceName = null, string marketplaceStatus = null, string billedAzureSubscriptionId = null, bool? isSubscribed = default(bool?)) { throw null; } + public static Azure.ResourceManager.Datadog.Models.MonitoringTagRuleProperties MonitoringTagRuleProperties(Azure.ResourceManager.Datadog.Models.DatadogProvisioningState? provisioningState = default(Azure.ResourceManager.Datadog.Models.DatadogProvisioningState?), Azure.ResourceManager.Datadog.Models.DatadogMonitorLogRules logRules = null, System.Collections.Generic.IEnumerable metricRulesFilteringTags = null, Azure.ResourceManager.Datadog.Models.DatadogMonitorAgentRules agentRules = null, bool? isAutomutingEnabled = default(bool?), bool? isCustomMetricsEnabled = default(bool?)) { throw null; } + public static Azure.ResourceManager.Datadog.Models.PartnerBillingEntity PartnerBillingEntity(string id = null, string name = null, System.Uri partnerEntityUri = null) { throw null; } + } + public partial class DatadogAgreement : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogAgreement() { } + public Azure.ResourceManager.Datadog.Models.DatadogAgreementProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogAgreement System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogAgreement System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } public partial class DatadogAgreementProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DatadogAgreementProperties() { } - public bool? Accepted { get { throw null; } set { } } + public bool? IsAccepted { get { throw null; } set { } } public string LicenseTextLink { get { throw null; } set { } } public string Plan { get { throw null; } set { } } public string PrivacyPolicyLink { get { throw null; } set { } } @@ -250,17 +331,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class DatadogAgreementResourceProperties : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public DatadogAgreementResourceProperties() { } - public Azure.ResourceManager.Datadog.Models.DatadogAgreementProperties Properties { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.DatadogAgreementResourceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.DatadogAgreementResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class DatadogApiKey : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DatadogApiKey(string key) { } @@ -275,6 +345,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DatadogBillingInfoResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DatadogBillingInfoResult() { } + public Azure.ResourceManager.Datadog.Models.MarketplaceSaaSInfo MarketplaceSaasInfo { get { throw null; } } + public Azure.ResourceManager.Datadog.Models.PartnerBillingEntity PartnerBillingEntity { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogBillingInfoResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogBillingInfoResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DatadogHost : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal DatadogHost() { } @@ -315,18 +397,223 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class DatadogMonitorResourcePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DatadogLiftrResourceCategory : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DatadogLiftrResourceCategory(string value) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogLiftrResourceCategory MonitorLogs { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogLiftrResourceCategory Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.Datadog.Models.DatadogLiftrResourceCategory other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Datadog.Models.DatadogLiftrResourceCategory left, Azure.ResourceManager.Datadog.Models.DatadogLiftrResourceCategory right) { throw null; } + public static implicit operator Azure.ResourceManager.Datadog.Models.DatadogLiftrResourceCategory (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Datadog.Models.DatadogLiftrResourceCategory left, Azure.ResourceManager.Datadog.Models.DatadogLiftrResourceCategory right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DatadogLinkedResourceResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DatadogLinkedResourceResult() { } + public Azure.Core.ResourceIdentifier Id { get { throw null; } } + public Azure.Core.AzureLocation? Location { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogLinkedResourceResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogLinkedResourceResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogMonitorAgentRules : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogMonitorAgentRules() { } + public System.Collections.Generic.IList FilteringTags { get { throw null; } } + public bool? IsAgentMonitoringEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitorAgentRules System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitorAgentRules System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogMonitoredResourceResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DatadogMonitoredResourceResult() { } + public Azure.Core.ResourceIdentifier Id { get { throw null; } } + public bool? IsSendingLogsEnabled { get { throw null; } } + public bool? IsSendingMetricsEnabled { get { throw null; } } + public string ReasonForLogsStatus { get { throw null; } } + public string ReasonForMetricsStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitoredResourceResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitoredResourceResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogMonitoredSubscriptionItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogMonitoredSubscriptionItem() { } + public string Error { get { throw null; } set { } } + public Azure.ResourceManager.Datadog.Models.DatadogMonitorStatus? Status { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } set { } } + public Azure.ResourceManager.Datadog.Models.MonitoringTagRuleProperties TagRules { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitoredSubscriptionItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitoredSubscriptionItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogMonitorFilteringTag : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogMonitorFilteringTag() { } + public Azure.ResourceManager.Datadog.Models.DatadogMonitorTagAction? Action { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitorFilteringTag System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitorFilteringTag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DatadogMonitoringStatus : System.IEquatable { - public DatadogMonitorResourcePatch() { } - public Azure.ResourceManager.Datadog.Models.MonitoringStatus? MonitorUpdateMonitoringStatus { get { throw null; } set { } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DatadogMonitoringStatus(string value) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus left, Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus left, Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DatadogMonitorLogRules : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogMonitorLogRules() { } + public System.Collections.Generic.IList FilteringTags { get { throw null; } } + public bool? IsAadLogsSent { get { throw null; } set { } } + public bool? IsResourceLogsSent { get { throw null; } set { } } + public bool? IsSubscriptionLogsSent { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitorLogRules System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitorLogRules System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogMonitorPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogMonitorPatch() { } + public Azure.ResourceManager.Datadog.Models.DatadogMonitorResourcePatchProperties Properties { get { throw null; } set { } } public string SkuName { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.DatadogMonitorResourcePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.DatadogMonitorResourcePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.Datadog.Models.DatadogMonitorPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitorPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogMonitorProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogMonitorProperties() { } + public Azure.ResourceManager.Datadog.Models.DatadogOrganizationProperties DatadogOrganizationProperties { get { throw null; } set { } } + public Azure.ResourceManager.Datadog.Models.DatadogLiftrResourceCategory? LiftrResourceCategory { get { throw null; } } + public int? LiftrResourcePreference { get { throw null; } } + public Azure.ResourceManager.Datadog.Models.MarketplaceSubscriptionStatus? MarketplaceSubscriptionStatus { get { throw null; } } + public Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus? MonitoringStatus { get { throw null; } set { } } + public Azure.ResourceManager.Datadog.Models.DatadogProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.Datadog.Models.DatadogUserInfo UserInfo { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitorProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitorProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogMonitorResourcePatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogMonitorResourcePatchProperties() { } + public bool? IsCspm { get { throw null; } set { } } + public bool? IsResourceCollection { get { throw null; } set { } } + public Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus? MonitoringStatus { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitorResourcePatchProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitorResourcePatchProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DatadogMonitorStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DatadogMonitorStatus(string value) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogMonitorStatus Active { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogMonitorStatus Deleting { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogMonitorStatus Failed { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogMonitorStatus InProgress { get { throw null; } } + public bool Equals(Azure.ResourceManager.Datadog.Models.DatadogMonitorStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Datadog.Models.DatadogMonitorStatus left, Azure.ResourceManager.Datadog.Models.DatadogMonitorStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.Datadog.Models.DatadogMonitorStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Datadog.Models.DatadogMonitorStatus left, Azure.ResourceManager.Datadog.Models.DatadogMonitorStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DatadogMonitorTagAction : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DatadogMonitorTagAction(string value) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogMonitorTagAction Exclude { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogMonitorTagAction Include { get { throw null; } } + public bool Equals(Azure.ResourceManager.Datadog.Models.DatadogMonitorTagAction other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Datadog.Models.DatadogMonitorTagAction left, Azure.ResourceManager.Datadog.Models.DatadogMonitorTagAction right) { throw null; } + public static implicit operator Azure.ResourceManager.Datadog.Models.DatadogMonitorTagAction (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Datadog.Models.DatadogMonitorTagAction left, Azure.ResourceManager.Datadog.Models.DatadogMonitorTagAction right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DatadogOperation : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DatadogOperation(string value) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogOperation Active { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogOperation AddBegin { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogOperation AddComplete { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogOperation DeleteBegin { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogOperation DeleteComplete { get { throw null; } } + public bool Equals(Azure.ResourceManager.Datadog.Models.DatadogOperation other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Datadog.Models.DatadogOperation left, Azure.ResourceManager.Datadog.Models.DatadogOperation right) { throw null; } + public static implicit operator Azure.ResourceManager.Datadog.Models.DatadogOperation (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Datadog.Models.DatadogOperation left, Azure.ResourceManager.Datadog.Models.DatadogOperation right) { throw null; } + public override string ToString() { throw null; } } public partial class DatadogOrganizationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -334,10 +621,12 @@ public DatadogOrganizationProperties() { } public string ApiKey { get { throw null; } set { } } public string ApplicationKey { get { throw null; } set { } } public string EnterpriseAppId { get { throw null; } set { } } - public string Id { get { throw null; } } + public string Id { get { throw null; } set { } } + public bool? IsCspm { get { throw null; } set { } } + public bool? IsResourceCollection { get { throw null; } set { } } public string LinkingAuthCode { get { throw null; } set { } } public string LinkingClientId { get { throw null; } set { } } - public string Name { get { throw null; } } + public string Name { get { throw null; } set { } } public System.Uri RedirectUri { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Datadog.Models.DatadogOrganizationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -346,6 +635,31 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DatadogProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DatadogProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogProvisioningState Deleted { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogProvisioningState NotSpecified { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.Datadog.Models.DatadogProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Datadog.Models.DatadogProvisioningState left, Azure.ResourceManager.Datadog.Models.DatadogProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.Datadog.Models.DatadogProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Datadog.Models.DatadogProvisioningState left, Azure.ResourceManager.Datadog.Models.DatadogProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } public partial class DatadogSetPasswordLink : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal DatadogSetPasswordLink() { } @@ -361,8 +675,8 @@ public partial class DatadogSingleSignOnProperties : System.ClientModel.Primitiv { public DatadogSingleSignOnProperties() { } public string EnterpriseAppId { get { throw null; } set { } } - public Azure.ResourceManager.Datadog.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.Datadog.Models.SingleSignOnState? SingleSignOnState { get { throw null; } set { } } + public Azure.ResourceManager.Datadog.Models.DatadogProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState? SingleSignOnState { get { throw null; } set { } } public System.Uri SingleSignOnUri { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -371,50 +685,88 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class FilteringTag : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public FilteringTag() { } - public Azure.ResourceManager.Datadog.Models.TagAction? Action { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public string Value { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.FilteringTag System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.FilteringTag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct LiftrResourceCategory : System.IEquatable + public readonly partial struct DatadogSingleSignOnState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public LiftrResourceCategory(string value) { throw null; } - public static Azure.ResourceManager.Datadog.Models.LiftrResourceCategory MonitorLogs { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.LiftrResourceCategory Unknown { get { throw null; } } - public bool Equals(Azure.ResourceManager.Datadog.Models.LiftrResourceCategory other) { throw null; } + public DatadogSingleSignOnState(string value) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState Disable { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState Enable { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState Existing { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState Initial { get { throw null; } } + public bool Equals(Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.Datadog.Models.LiftrResourceCategory left, Azure.ResourceManager.Datadog.Models.LiftrResourceCategory right) { throw null; } - public static implicit operator Azure.ResourceManager.Datadog.Models.LiftrResourceCategory (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Datadog.Models.LiftrResourceCategory left, Azure.ResourceManager.Datadog.Models.LiftrResourceCategory right) { throw null; } + public static bool operator ==(Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState left, Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState right) { throw null; } + public static implicit operator Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState left, Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState right) { throw null; } public override string ToString() { throw null; } } - public partial class LogRules : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DatadogSubscriptionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogSubscriptionProperties() { } + public System.Collections.Generic.IList MonitoredSubscriptionList { get { throw null; } } + public Azure.ResourceManager.Datadog.Models.DatadogOperation? Operation { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogSubscriptionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogSubscriptionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogSubscriptionStatusProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DatadogSubscriptionStatusProperties() { } + public bool? IsCreationSupported { get { throw null; } } + public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogSubscriptionStatusProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogSubscriptionStatusProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogSubscriptionStatusResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public LogRules() { } - public System.Collections.Generic.IList FilteringTags { get { throw null; } } - public bool? SendAadLogs { get { throw null; } set { } } - public bool? SendResourceLogs { get { throw null; } set { } } - public bool? SendSubscriptionLogs { get { throw null; } set { } } + internal DatadogSubscriptionStatusResult() { } + public Azure.ResourceManager.Datadog.Models.DatadogSubscriptionStatusProperties Properties { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.LogRules System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.LogRules System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.Datadog.Models.DatadogSubscriptionStatusResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogSubscriptionStatusResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogUserInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogUserInfo() { } + public string EmailAddress { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string PhoneNumber { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogUserInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogUserInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MarketplaceSaaSInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal MarketplaceSaaSInfo() { } + public string BilledAzureSubscriptionId { get { throw null; } } + public bool? IsSubscribed { get { throw null; } } + public string MarketplaceName { get { throw null; } } + public string MarketplaceStatus { get { throw null; } } + public string MarketplaceSubscriptionId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.MarketplaceSaaSInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.MarketplaceSaaSInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MarketplaceSubscriptionStatus : System.IEquatable @@ -436,143 +788,46 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Datadog.Models.MarketplaceSubscriptionStatus left, Azure.ResourceManager.Datadog.Models.MarketplaceSubscriptionStatus right) { throw null; } public override string ToString() { throw null; } } - public partial class MonitoredResourceContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class MonitoringTagRuleProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal MonitoredResourceContent() { } - public string Id { get { throw null; } } - public string ReasonForLogsStatus { get { throw null; } } - public string ReasonForMetricsStatus { get { throw null; } } - public bool? SendingLogs { get { throw null; } } - public bool? SendingMetrics { get { throw null; } } + public MonitoringTagRuleProperties() { } + public Azure.ResourceManager.Datadog.Models.DatadogMonitorAgentRules AgentRules { get { throw null; } set { } } + public bool? IsAutomutingEnabled { get { throw null; } set { } } + public bool? IsCustomMetricsEnabled { get { throw null; } set { } } + public Azure.ResourceManager.Datadog.Models.DatadogMonitorLogRules LogRules { get { throw null; } set { } } + public System.Collections.Generic.IList MetricRulesFilteringTags { get { throw null; } } + public Azure.ResourceManager.Datadog.Models.DatadogProvisioningState? ProvisioningState { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.MonitoredResourceContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.MonitoredResourceContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct MonitoringStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public MonitoringStatus(string value) { throw null; } - public static Azure.ResourceManager.Datadog.Models.MonitoringStatus Disabled { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.MonitoringStatus Enabled { get { throw null; } } - public bool Equals(Azure.ResourceManager.Datadog.Models.MonitoringStatus other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.Datadog.Models.MonitoringStatus left, Azure.ResourceManager.Datadog.Models.MonitoringStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.Datadog.Models.MonitoringStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Datadog.Models.MonitoringStatus left, Azure.ResourceManager.Datadog.Models.MonitoringStatus right) { throw null; } - public override string ToString() { throw null; } + Azure.ResourceManager.Datadog.Models.MonitoringTagRuleProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.MonitoringTagRuleProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class MonitoringTagRulesProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class PartnerBillingEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public MonitoringTagRulesProperties() { } - public Azure.ResourceManager.Datadog.Models.LogRules LogRules { get { throw null; } set { } } - public System.Collections.Generic.IList MetricRulesFilteringTags { get { throw null; } } - public Azure.ResourceManager.Datadog.Models.ProvisioningState? ProvisioningState { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.MonitoringTagRulesProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.MonitoringTagRulesProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MonitorProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MonitorProperties() { } - public Azure.ResourceManager.Datadog.Models.DatadogOrganizationProperties DatadogOrganizationProperties { get { throw null; } set { } } - public Azure.ResourceManager.Datadog.Models.LiftrResourceCategory? LiftrResourceCategory { get { throw null; } } - public int? LiftrResourcePreference { get { throw null; } } - public Azure.ResourceManager.Datadog.Models.MarketplaceSubscriptionStatus? MarketplaceSubscriptionStatus { get { throw null; } } - public Azure.ResourceManager.Datadog.Models.MonitoringStatus? MonitoringStatus { get { throw null; } set { } } - public Azure.ResourceManager.Datadog.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.Datadog.Models.UserInfo UserInfo { get { throw null; } set { } } + internal PartnerBillingEntity() { } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public System.Uri PartnerEntityUri { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.MonitorProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.MonitorProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.Datadog.Models.PartnerBillingEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.PartnerBillingEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ProvisioningState : System.IEquatable + public partial class ResubscribeOrganizationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.Datadog.Models.ProvisioningState Accepted { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.ProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.ProvisioningState Creating { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.ProvisioningState Deleted { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.ProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.ProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.ProvisioningState NotSpecified { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.ProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.ProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.Datadog.Models.ProvisioningState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.Datadog.Models.ProvisioningState left, Azure.ResourceManager.Datadog.Models.ProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.Datadog.Models.ProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Datadog.Models.ProvisioningState left, Azure.ResourceManager.Datadog.Models.ProvisioningState right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SingleSignOnState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public SingleSignOnState(string value) { throw null; } - public static Azure.ResourceManager.Datadog.Models.SingleSignOnState Disable { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.SingleSignOnState Enable { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.SingleSignOnState Existing { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.SingleSignOnState Initial { get { throw null; } } - public bool Equals(Azure.ResourceManager.Datadog.Models.SingleSignOnState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.Datadog.Models.SingleSignOnState left, Azure.ResourceManager.Datadog.Models.SingleSignOnState right) { throw null; } - public static implicit operator Azure.ResourceManager.Datadog.Models.SingleSignOnState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Datadog.Models.SingleSignOnState left, Azure.ResourceManager.Datadog.Models.SingleSignOnState right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct TagAction : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public TagAction(string value) { throw null; } - public static Azure.ResourceManager.Datadog.Models.TagAction Exclude { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.TagAction Include { get { throw null; } } - public bool Equals(Azure.ResourceManager.Datadog.Models.TagAction other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.Datadog.Models.TagAction left, Azure.ResourceManager.Datadog.Models.TagAction right) { throw null; } - public static implicit operator Azure.ResourceManager.Datadog.Models.TagAction (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Datadog.Models.TagAction left, Azure.ResourceManager.Datadog.Models.TagAction right) { throw null; } - public override string ToString() { throw null; } - } - public partial class UserInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public UserInfo() { } - public string EmailAddress { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public string PhoneNumber { get { throw null; } set { } } + public ResubscribeOrganizationContent() { } + public string AzureSubscriptionId { get { throw null; } set { } } + public string ResourceGroup { get { throw null; } set { } } + public string SkuName { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.UserInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.UserInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.Datadog.Models.ResubscribeOrganizationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.ResubscribeOrganizationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/api/Azure.ResourceManager.Datadog.netstandard2.0.cs b/sdk/datadog/Azure.ResourceManager.Datadog/api/Azure.ResourceManager.Datadog.netstandard2.0.cs index e99d54eb3c19..2bb90cfa5cab 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/api/Azure.ResourceManager.Datadog.netstandard2.0.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/api/Azure.ResourceManager.Datadog.netstandard2.0.cs @@ -8,24 +8,106 @@ internal AzureResourceManagerDatadogContext() { } } public static partial class DatadogExtensions { - public static Azure.Response CreateOrUpdateMarketplaceAgreement(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Datadog.Models.DatadogAgreementResourceProperties body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> CreateOrUpdateMarketplaceAgreementAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Datadog.Models.DatadogAgreementResourceProperties body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response CreateOrUpdateMarketplaceAgreement(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Datadog.Models.DatadogAgreement body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CreateOrUpdateMarketplaceAgreementAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Datadog.Models.DatadogAgreement body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetDatadogMonitor(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetDatadogMonitorAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionResource GetDatadogMonitoredSubscriptionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Datadog.DatadogMonitorResource GetDatadogMonitorResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Response GetDatadogMonitorResource(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetDatadogMonitorResourceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.Datadog.DatadogMonitorResourceCollection GetDatadogMonitorResources(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetDatadogMonitorResources(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetDatadogMonitorResourcesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.Datadog.DatadogMonitorCollection GetDatadogMonitors(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetDatadogMonitors(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetDatadogMonitorsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Datadog.DatadogSingleSignOnResource GetDatadogSingleSignOnResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Pageable GetMarketplaceAgreements(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetMarketplaceAgreementsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.Datadog.MonitoringTagRuleResource GetMonitoringTagRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Datadog.DataMonitoringTagRuleResource GetDataMonitoringTagRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Pageable GetMarketplaceAgreements(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetMarketplaceAgreementsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetSubscriptionStatus(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string datadogOrganizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetSubscriptionStatusAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string datadogOrganizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetSubscriptionStatuses(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string datadogOrganizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetSubscriptionStatusesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string datadogOrganizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DatadogMonitorCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DatadogMonitorCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string monitorName, Azure.ResourceManager.Datadog.DatadogMonitorData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string monitorName, Azure.ResourceManager.Datadog.DatadogMonitorData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class DatadogMonitorResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DatadogMonitorData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogMonitorData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.Datadog.Models.DatadogMonitorProperties Properties { get { throw null; } set { } } + public string SkuName { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.DatadogMonitorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.DatadogMonitorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogMonitoredSubscriptionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DatadogMonitoredSubscriptionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string configurationName, Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string configurationName, Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DatadogMonitoredSubscriptionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogMonitoredSubscriptionData() { } + public Azure.ResourceManager.Datadog.Models.DatadogSubscriptionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogMonitoredSubscriptionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DatadogMonitoredSubscriptionResource() { } + public virtual Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string monitorName, string configurationName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DatadogMonitorResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; protected DatadogMonitorResource() { } - public virtual Azure.ResourceManager.Datadog.DatadogMonitorResourceData Data { get { throw null; } } + public virtual Azure.ResourceManager.Datadog.DatadogMonitorData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -36,88 +118,48 @@ protected DatadogMonitorResource() { } public virtual Azure.Pageable GetApiKeys(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetApiKeysAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetDatadogSingleSignOnResource(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDatadogSingleSignOnResourceAsync(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.Datadog.DatadogSingleSignOnResourceCollection GetDatadogSingleSignOnResources() { throw null; } + public virtual Azure.Response GetBillingInfo(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBillingInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDatadogMonitoredSubscription(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDatadogMonitoredSubscriptionAsync(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionCollection GetDatadogMonitoredSubscriptions() { throw null; } + public virtual Azure.Response GetDatadogSingleSignOn(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDatadogSingleSignOnAsync(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Datadog.DatadogSingleSignOnCollection GetDatadogSingleSignOns() { throw null; } + public virtual Azure.Response GetDataMonitoringTagRule(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataMonitoringTagRuleAsync(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Datadog.DataMonitoringTagRuleCollection GetDataMonitoringTagRules() { throw null; } public virtual Azure.Response GetDefaultKey(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDefaultKeyAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetHosts(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetHostsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetLinkedResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetLinkedResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetMonitoredResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetMonitoredResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetMonitoringTagRule(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetMonitoringTagRuleAsync(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.Datadog.MonitoringTagRuleCollection GetMonitoringTagRules() { throw null; } + public virtual Azure.Pageable GetLinkedResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetLinkedResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetMonitoredResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetMonitoredResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RefreshSetPasswordLink(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RefreshSetPasswordLinkAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ResubscribeOrganization(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.Models.ResubscribeOrganizationContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ResubscribeOrganizationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.Models.ResubscribeOrganizationContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetDefaultKey(Azure.ResourceManager.Datadog.Models.DatadogApiKey body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task SetDefaultKeyAsync(Azure.ResourceManager.Datadog.Models.DatadogApiKey body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.Datadog.DatadogMonitorResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.DatadogMonitorResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.Models.DatadogMonitorResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.Models.DatadogMonitorResourcePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class DatadogMonitorResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected DatadogMonitorResourceCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string monitorName, Azure.ResourceManager.Datadog.DatadogMonitorResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string monitorName, Azure.ResourceManager.Datadog.DatadogMonitorResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class DatadogMonitorResourceData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public DatadogMonitorResourceData(Azure.Core.AzureLocation location) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.ResourceManager.Datadog.Models.MonitorProperties Properties { get { throw null; } set { } } - public string SkuName { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.DatadogMonitorResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.DatadogMonitorResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class DatadogSingleSignOnResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected DatadogSingleSignOnResource() { } - public virtual Azure.ResourceManager.Datadog.DatadogSingleSignOnResourceData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string monitorName, string configurationName) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.Datadog.DatadogSingleSignOnResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.DatadogSingleSignOnResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.DatadogSingleSignOnResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.DatadogSingleSignOnResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class DatadogSingleSignOnResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected DatadogSingleSignOnResourceCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string configurationName, Azure.ResourceManager.Datadog.DatadogSingleSignOnResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string configurationName, Azure.ResourceManager.Datadog.DatadogSingleSignOnResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.Datadog.DatadogMonitorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.DatadogMonitorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.Models.DatadogMonitorPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.Models.DatadogMonitorPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DatadogSingleSignOnCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DatadogSingleSignOnCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string configurationName, Azure.ResourceManager.Datadog.DatadogSingleSignOnData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string configurationName, Azure.ResourceManager.Datadog.DatadogSingleSignOnData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string configurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -130,61 +172,78 @@ protected DatadogSingleSignOnResourceCollection() { } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class DatadogSingleSignOnResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DatadogSingleSignOnData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public DatadogSingleSignOnResourceData() { } + public DatadogSingleSignOnData() { } public Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.DatadogSingleSignOnResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.DatadogSingleSignOnResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.Datadog.DatadogSingleSignOnData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.DatadogSingleSignOnData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class MonitoringTagRuleCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class DatadogSingleSignOnResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - protected MonitoringTagRuleCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string ruleSetName, Azure.ResourceManager.Datadog.MonitoringTagRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string ruleSetName, Azure.ResourceManager.Datadog.MonitoringTagRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static readonly Azure.Core.ResourceType ResourceType; + protected DatadogSingleSignOnResource() { } + public virtual Azure.ResourceManager.Datadog.DatadogSingleSignOnData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string monitorName, string configurationName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.Datadog.DatadogSingleSignOnData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.DatadogSingleSignOnData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.DatadogSingleSignOnData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.DatadogSingleSignOnData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataMonitoringTagRuleCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataMonitoringTagRuleCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string ruleSetName, Azure.ResourceManager.Datadog.DataMonitoringTagRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string ruleSetName, Azure.ResourceManager.Datadog.DataMonitoringTagRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + public virtual Azure.Response Get(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string ruleSetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class MonitoringTagRuleData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DataMonitoringTagRuleData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public MonitoringTagRuleData() { } - public Azure.ResourceManager.Datadog.Models.MonitoringTagRulesProperties Properties { get { throw null; } set { } } + public DataMonitoringTagRuleData() { } + public Azure.ResourceManager.Datadog.Models.MonitoringTagRuleProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.MonitoringTagRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.MonitoringTagRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.Datadog.DataMonitoringTagRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.DataMonitoringTagRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class MonitoringTagRuleResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DataMonitoringTagRuleResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; - protected MonitoringTagRuleResource() { } - public virtual Azure.ResourceManager.Datadog.MonitoringTagRuleData Data { get { throw null; } } + protected DataMonitoringTagRuleResource() { } + public virtual Azure.ResourceManager.Datadog.DataMonitoringTagRuleData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.Datadog.MonitoringTagRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.MonitoringTagRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.MonitoringTagRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.MonitoringTagRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.Datadog.DataMonitoringTagRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.DataMonitoringTagRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.DataMonitoringTagRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Datadog.DataMonitoringTagRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.Datadog.Mocking @@ -192,50 +251,72 @@ namespace Azure.ResourceManager.Datadog.Mocking public partial class MockableDatadogArmClient : Azure.ResourceManager.ArmResource { protected MockableDatadogArmClient() { } + public virtual Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionResource GetDatadogMonitoredSubscriptionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Datadog.DatadogMonitorResource GetDatadogMonitorResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Datadog.DatadogSingleSignOnResource GetDatadogSingleSignOnResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.Datadog.MonitoringTagRuleResource GetMonitoringTagRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.Datadog.DataMonitoringTagRuleResource GetDataMonitoringTagRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableDatadogResourceGroupResource : Azure.ResourceManager.ArmResource { protected MockableDatadogResourceGroupResource() { } - public virtual Azure.Response GetDatadogMonitorResource(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDatadogMonitorResourceAsync(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.Datadog.DatadogMonitorResourceCollection GetDatadogMonitorResources() { throw null; } + public virtual Azure.Response GetDatadogMonitor(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDatadogMonitorAsync(string monitorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Datadog.DatadogMonitorCollection GetDatadogMonitors() { throw null; } } public partial class MockableDatadogSubscriptionResource : Azure.ResourceManager.ArmResource { protected MockableDatadogSubscriptionResource() { } - public virtual Azure.Response CreateOrUpdateMarketplaceAgreement(Azure.ResourceManager.Datadog.Models.DatadogAgreementResourceProperties body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateMarketplaceAgreementAsync(Azure.ResourceManager.Datadog.Models.DatadogAgreementResourceProperties body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetDatadogMonitorResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetDatadogMonitorResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetMarketplaceAgreements(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetMarketplaceAgreementsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateOrUpdateMarketplaceAgreement(Azure.ResourceManager.Datadog.Models.DatadogAgreement body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateMarketplaceAgreementAsync(Azure.ResourceManager.Datadog.Models.DatadogAgreement body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDatadogMonitors(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDatadogMonitorsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetMarketplaceAgreements(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetMarketplaceAgreementsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSubscriptionStatus(string datadogOrganizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSubscriptionStatusAsync(string datadogOrganizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSubscriptionStatuses(string datadogOrganizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSubscriptionStatusesAsync(string datadogOrganizationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.Datadog.Models { public static partial class ArmDatadogModelFactory { - public static Azure.ResourceManager.Datadog.Models.DatadogAgreementResourceProperties DatadogAgreementResourceProperties(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Datadog.Models.DatadogAgreementProperties properties = null) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogAgreement DatadogAgreement(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Datadog.Models.DatadogAgreementProperties properties = null) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogBillingInfoResult DatadogBillingInfoResult(Azure.ResourceManager.Datadog.Models.MarketplaceSaaSInfo marketplaceSaasInfo = null, Azure.ResourceManager.Datadog.Models.PartnerBillingEntity partnerBillingEntity = null) { throw null; } public static Azure.ResourceManager.Datadog.Models.DatadogHost DatadogHost(string name = null, System.Collections.Generic.IEnumerable aliases = null, System.Collections.Generic.IEnumerable apps = null, Azure.ResourceManager.Datadog.Models.DatadogHostMetadata meta = null) { throw null; } public static Azure.ResourceManager.Datadog.Models.DatadogHostMetadata DatadogHostMetadata(string agentVersion = null, Azure.ResourceManager.Datadog.Models.DatadogInstallMethod installMethod = null, string logsAgentTransport = null) { throw null; } public static Azure.ResourceManager.Datadog.Models.DatadogInstallMethod DatadogInstallMethod(string tool = null, string toolVersion = null, string installerVersion = null) { throw null; } - public static Azure.ResourceManager.Datadog.DatadogMonitorResourceData DatadogMonitorResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string skuName = null, Azure.ResourceManager.Datadog.Models.MonitorProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.Datadog.Models.DatadogOrganizationProperties DatadogOrganizationProperties(string name = null, string id = null, string linkingAuthCode = null, string linkingClientId = null, System.Uri redirectUri = null, string apiKey = null, string applicationKey = null, string enterpriseAppId = null) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogLinkedResourceResult DatadogLinkedResourceResult(Azure.Core.ResourceIdentifier id = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?)) { throw null; } + public static Azure.ResourceManager.Datadog.DatadogMonitorData DatadogMonitorData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Datadog.Models.DatadogMonitorProperties properties = null, string skuName = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogMonitoredResourceResult DatadogMonitoredResourceResult(Azure.Core.ResourceIdentifier id = null, bool? isSendingMetricsEnabled = default(bool?), string reasonForMetricsStatus = null, bool? isSendingLogsEnabled = default(bool?), string reasonForLogsStatus = null) { throw null; } + public static Azure.ResourceManager.Datadog.DatadogMonitoredSubscriptionData DatadogMonitoredSubscriptionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Datadog.Models.DatadogSubscriptionProperties properties = null) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogMonitorProperties DatadogMonitorProperties(Azure.ResourceManager.Datadog.Models.DatadogProvisioningState? provisioningState = default(Azure.ResourceManager.Datadog.Models.DatadogProvisioningState?), Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus? monitoringStatus = default(Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus?), Azure.ResourceManager.Datadog.Models.MarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = default(Azure.ResourceManager.Datadog.Models.MarketplaceSubscriptionStatus?), Azure.ResourceManager.Datadog.Models.DatadogOrganizationProperties datadogOrganizationProperties = null, Azure.ResourceManager.Datadog.Models.DatadogUserInfo userInfo = null, Azure.ResourceManager.Datadog.Models.DatadogLiftrResourceCategory? liftrResourceCategory = default(Azure.ResourceManager.Datadog.Models.DatadogLiftrResourceCategory?), int? liftrResourcePreference = default(int?)) { throw null; } public static Azure.ResourceManager.Datadog.Models.DatadogSetPasswordLink DatadogSetPasswordLink(string setPasswordLink = null) { throw null; } - public static Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnProperties DatadogSingleSignOnProperties(Azure.ResourceManager.Datadog.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.Datadog.Models.ProvisioningState?), Azure.ResourceManager.Datadog.Models.SingleSignOnState? singleSignOnState = default(Azure.ResourceManager.Datadog.Models.SingleSignOnState?), string enterpriseAppId = null, System.Uri singleSignOnUri = null) { throw null; } - public static Azure.ResourceManager.Datadog.DatadogSingleSignOnResourceData DatadogSingleSignOnResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnProperties properties = null) { throw null; } - public static Azure.ResourceManager.Datadog.Models.MonitoredResourceContent MonitoredResourceContent(string id = null, bool? sendingMetrics = default(bool?), string reasonForMetricsStatus = null, bool? sendingLogs = default(bool?), string reasonForLogsStatus = null) { throw null; } - public static Azure.ResourceManager.Datadog.MonitoringTagRuleData MonitoringTagRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Datadog.Models.MonitoringTagRulesProperties properties = null) { throw null; } - public static Azure.ResourceManager.Datadog.Models.MonitoringTagRulesProperties MonitoringTagRulesProperties(Azure.ResourceManager.Datadog.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.Datadog.Models.ProvisioningState?), Azure.ResourceManager.Datadog.Models.LogRules logRules = null, System.Collections.Generic.IEnumerable metricRulesFilteringTags = null) { throw null; } - public static Azure.ResourceManager.Datadog.Models.MonitorProperties MonitorProperties(Azure.ResourceManager.Datadog.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.Datadog.Models.ProvisioningState?), Azure.ResourceManager.Datadog.Models.MonitoringStatus? monitoringStatus = default(Azure.ResourceManager.Datadog.Models.MonitoringStatus?), Azure.ResourceManager.Datadog.Models.MarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = default(Azure.ResourceManager.Datadog.Models.MarketplaceSubscriptionStatus?), Azure.ResourceManager.Datadog.Models.DatadogOrganizationProperties datadogOrganizationProperties = null, Azure.ResourceManager.Datadog.Models.UserInfo userInfo = null, Azure.ResourceManager.Datadog.Models.LiftrResourceCategory? liftrResourceCategory = default(Azure.ResourceManager.Datadog.Models.LiftrResourceCategory?), int? liftrResourcePreference = default(int?)) { throw null; } + public static Azure.ResourceManager.Datadog.DatadogSingleSignOnData DatadogSingleSignOnData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnProperties properties = null) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnProperties DatadogSingleSignOnProperties(Azure.ResourceManager.Datadog.Models.DatadogProvisioningState? provisioningState = default(Azure.ResourceManager.Datadog.Models.DatadogProvisioningState?), Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState? singleSignOnState = default(Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState?), string enterpriseAppId = null, System.Uri singleSignOnUri = null) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogSubscriptionStatusProperties DatadogSubscriptionStatusProperties(string name = null, bool? isCreationSupported = default(bool?)) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogSubscriptionStatusResult DatadogSubscriptionStatusResult(Azure.ResourceManager.Datadog.Models.DatadogSubscriptionStatusProperties properties = null) { throw null; } + public static Azure.ResourceManager.Datadog.DataMonitoringTagRuleData DataMonitoringTagRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Datadog.Models.MonitoringTagRuleProperties properties = null) { throw null; } + public static Azure.ResourceManager.Datadog.Models.MarketplaceSaaSInfo MarketplaceSaaSInfo(string marketplaceSubscriptionId = null, string marketplaceName = null, string marketplaceStatus = null, string billedAzureSubscriptionId = null, bool? isSubscribed = default(bool?)) { throw null; } + public static Azure.ResourceManager.Datadog.Models.MonitoringTagRuleProperties MonitoringTagRuleProperties(Azure.ResourceManager.Datadog.Models.DatadogProvisioningState? provisioningState = default(Azure.ResourceManager.Datadog.Models.DatadogProvisioningState?), Azure.ResourceManager.Datadog.Models.DatadogMonitorLogRules logRules = null, System.Collections.Generic.IEnumerable metricRulesFilteringTags = null, Azure.ResourceManager.Datadog.Models.DatadogMonitorAgentRules agentRules = null, bool? isAutomutingEnabled = default(bool?), bool? isCustomMetricsEnabled = default(bool?)) { throw null; } + public static Azure.ResourceManager.Datadog.Models.PartnerBillingEntity PartnerBillingEntity(string id = null, string name = null, System.Uri partnerEntityUri = null) { throw null; } + } + public partial class DatadogAgreement : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogAgreement() { } + public Azure.ResourceManager.Datadog.Models.DatadogAgreementProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogAgreement System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogAgreement System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } public partial class DatadogAgreementProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DatadogAgreementProperties() { } - public bool? Accepted { get { throw null; } set { } } + public bool? IsAccepted { get { throw null; } set { } } public string LicenseTextLink { get { throw null; } set { } } public string Plan { get { throw null; } set { } } public string PrivacyPolicyLink { get { throw null; } set { } } @@ -250,17 +331,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class DatadogAgreementResourceProperties : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public DatadogAgreementResourceProperties() { } - public Azure.ResourceManager.Datadog.Models.DatadogAgreementProperties Properties { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.DatadogAgreementResourceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.DatadogAgreementResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class DatadogApiKey : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DatadogApiKey(string key) { } @@ -275,6 +345,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DatadogBillingInfoResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DatadogBillingInfoResult() { } + public Azure.ResourceManager.Datadog.Models.MarketplaceSaaSInfo MarketplaceSaasInfo { get { throw null; } } + public Azure.ResourceManager.Datadog.Models.PartnerBillingEntity PartnerBillingEntity { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogBillingInfoResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogBillingInfoResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DatadogHost : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal DatadogHost() { } @@ -315,18 +397,223 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class DatadogMonitorResourcePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DatadogLiftrResourceCategory : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DatadogLiftrResourceCategory(string value) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogLiftrResourceCategory MonitorLogs { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogLiftrResourceCategory Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.Datadog.Models.DatadogLiftrResourceCategory other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Datadog.Models.DatadogLiftrResourceCategory left, Azure.ResourceManager.Datadog.Models.DatadogLiftrResourceCategory right) { throw null; } + public static implicit operator Azure.ResourceManager.Datadog.Models.DatadogLiftrResourceCategory (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Datadog.Models.DatadogLiftrResourceCategory left, Azure.ResourceManager.Datadog.Models.DatadogLiftrResourceCategory right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DatadogLinkedResourceResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DatadogLinkedResourceResult() { } + public Azure.Core.ResourceIdentifier Id { get { throw null; } } + public Azure.Core.AzureLocation? Location { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogLinkedResourceResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogLinkedResourceResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogMonitorAgentRules : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogMonitorAgentRules() { } + public System.Collections.Generic.IList FilteringTags { get { throw null; } } + public bool? IsAgentMonitoringEnabled { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitorAgentRules System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitorAgentRules System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogMonitoredResourceResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DatadogMonitoredResourceResult() { } + public Azure.Core.ResourceIdentifier Id { get { throw null; } } + public bool? IsSendingLogsEnabled { get { throw null; } } + public bool? IsSendingMetricsEnabled { get { throw null; } } + public string ReasonForLogsStatus { get { throw null; } } + public string ReasonForMetricsStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitoredResourceResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitoredResourceResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogMonitoredSubscriptionItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogMonitoredSubscriptionItem() { } + public string Error { get { throw null; } set { } } + public Azure.ResourceManager.Datadog.Models.DatadogMonitorStatus? Status { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } set { } } + public Azure.ResourceManager.Datadog.Models.MonitoringTagRuleProperties TagRules { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitoredSubscriptionItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitoredSubscriptionItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogMonitorFilteringTag : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogMonitorFilteringTag() { } + public Azure.ResourceManager.Datadog.Models.DatadogMonitorTagAction? Action { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitorFilteringTag System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitorFilteringTag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DatadogMonitoringStatus : System.IEquatable { - public DatadogMonitorResourcePatch() { } - public Azure.ResourceManager.Datadog.Models.MonitoringStatus? MonitorUpdateMonitoringStatus { get { throw null; } set { } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DatadogMonitoringStatus(string value) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus left, Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus left, Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DatadogMonitorLogRules : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogMonitorLogRules() { } + public System.Collections.Generic.IList FilteringTags { get { throw null; } } + public bool? IsAadLogsSent { get { throw null; } set { } } + public bool? IsResourceLogsSent { get { throw null; } set { } } + public bool? IsSubscriptionLogsSent { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitorLogRules System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitorLogRules System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogMonitorPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogMonitorPatch() { } + public Azure.ResourceManager.Datadog.Models.DatadogMonitorResourcePatchProperties Properties { get { throw null; } set { } } public string SkuName { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.DatadogMonitorResourcePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.DatadogMonitorResourcePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.Datadog.Models.DatadogMonitorPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitorPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogMonitorProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogMonitorProperties() { } + public Azure.ResourceManager.Datadog.Models.DatadogOrganizationProperties DatadogOrganizationProperties { get { throw null; } set { } } + public Azure.ResourceManager.Datadog.Models.DatadogLiftrResourceCategory? LiftrResourceCategory { get { throw null; } } + public int? LiftrResourcePreference { get { throw null; } } + public Azure.ResourceManager.Datadog.Models.MarketplaceSubscriptionStatus? MarketplaceSubscriptionStatus { get { throw null; } } + public Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus? MonitoringStatus { get { throw null; } set { } } + public Azure.ResourceManager.Datadog.Models.DatadogProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.Datadog.Models.DatadogUserInfo UserInfo { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitorProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitorProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogMonitorResourcePatchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogMonitorResourcePatchProperties() { } + public bool? IsCspm { get { throw null; } set { } } + public bool? IsResourceCollection { get { throw null; } set { } } + public Azure.ResourceManager.Datadog.Models.DatadogMonitoringStatus? MonitoringStatus { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitorResourcePatchProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogMonitorResourcePatchProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DatadogMonitorStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DatadogMonitorStatus(string value) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogMonitorStatus Active { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogMonitorStatus Deleting { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogMonitorStatus Failed { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogMonitorStatus InProgress { get { throw null; } } + public bool Equals(Azure.ResourceManager.Datadog.Models.DatadogMonitorStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Datadog.Models.DatadogMonitorStatus left, Azure.ResourceManager.Datadog.Models.DatadogMonitorStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.Datadog.Models.DatadogMonitorStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Datadog.Models.DatadogMonitorStatus left, Azure.ResourceManager.Datadog.Models.DatadogMonitorStatus right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DatadogMonitorTagAction : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DatadogMonitorTagAction(string value) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogMonitorTagAction Exclude { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogMonitorTagAction Include { get { throw null; } } + public bool Equals(Azure.ResourceManager.Datadog.Models.DatadogMonitorTagAction other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Datadog.Models.DatadogMonitorTagAction left, Azure.ResourceManager.Datadog.Models.DatadogMonitorTagAction right) { throw null; } + public static implicit operator Azure.ResourceManager.Datadog.Models.DatadogMonitorTagAction (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Datadog.Models.DatadogMonitorTagAction left, Azure.ResourceManager.Datadog.Models.DatadogMonitorTagAction right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DatadogOperation : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DatadogOperation(string value) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogOperation Active { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogOperation AddBegin { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogOperation AddComplete { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogOperation DeleteBegin { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogOperation DeleteComplete { get { throw null; } } + public bool Equals(Azure.ResourceManager.Datadog.Models.DatadogOperation other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Datadog.Models.DatadogOperation left, Azure.ResourceManager.Datadog.Models.DatadogOperation right) { throw null; } + public static implicit operator Azure.ResourceManager.Datadog.Models.DatadogOperation (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Datadog.Models.DatadogOperation left, Azure.ResourceManager.Datadog.Models.DatadogOperation right) { throw null; } + public override string ToString() { throw null; } } public partial class DatadogOrganizationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -334,10 +621,12 @@ public DatadogOrganizationProperties() { } public string ApiKey { get { throw null; } set { } } public string ApplicationKey { get { throw null; } set { } } public string EnterpriseAppId { get { throw null; } set { } } - public string Id { get { throw null; } } + public string Id { get { throw null; } set { } } + public bool? IsCspm { get { throw null; } set { } } + public bool? IsResourceCollection { get { throw null; } set { } } public string LinkingAuthCode { get { throw null; } set { } } public string LinkingClientId { get { throw null; } set { } } - public string Name { get { throw null; } } + public string Name { get { throw null; } set { } } public System.Uri RedirectUri { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Datadog.Models.DatadogOrganizationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -346,6 +635,31 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DatadogProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DatadogProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogProvisioningState Deleted { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogProvisioningState NotSpecified { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.Datadog.Models.DatadogProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Datadog.Models.DatadogProvisioningState left, Azure.ResourceManager.Datadog.Models.DatadogProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.Datadog.Models.DatadogProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Datadog.Models.DatadogProvisioningState left, Azure.ResourceManager.Datadog.Models.DatadogProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } public partial class DatadogSetPasswordLink : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal DatadogSetPasswordLink() { } @@ -361,8 +675,8 @@ public partial class DatadogSingleSignOnProperties : System.ClientModel.Primitiv { public DatadogSingleSignOnProperties() { } public string EnterpriseAppId { get { throw null; } set { } } - public Azure.ResourceManager.Datadog.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.Datadog.Models.SingleSignOnState? SingleSignOnState { get { throw null; } set { } } + public Azure.ResourceManager.Datadog.Models.DatadogProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState? SingleSignOnState { get { throw null; } set { } } public System.Uri SingleSignOnUri { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -371,50 +685,88 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class FilteringTag : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public FilteringTag() { } - public Azure.ResourceManager.Datadog.Models.TagAction? Action { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public string Value { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.FilteringTag System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.FilteringTag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct LiftrResourceCategory : System.IEquatable + public readonly partial struct DatadogSingleSignOnState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public LiftrResourceCategory(string value) { throw null; } - public static Azure.ResourceManager.Datadog.Models.LiftrResourceCategory MonitorLogs { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.LiftrResourceCategory Unknown { get { throw null; } } - public bool Equals(Azure.ResourceManager.Datadog.Models.LiftrResourceCategory other) { throw null; } + public DatadogSingleSignOnState(string value) { throw null; } + public static Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState Disable { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState Enable { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState Existing { get { throw null; } } + public static Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState Initial { get { throw null; } } + public bool Equals(Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.Datadog.Models.LiftrResourceCategory left, Azure.ResourceManager.Datadog.Models.LiftrResourceCategory right) { throw null; } - public static implicit operator Azure.ResourceManager.Datadog.Models.LiftrResourceCategory (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Datadog.Models.LiftrResourceCategory left, Azure.ResourceManager.Datadog.Models.LiftrResourceCategory right) { throw null; } + public static bool operator ==(Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState left, Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState right) { throw null; } + public static implicit operator Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState left, Azure.ResourceManager.Datadog.Models.DatadogSingleSignOnState right) { throw null; } public override string ToString() { throw null; } } - public partial class LogRules : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DatadogSubscriptionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogSubscriptionProperties() { } + public System.Collections.Generic.IList MonitoredSubscriptionList { get { throw null; } } + public Azure.ResourceManager.Datadog.Models.DatadogOperation? Operation { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogSubscriptionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogSubscriptionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogSubscriptionStatusProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DatadogSubscriptionStatusProperties() { } + public bool? IsCreationSupported { get { throw null; } } + public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogSubscriptionStatusProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogSubscriptionStatusProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogSubscriptionStatusResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public LogRules() { } - public System.Collections.Generic.IList FilteringTags { get { throw null; } } - public bool? SendAadLogs { get { throw null; } set { } } - public bool? SendResourceLogs { get { throw null; } set { } } - public bool? SendSubscriptionLogs { get { throw null; } set { } } + internal DatadogSubscriptionStatusResult() { } + public Azure.ResourceManager.Datadog.Models.DatadogSubscriptionStatusProperties Properties { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.LogRules System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.LogRules System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.Datadog.Models.DatadogSubscriptionStatusResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogSubscriptionStatusResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatadogUserInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatadogUserInfo() { } + public string EmailAddress { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string PhoneNumber { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogUserInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.DatadogUserInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MarketplaceSaaSInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal MarketplaceSaaSInfo() { } + public string BilledAzureSubscriptionId { get { throw null; } } + public bool? IsSubscribed { get { throw null; } } + public string MarketplaceName { get { throw null; } } + public string MarketplaceStatus { get { throw null; } } + public string MarketplaceSubscriptionId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.MarketplaceSaaSInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.MarketplaceSaaSInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MarketplaceSubscriptionStatus : System.IEquatable @@ -436,143 +788,46 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Datadog.Models.MarketplaceSubscriptionStatus left, Azure.ResourceManager.Datadog.Models.MarketplaceSubscriptionStatus right) { throw null; } public override string ToString() { throw null; } } - public partial class MonitoredResourceContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class MonitoringTagRuleProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal MonitoredResourceContent() { } - public string Id { get { throw null; } } - public string ReasonForLogsStatus { get { throw null; } } - public string ReasonForMetricsStatus { get { throw null; } } - public bool? SendingLogs { get { throw null; } } - public bool? SendingMetrics { get { throw null; } } + public MonitoringTagRuleProperties() { } + public Azure.ResourceManager.Datadog.Models.DatadogMonitorAgentRules AgentRules { get { throw null; } set { } } + public bool? IsAutomutingEnabled { get { throw null; } set { } } + public bool? IsCustomMetricsEnabled { get { throw null; } set { } } + public Azure.ResourceManager.Datadog.Models.DatadogMonitorLogRules LogRules { get { throw null; } set { } } + public System.Collections.Generic.IList MetricRulesFilteringTags { get { throw null; } } + public Azure.ResourceManager.Datadog.Models.DatadogProvisioningState? ProvisioningState { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.MonitoredResourceContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.MonitoredResourceContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct MonitoringStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public MonitoringStatus(string value) { throw null; } - public static Azure.ResourceManager.Datadog.Models.MonitoringStatus Disabled { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.MonitoringStatus Enabled { get { throw null; } } - public bool Equals(Azure.ResourceManager.Datadog.Models.MonitoringStatus other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.Datadog.Models.MonitoringStatus left, Azure.ResourceManager.Datadog.Models.MonitoringStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.Datadog.Models.MonitoringStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Datadog.Models.MonitoringStatus left, Azure.ResourceManager.Datadog.Models.MonitoringStatus right) { throw null; } - public override string ToString() { throw null; } + Azure.ResourceManager.Datadog.Models.MonitoringTagRuleProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.MonitoringTagRuleProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class MonitoringTagRulesProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class PartnerBillingEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public MonitoringTagRulesProperties() { } - public Azure.ResourceManager.Datadog.Models.LogRules LogRules { get { throw null; } set { } } - public System.Collections.Generic.IList MetricRulesFilteringTags { get { throw null; } } - public Azure.ResourceManager.Datadog.Models.ProvisioningState? ProvisioningState { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.MonitoringTagRulesProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.MonitoringTagRulesProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MonitorProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MonitorProperties() { } - public Azure.ResourceManager.Datadog.Models.DatadogOrganizationProperties DatadogOrganizationProperties { get { throw null; } set { } } - public Azure.ResourceManager.Datadog.Models.LiftrResourceCategory? LiftrResourceCategory { get { throw null; } } - public int? LiftrResourcePreference { get { throw null; } } - public Azure.ResourceManager.Datadog.Models.MarketplaceSubscriptionStatus? MarketplaceSubscriptionStatus { get { throw null; } } - public Azure.ResourceManager.Datadog.Models.MonitoringStatus? MonitoringStatus { get { throw null; } set { } } - public Azure.ResourceManager.Datadog.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.Datadog.Models.UserInfo UserInfo { get { throw null; } set { } } + internal PartnerBillingEntity() { } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public System.Uri PartnerEntityUri { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.MonitorProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.MonitorProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.Datadog.Models.PartnerBillingEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.PartnerBillingEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ProvisioningState : System.IEquatable + public partial class ResubscribeOrganizationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.Datadog.Models.ProvisioningState Accepted { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.ProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.ProvisioningState Creating { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.ProvisioningState Deleted { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.ProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.ProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.ProvisioningState NotSpecified { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.ProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.ProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.Datadog.Models.ProvisioningState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.Datadog.Models.ProvisioningState left, Azure.ResourceManager.Datadog.Models.ProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.Datadog.Models.ProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Datadog.Models.ProvisioningState left, Azure.ResourceManager.Datadog.Models.ProvisioningState right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SingleSignOnState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public SingleSignOnState(string value) { throw null; } - public static Azure.ResourceManager.Datadog.Models.SingleSignOnState Disable { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.SingleSignOnState Enable { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.SingleSignOnState Existing { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.SingleSignOnState Initial { get { throw null; } } - public bool Equals(Azure.ResourceManager.Datadog.Models.SingleSignOnState other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.Datadog.Models.SingleSignOnState left, Azure.ResourceManager.Datadog.Models.SingleSignOnState right) { throw null; } - public static implicit operator Azure.ResourceManager.Datadog.Models.SingleSignOnState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Datadog.Models.SingleSignOnState left, Azure.ResourceManager.Datadog.Models.SingleSignOnState right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct TagAction : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public TagAction(string value) { throw null; } - public static Azure.ResourceManager.Datadog.Models.TagAction Exclude { get { throw null; } } - public static Azure.ResourceManager.Datadog.Models.TagAction Include { get { throw null; } } - public bool Equals(Azure.ResourceManager.Datadog.Models.TagAction other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.Datadog.Models.TagAction left, Azure.ResourceManager.Datadog.Models.TagAction right) { throw null; } - public static implicit operator Azure.ResourceManager.Datadog.Models.TagAction (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Datadog.Models.TagAction left, Azure.ResourceManager.Datadog.Models.TagAction right) { throw null; } - public override string ToString() { throw null; } - } - public partial class UserInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public UserInfo() { } - public string EmailAddress { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public string PhoneNumber { get { throw null; } set { } } + public ResubscribeOrganizationContent() { } + public string AzureSubscriptionId { get { throw null; } set { } } + public string ResourceGroup { get { throw null; } set { } } + public string SkuName { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.UserInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.Datadog.Models.UserInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.Datadog.Models.ResubscribeOrganizationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Datadog.Models.ResubscribeOrganizationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Azure.ResourceManager.Datadog.csproj b/sdk/datadog/Azure.ResourceManager.Datadog/src/Azure.ResourceManager.Datadog.csproj index 1690fce238b0..a07636d6e9c7 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Azure.ResourceManager.Datadog.csproj +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Azure.ResourceManager.Datadog.csproj @@ -1,6 +1,6 @@ - 1.0.0-beta.7 + 1.0.0 Azure.ResourceManager.Datadog Microsoft Azure Resource Manager client SDK for Azure resource provider Microsoft.Datadog. azure;management;arm;resource manager;datadog diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/ArmDatadogModelFactory.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/ArmDatadogModelFactory.cs index ec461eb700bc..891afea22832 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/ArmDatadogModelFactory.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/ArmDatadogModelFactory.cs @@ -16,16 +16,16 @@ namespace Azure.ResourceManager.Datadog.Models /// Model factory for models. public static partial class ArmDatadogModelFactory { - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// Represents the properties of the resource. - /// A new instance for mocking. - public static DatadogAgreementResourceProperties DatadogAgreementResourceProperties(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DatadogAgreementProperties properties = null) + /// A new instance for mocking. + public static DatadogAgreement DatadogAgreement(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DatadogAgreementProperties properties = null) { - return new DatadogAgreementResourceProperties( + return new DatadogAgreement( id, name, resourceType, @@ -34,9 +34,113 @@ public static DatadogAgreementResourceProperties DatadogAgreementResourcePropert serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Properties specific to the monitor resource. + /// + /// Gets or sets the identity. Current supported identity types: SystemAssigned, UserAssigned. + /// A new instance for mocking. + public static DatadogMonitorData DatadogMonitorData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DatadogMonitorProperties properties = null, string skuName = null, ManagedServiceIdentity identity = null) + { + tags ??= new Dictionary(); + + return new DatadogMonitorData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + skuName != null ? new DatadogSku(skuName, serializedAdditionalRawData: null) : null, + identity, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// Flag specifying if the resource monitoring is enabled or disabled. + /// Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state. + /// Specify the Datadog organization name. In the case of linking to existing organizations, Id, ApiKey, and Applicationkey is required as well. + /// Includes name, email and optionally, phone number. User Information can't be null. + /// + /// The priority of the resource. + /// A new instance for mocking. + public static DatadogMonitorProperties DatadogMonitorProperties(DatadogProvisioningState? provisioningState = null, DatadogMonitoringStatus? monitoringStatus = null, MarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = null, DatadogOrganizationProperties datadogOrganizationProperties = null, DatadogUserInfo userInfo = null, DatadogLiftrResourceCategory? liftrResourceCategory = null, int? liftrResourcePreference = null) + { + return new DatadogMonitorProperties( + provisioningState, + monitoringStatus, + marketplaceSubscriptionStatus, + datadogOrganizationProperties, + userInfo, + liftrResourceCategory, + liftrResourcePreference, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Represents the properties of the resource. + /// A new instance for mocking. + public static DatadogSubscriptionStatusResult DatadogSubscriptionStatusResult(DatadogSubscriptionStatusProperties properties = null) + { + return new DatadogSubscriptionStatusResult(properties, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The ARM id of the subscription. + /// Indicates if selected subscription supports Datadog resource creation, if not it is already being monitored for the selected organization via multi subscription feature. + /// A new instance for mocking. + public static DatadogSubscriptionStatusProperties DatadogSubscriptionStatusProperties(string name = null, bool? isCreationSupported = null) + { + return new DatadogSubscriptionStatusProperties(name, isCreationSupported, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Marketplace Subscription details. + /// Partner Billing Entity details: Organization Info. + /// A new instance for mocking. + public static DatadogBillingInfoResult DatadogBillingInfoResult(MarketplaceSaaSInfo marketplaceSaasInfo = null, PartnerBillingEntity partnerBillingEntity = null) + { + return new DatadogBillingInfoResult(marketplaceSaasInfo, partnerBillingEntity, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Marketplace Subscription Id. This is a GUID-formatted string. + /// Marketplace Subscription Details: SAAS Name. + /// Marketplace Subscription Details: SaaS Subscription Status. + /// The Azure Subscription ID to which the Marketplace Subscription belongs and gets billed into. + /// Flag specifying if the Marketplace status is subscribed or not. + /// A new instance for mocking. + public static MarketplaceSaaSInfo MarketplaceSaaSInfo(string marketplaceSubscriptionId = null, string marketplaceName = null, string marketplaceStatus = null, string billedAzureSubscriptionId = null, bool? isSubscribed = null) + { + return new MarketplaceSaaSInfo( + marketplaceSubscriptionId, + marketplaceName, + marketplaceStatus, + billedAzureSubscriptionId, + isSubscribed, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The Datadog Organization Id. + /// The Datadog Organization Name. + /// Link to the datadog organization page. + /// A new instance for mocking. + public static PartnerBillingEntity PartnerBillingEntity(string id = null, string name = null, Uri partnerEntityUri = null) + { + return new PartnerBillingEntity(id, name, partnerEntityUri, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The name of the host. - /// The aliases for the host. + /// The aliases for the host installed via the Datadog agent. /// The Datadog integrations reporting metrics for the host. /// /// A new instance for mocking. @@ -68,95 +172,70 @@ public static DatadogInstallMethod DatadogInstallMethod(string tool = null, stri return new DatadogInstallMethod(tool, toolVersion, installerVersion, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// The ARM id of the linked resource. + /// The location of the linked resource. + /// A new instance for mocking. + public static DatadogLinkedResourceResult DatadogLinkedResourceResult(ResourceIdentifier id = null, AzureLocation? location = null) + { + return new DatadogLinkedResourceResult(id, location, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . /// The ARM id of the resource. - /// Flag indicating if resource is sending metrics to Datadog. + /// 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. + /// Flag indicating if resource is sending logs to Datadog. /// Reason for why the resource is sending logs (or why it is not sending). - /// A new instance for mocking. - public static MonitoredResourceContent MonitoredResourceContent(string id = null, bool? sendingMetrics = null, string reasonForMetricsStatus = null, bool? sendingLogs = null, string reasonForLogsStatus = null) + /// A new instance for mocking. + public static DatadogMonitoredResourceResult DatadogMonitoredResourceResult(ResourceIdentifier id = null, bool? isSendingMetricsEnabled = null, string reasonForMetricsStatus = null, bool? isSendingLogsEnabled = null, string reasonForLogsStatus = null) { - return new MonitoredResourceContent( + return new DatadogMonitoredResourceResult( id, - sendingMetrics, + isSendingMetricsEnabled, reasonForMetricsStatus, - sendingLogs, + isSendingLogsEnabled, reasonForLogsStatus, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The tags. - /// The location. - /// - /// Properties specific to the monitor resource. - /// Gets or sets the identity. Current supported identity types: SystemAssigned, UserAssigned. - /// A new instance for mocking. - public static DatadogMonitorResourceData DatadogMonitorResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string skuName = null, MonitorProperties properties = null, ManagedServiceIdentity identity = null) + /// The request to update subscriptions needed to be monitored by the Datadog monitor resource. + /// A new instance for mocking. + public static DatadogMonitoredSubscriptionData DatadogMonitoredSubscriptionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DatadogSubscriptionProperties properties = null) { - tags ??= new Dictionary(); - - return new DatadogMonitorResourceData( + return new DatadogMonitoredSubscriptionData( id, name, resourceType, systemData, - tags, - location, - skuName != null ? new ResourceSku(skuName, serializedAdditionalRawData: null) : null, properties, - identity, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// - /// Flag specifying if the resource monitoring is enabled or disabled. - /// Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state. - /// Datadog organization properties. - /// User info. - /// - /// The priority of the resource. - /// A new instance for mocking. - public static MonitorProperties MonitorProperties(ProvisioningState? provisioningState = null, MonitoringStatus? monitoringStatus = null, MarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = null, DatadogOrganizationProperties datadogOrganizationProperties = null, UserInfo userInfo = null, LiftrResourceCategory? liftrResourceCategory = null, int? liftrResourcePreference = null) + /// Set of rules for sending logs for the Monitor resource. + /// Set of rules for sending metrics for the Monitor resource. + /// Set of rules for managing agents for the Monitor resource. + /// Configuration to enable/disable auto-muting flag. + /// Configuration to enable/disable custom metrics. If enabled, custom metrics from app insights will be sent. + /// A new instance for mocking. + public static MonitoringTagRuleProperties MonitoringTagRuleProperties(DatadogProvisioningState? provisioningState = null, DatadogMonitorLogRules logRules = null, IEnumerable metricRulesFilteringTags = null, DatadogMonitorAgentRules agentRules = null, bool? isAutomutingEnabled = null, bool? isCustomMetricsEnabled = null) { - return new MonitorProperties( - provisioningState, - monitoringStatus, - marketplaceSubscriptionStatus, - datadogOrganizationProperties, - userInfo, - liftrResourceCategory, - liftrResourcePreference, - serializedAdditionalRawData: null); - } + metricRulesFilteringTags ??= new List(); - /// Initializes a new instance of . - /// 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 redirect uri for linking. - /// Api key associated to the Datadog organization. - /// Application key associated to the Datadog organization. - /// The Id of the Enterprise App used for Single sign on. - /// A new instance for mocking. - public static DatadogOrganizationProperties DatadogOrganizationProperties(string name = null, string id = null, string linkingAuthCode = null, string linkingClientId = null, Uri redirectUri = null, string apiKey = null, string applicationKey = null, string enterpriseAppId = null) - { - return new DatadogOrganizationProperties( - name, - id, - linkingAuthCode, - linkingClientId, - redirectUri, - apiKey, - applicationKey, - enterpriseAppId, + return new MonitoringTagRuleProperties( + provisioningState, + logRules, + metricRulesFilteringTags != null ? new DatadogMonitorMetricRules(metricRulesFilteringTags?.ToList(), serializedAdditionalRawData: null) : null, + agentRules, + isAutomutingEnabled, + isCustomMetricsEnabled, serializedAdditionalRawData: null); } @@ -168,16 +247,16 @@ public static DatadogSetPasswordLink DatadogSetPasswordLink(string setPasswordLi return new DatadogSetPasswordLink(setPasswordLink, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Definition of the properties for a TagRules resource. - /// A new instance for mocking. - public static MonitoringTagRuleData MonitoringTagRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MonitoringTagRulesProperties properties = null) + /// + /// A new instance for mocking. + public static DatadogSingleSignOnData DatadogSingleSignOnData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DatadogSingleSignOnProperties properties = null) { - return new MonitoringTagRuleData( + return new DatadogSingleSignOnData( id, name, resourceType, @@ -186,28 +265,27 @@ public static MonitoringTagRuleData MonitoringTagRuleData(ResourceIdentifier id serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// - /// Set of rules for sending logs for the Monitor resource. - /// Set of rules for sending metrics for the Monitor resource. - /// A new instance for mocking. - public static MonitoringTagRulesProperties MonitoringTagRulesProperties(ProvisioningState? provisioningState = null, LogRules logRules = null, IEnumerable metricRulesFilteringTags = null) + /// Various states of the SSO resource. + /// The Id of the Enterprise App used for Single sign-on. + /// The login URL specific to this Datadog Organization. + /// A new instance for mocking. + public static DatadogSingleSignOnProperties DatadogSingleSignOnProperties(DatadogProvisioningState? provisioningState = null, DatadogSingleSignOnState? singleSignOnState = null, string enterpriseAppId = null, Uri singleSignOnUri = null) { - metricRulesFilteringTags ??= new List(); - - return new MonitoringTagRulesProperties(provisioningState, logRules, metricRulesFilteringTags != null ? new MetricRules(metricRulesFilteringTags?.ToList(), serializedAdditionalRawData: null) : null, serializedAdditionalRawData: null); + return new DatadogSingleSignOnProperties(provisioningState, singleSignOnState, enterpriseAppId, singleSignOnUri, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// - /// A new instance for mocking. - public static DatadogSingleSignOnResourceData DatadogSingleSignOnResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DatadogSingleSignOnProperties properties = null) + /// Definition of the properties for a TagRules resource. + /// A new instance for mocking. + public static DataMonitoringTagRuleData DataMonitoringTagRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MonitoringTagRuleProperties properties = null) { - return new DatadogSingleSignOnResourceData( + return new DataMonitoringTagRuleData( id, name, resourceType, @@ -215,16 +293,5 @@ public static DatadogSingleSignOnResourceData DatadogSingleSignOnResourceData(Re properties, serializedAdditionalRawData: null); } - - /// Initializes a new instance of . - /// - /// Various states of the SSO resource. - /// The Id of the Enterprise App used for Single sign-on. - /// The login URL specific to this Datadog Organization. - /// A new instance for mocking. - public static DatadogSingleSignOnProperties DatadogSingleSignOnProperties(ProvisioningState? provisioningState = null, SingleSignOnState? singleSignOnState = null, string enterpriseAppId = null, Uri singleSignOnUri = null) - { - return new DatadogSingleSignOnProperties(provisioningState, singleSignOnState, enterpriseAppId, singleSignOnUri, serializedAdditionalRawData: null); - } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/MonitoringTagRuleCollection.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DataMonitoringTagRuleCollection.cs similarity index 63% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/MonitoringTagRuleCollection.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DataMonitoringTagRuleCollection.cs index 8f7017c0cc50..338c2c9f5c8f 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/MonitoringTagRuleCollection.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DataMonitoringTagRuleCollection.cs @@ -18,28 +18,28 @@ namespace Azure.ResourceManager.Datadog { /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetMonitoringTagRules method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataMonitoringTagRules method from an instance of . /// - public partial class MonitoringTagRuleCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class DataMonitoringTagRuleCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _monitoringTagRuleTagRulesClientDiagnostics; - private readonly TagRulesRestOperations _monitoringTagRuleTagRulesRestClient; + private readonly ClientDiagnostics _dataMonitoringTagRuleTagRulesClientDiagnostics; + private readonly TagRulesRestOperations _dataMonitoringTagRuleTagRulesRestClient; - /// Initializes a new instance of the class for mocking. - protected MonitoringTagRuleCollection() + /// Initializes a new instance of the class for mocking. + protected DataMonitoringTagRuleCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal MonitoringTagRuleCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataMonitoringTagRuleCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _monitoringTagRuleTagRulesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Datadog", MonitoringTagRuleResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(MonitoringTagRuleResource.ResourceType, out string monitoringTagRuleTagRulesApiVersion); - _monitoringTagRuleTagRulesRestClient = new TagRulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, monitoringTagRuleTagRulesApiVersion); + _dataMonitoringTagRuleTagRulesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Datadog", DataMonitoringTagRuleResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataMonitoringTagRuleResource.ResourceType, out string dataMonitoringTagRuleTagRulesApiVersion); + _dataMonitoringTagRuleTagRulesRestClient = new TagRulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataMonitoringTagRuleTagRulesApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -64,33 +64,33 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource - /// + /// /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Rule set name. - /// The to use. + /// The to use. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string ruleSetName, MonitoringTagRuleData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string ruleSetName, DataMonitoringTagRuleData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(ruleSetName, nameof(ruleSetName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _monitoringTagRuleTagRulesClientDiagnostics.CreateScope("MonitoringTagRuleCollection.CreateOrUpdate"); + using var scope = _dataMonitoringTagRuleTagRulesClientDiagnostics.CreateScope("DataMonitoringTagRuleCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _monitoringTagRuleTagRulesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleSetName, data, cancellationToken).ConfigureAwait(false); - var uri = _monitoringTagRuleTagRulesRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleSetName, data); + var response = await _dataMonitoringTagRuleTagRulesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleSetName, data, cancellationToken).ConfigureAwait(false); + var uri = _dataMonitoringTagRuleTagRulesRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleSetName, data); var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new DatadogArmOperation(Response.FromValue(new MonitoringTagRuleResource(Client, response), response.GetRawResponse()), rehydrationToken); + var operation = new DatadogArmOperation(Response.FromValue(new DataMonitoringTagRuleResource(Client, response), response.GetRawResponse()), rehydrationToken); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -115,33 +115,33 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource - /// + /// /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Rule set name. - /// The to use. + /// The to use. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string ruleSetName, MonitoringTagRuleData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string ruleSetName, DataMonitoringTagRuleData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(ruleSetName, nameof(ruleSetName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _monitoringTagRuleTagRulesClientDiagnostics.CreateScope("MonitoringTagRuleCollection.CreateOrUpdate"); + using var scope = _dataMonitoringTagRuleTagRulesClientDiagnostics.CreateScope("DataMonitoringTagRuleCollection.CreateOrUpdate"); scope.Start(); try { - var response = _monitoringTagRuleTagRulesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleSetName, data, cancellationToken); - var uri = _monitoringTagRuleTagRulesRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleSetName, data); + var response = _dataMonitoringTagRuleTagRulesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleSetName, data, cancellationToken); + var uri = _dataMonitoringTagRuleTagRulesRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleSetName, data); var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new DatadogArmOperation(Response.FromValue(new MonitoringTagRuleResource(Client, response), response.GetRawResponse()), rehydrationToken); + var operation = new DatadogArmOperation(Response.FromValue(new DataMonitoringTagRuleResource(Client, response), response.GetRawResponse()), rehydrationToken); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -166,11 +166,11 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource - /// + /// /// /// /// @@ -178,18 +178,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string ruleSetName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string ruleSetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(ruleSetName, nameof(ruleSetName)); - using var scope = _monitoringTagRuleTagRulesClientDiagnostics.CreateScope("MonitoringTagRuleCollection.Get"); + using var scope = _dataMonitoringTagRuleTagRulesClientDiagnostics.CreateScope("DataMonitoringTagRuleCollection.Get"); scope.Start(); try { - var response = await _monitoringTagRuleTagRulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleSetName, cancellationToken).ConfigureAwait(false); + var response = await _dataMonitoringTagRuleTagRulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleSetName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new MonitoringTagRuleResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataMonitoringTagRuleResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -211,11 +211,11 @@ public virtual async Task> GetAsync(string r /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource - /// + /// /// /// /// @@ -223,18 +223,18 @@ public virtual async Task> GetAsync(string r /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string ruleSetName, CancellationToken cancellationToken = default) + public virtual Response Get(string ruleSetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(ruleSetName, nameof(ruleSetName)); - using var scope = _monitoringTagRuleTagRulesClientDiagnostics.CreateScope("MonitoringTagRuleCollection.Get"); + using var scope = _dataMonitoringTagRuleTagRulesClientDiagnostics.CreateScope("DataMonitoringTagRuleCollection.Get"); scope.Start(); try { - var response = _monitoringTagRuleTagRulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleSetName, cancellationToken); + var response = _dataMonitoringTagRuleTagRulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleSetName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new MonitoringTagRuleResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataMonitoringTagRuleResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -256,21 +256,21 @@ public virtual Response Get(string ruleSetName, Cance /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _monitoringTagRuleTagRulesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _monitoringTagRuleTagRulesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MonitoringTagRuleResource(Client, MonitoringTagRuleData.DeserializeMonitoringTagRuleData(e)), _monitoringTagRuleTagRulesClientDiagnostics, Pipeline, "MonitoringTagRuleCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataMonitoringTagRuleTagRulesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataMonitoringTagRuleTagRulesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataMonitoringTagRuleResource(Client, DataMonitoringTagRuleData.DeserializeDataMonitoringTagRuleData(e)), _dataMonitoringTagRuleTagRulesClientDiagnostics, Pipeline, "DataMonitoringTagRuleCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -286,21 +286,21 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _monitoringTagRuleTagRulesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _monitoringTagRuleTagRulesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MonitoringTagRuleResource(Client, MonitoringTagRuleData.DeserializeMonitoringTagRuleData(e)), _monitoringTagRuleTagRulesClientDiagnostics, Pipeline, "MonitoringTagRuleCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataMonitoringTagRuleTagRulesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataMonitoringTagRuleTagRulesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataMonitoringTagRuleResource(Client, DataMonitoringTagRuleData.DeserializeDataMonitoringTagRuleData(e)), _dataMonitoringTagRuleTagRulesClientDiagnostics, Pipeline, "DataMonitoringTagRuleCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -316,11 +316,11 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource - /// + /// /// /// /// @@ -332,11 +332,11 @@ public virtual async Task> ExistsAsync(string ruleSetName, Cancel { Argument.AssertNotNullOrEmpty(ruleSetName, nameof(ruleSetName)); - using var scope = _monitoringTagRuleTagRulesClientDiagnostics.CreateScope("MonitoringTagRuleCollection.Exists"); + using var scope = _dataMonitoringTagRuleTagRulesClientDiagnostics.CreateScope("DataMonitoringTagRuleCollection.Exists"); scope.Start(); try { - var response = await _monitoringTagRuleTagRulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleSetName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _dataMonitoringTagRuleTagRulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleSetName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -359,11 +359,11 @@ public virtual async Task> ExistsAsync(string ruleSetName, Cancel /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource - /// + /// /// /// /// @@ -375,11 +375,11 @@ public virtual Response Exists(string ruleSetName, CancellationToken cance { Argument.AssertNotNullOrEmpty(ruleSetName, nameof(ruleSetName)); - using var scope = _monitoringTagRuleTagRulesClientDiagnostics.CreateScope("MonitoringTagRuleCollection.Exists"); + using var scope = _dataMonitoringTagRuleTagRulesClientDiagnostics.CreateScope("DataMonitoringTagRuleCollection.Exists"); scope.Start(); try { - var response = _monitoringTagRuleTagRulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleSetName, cancellationToken: cancellationToken); + var response = _dataMonitoringTagRuleTagRulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleSetName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -402,11 +402,11 @@ public virtual Response Exists(string ruleSetName, CancellationToken cance /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource - /// + /// /// /// /// @@ -414,18 +414,18 @@ public virtual Response Exists(string ruleSetName, CancellationToken cance /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetIfExistsAsync(string ruleSetName, CancellationToken cancellationToken = default) + public virtual async Task> GetIfExistsAsync(string ruleSetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(ruleSetName, nameof(ruleSetName)); - using var scope = _monitoringTagRuleTagRulesClientDiagnostics.CreateScope("MonitoringTagRuleCollection.GetIfExists"); + using var scope = _dataMonitoringTagRuleTagRulesClientDiagnostics.CreateScope("DataMonitoringTagRuleCollection.GetIfExists"); scope.Start(); try { - var response = await _monitoringTagRuleTagRulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleSetName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _dataMonitoringTagRuleTagRulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleSetName, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new MonitoringTagRuleResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataMonitoringTagRuleResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -447,11 +447,11 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource - /// + /// /// /// /// @@ -459,18 +459,18 @@ public virtual async Task> GetIfExis /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. - public virtual NullableResponse GetIfExists(string ruleSetName, CancellationToken cancellationToken = default) + public virtual NullableResponse GetIfExists(string ruleSetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(ruleSetName, nameof(ruleSetName)); - using var scope = _monitoringTagRuleTagRulesClientDiagnostics.CreateScope("MonitoringTagRuleCollection.GetIfExists"); + using var scope = _dataMonitoringTagRuleTagRulesClientDiagnostics.CreateScope("DataMonitoringTagRuleCollection.GetIfExists"); scope.Start(); try { - var response = _monitoringTagRuleTagRulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleSetName, cancellationToken: cancellationToken); + var response = _dataMonitoringTagRuleTagRulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ruleSetName, cancellationToken: cancellationToken); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new MonitoringTagRuleResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataMonitoringTagRuleResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -479,7 +479,7 @@ public virtual NullableResponse GetIfExists(string ru } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -489,7 +489,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/MonitoringTagRuleData.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DataMonitoringTagRuleData.Serialization.cs similarity index 68% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/MonitoringTagRuleData.Serialization.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DataMonitoringTagRuleData.Serialization.cs index 3dcfa90c1fd2..432f07ccb501 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/MonitoringTagRuleData.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DataMonitoringTagRuleData.Serialization.cs @@ -16,11 +16,11 @@ namespace Azure.ResourceManager.Datadog { - public partial class MonitoringTagRuleData : IUtf8JsonSerializable, IJsonModel + public partial class DataMonitoringTagRuleData : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -31,10 +31,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW /// The client options for reading and writing models. protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(MonitoringTagRuleData)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(DataMonitoringTagRuleData)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); @@ -45,19 +45,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } } - MonitoringTagRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DataMonitoringTagRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(MonitoringTagRuleData)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(DataMonitoringTagRuleData)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMonitoringTagRuleData(document.RootElement, options); + return DeserializeDataMonitoringTagRuleData(document.RootElement, options); } - internal static MonitoringTagRuleData DeserializeMonitoringTagRuleData(JsonElement element, ModelReaderWriterOptions options = null) + internal static DataMonitoringTagRuleData DeserializeDataMonitoringTagRuleData(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -65,7 +65,7 @@ internal static MonitoringTagRuleData DeserializeMonitoringTagRuleData(JsonEleme { return null; } - MonitoringTagRulesProperties properties = default; + MonitoringTagRuleProperties properties = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -80,7 +80,7 @@ internal static MonitoringTagRuleData DeserializeMonitoringTagRuleData(JsonEleme { continue; } - properties = MonitoringTagRulesProperties.DeserializeMonitoringTagRulesProperties(property.Value, options); + properties = MonitoringTagRuleProperties.DeserializeMonitoringTagRuleProperties(property.Value, options); continue; } if (property.NameEquals("id"u8)) @@ -113,7 +113,7 @@ internal static MonitoringTagRuleData DeserializeMonitoringTagRuleData(JsonEleme } } serializedAdditionalRawData = rawDataDictionary; - return new MonitoringTagRuleData( + return new DataMonitoringTagRuleData( id, name, type, @@ -122,35 +122,35 @@ internal static MonitoringTagRuleData DeserializeMonitoringTagRuleData(JsonEleme serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); default: - throw new FormatException($"The model {nameof(MonitoringTagRuleData)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(DataMonitoringTagRuleData)} does not support writing '{options.Format}' format."); } } - MonitoringTagRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DataMonitoringTagRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMonitoringTagRuleData(document.RootElement, options); + return DeserializeDataMonitoringTagRuleData(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(MonitoringTagRuleData)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DataMonitoringTagRuleData)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/MonitoringTagRuleData.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DataMonitoringTagRuleData.cs similarity index 77% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/MonitoringTagRuleData.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DataMonitoringTagRuleData.cs index d6876e55d760..8f2c5ed55af3 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/MonitoringTagRuleData.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DataMonitoringTagRuleData.cs @@ -14,10 +14,10 @@ namespace Azure.ResourceManager.Datadog { /// - /// A class representing the MonitoringTagRule data model. + /// A class representing the DataMonitoringTagRule data model. /// Capture logs and metrics of Azure resources based on ARM tags. /// - public partial class MonitoringTagRuleData : ResourceData + public partial class DataMonitoringTagRuleData : ResourceData { /// /// Keeps track of any properties unknown to the library. @@ -51,25 +51,25 @@ public partial class MonitoringTagRuleData : ResourceData /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public MonitoringTagRuleData() + /// Initializes a new instance of . + public DataMonitoringTagRuleData() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// Definition of the properties for a TagRules resource. /// Keeps track of any properties unknown to the library. - internal MonitoringTagRuleData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MonitoringTagRulesProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal DataMonitoringTagRuleData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MonitoringTagRuleProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Properties = properties; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Definition of the properties for a TagRules resource. - public MonitoringTagRulesProperties Properties { get; set; } + public MonitoringTagRuleProperties Properties { get; set; } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DataMonitoringTagRuleResource.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DataMonitoringTagRuleResource.Serialization.cs new file mode 100644 index 000000000000..7f7a62c8da36 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DataMonitoringTagRuleResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.Datadog +{ + public partial class DataMonitoringTagRuleResource : IJsonModel + { + private static DataMonitoringTagRuleData s_dataDeserializationInstance; + private static DataMonitoringTagRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DataMonitoringTagRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDatadogContext.Default); + + DataMonitoringTagRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDatadogContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/MonitoringTagRuleResource.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DataMonitoringTagRuleResource.cs similarity index 64% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/MonitoringTagRuleResource.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DataMonitoringTagRuleResource.cs index fc8b4759e2ef..94da3eef038a 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/MonitoringTagRuleResource.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DataMonitoringTagRuleResource.cs @@ -15,14 +15,14 @@ namespace Azure.ResourceManager.Datadog { /// - /// A Class representing a MonitoringTagRule along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetMonitoringTagRuleResource method. - /// Otherwise you can get one from its parent resource using the GetMonitoringTagRule method. + /// A Class representing a DataMonitoringTagRule along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataMonitoringTagRuleResource method. + /// Otherwise you can get one from its parent resource using the GetDataMonitoringTagRule method. /// - public partial class MonitoringTagRuleResource : ArmResource + public partial class DataMonitoringTagRuleResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. /// The subscriptionId. /// The resourceGroupName. /// The monitorName. @@ -33,35 +33,35 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _monitoringTagRuleTagRulesClientDiagnostics; - private readonly TagRulesRestOperations _monitoringTagRuleTagRulesRestClient; - private readonly MonitoringTagRuleData _data; + private readonly ClientDiagnostics _dataMonitoringTagRuleTagRulesClientDiagnostics; + private readonly TagRulesRestOperations _dataMonitoringTagRuleTagRulesRestClient; + private readonly DataMonitoringTagRuleData _data; /// Gets the resource type for the operations. public static readonly ResourceType ResourceType = "Microsoft.Datadog/monitors/tagRules"; - /// Initializes a new instance of the class for mocking. - protected MonitoringTagRuleResource() + /// Initializes a new instance of the class for mocking. + protected DataMonitoringTagRuleResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal MonitoringTagRuleResource(ArmClient client, MonitoringTagRuleData data) : this(client, data.Id) + internal DataMonitoringTagRuleResource(ArmClient client, DataMonitoringTagRuleData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. - internal MonitoringTagRuleResource(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DataMonitoringTagRuleResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _monitoringTagRuleTagRulesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Datadog", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string monitoringTagRuleTagRulesApiVersion); - _monitoringTagRuleTagRulesRestClient = new TagRulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, monitoringTagRuleTagRulesApiVersion); + _dataMonitoringTagRuleTagRulesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Datadog", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataMonitoringTagRuleTagRulesApiVersion); + _dataMonitoringTagRuleTagRulesRestClient = new TagRulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataMonitoringTagRuleTagRulesApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -72,7 +72,7 @@ internal MonitoringTagRuleResource(ArmClient client, ResourceIdentifier id) : ba /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual MonitoringTagRuleData Data + public virtual DataMonitoringTagRuleData Data { get { @@ -101,25 +101,25 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _monitoringTagRuleTagRulesClientDiagnostics.CreateScope("MonitoringTagRuleResource.Get"); + using var scope = _dataMonitoringTagRuleTagRulesClientDiagnostics.CreateScope("DataMonitoringTagRuleResource.Get"); scope.Start(); try { - var response = await _monitoringTagRuleTagRulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _dataMonitoringTagRuleTagRulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new MonitoringTagRuleResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataMonitoringTagRuleResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -141,25 +141,25 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _monitoringTagRuleTagRulesClientDiagnostics.CreateScope("MonitoringTagRuleResource.Get"); + using var scope = _dataMonitoringTagRuleTagRulesClientDiagnostics.CreateScope("DataMonitoringTagRuleResource.Get"); scope.Start(); try { - var response = _monitoringTagRuleTagRulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _dataMonitoringTagRuleTagRulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new MonitoringTagRuleResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new DataMonitoringTagRuleResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -181,30 +181,30 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource - /// + /// /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. + /// The to use. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, MonitoringTagRuleData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataMonitoringTagRuleData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _monitoringTagRuleTagRulesClientDiagnostics.CreateScope("MonitoringTagRuleResource.Update"); + using var scope = _dataMonitoringTagRuleTagRulesClientDiagnostics.CreateScope("DataMonitoringTagRuleResource.Update"); scope.Start(); try { - var response = await _monitoringTagRuleTagRulesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var uri = _monitoringTagRuleTagRulesRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var response = await _dataMonitoringTagRuleTagRulesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _dataMonitoringTagRuleTagRulesRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new DatadogArmOperation(Response.FromValue(new MonitoringTagRuleResource(Client, response), response.GetRawResponse()), rehydrationToken); + var operation = new DatadogArmOperation(Response.FromValue(new DataMonitoringTagRuleResource(Client, response), response.GetRawResponse()), rehydrationToken); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -229,30 +229,30 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource - /// + /// /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. + /// The to use. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, MonitoringTagRuleData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, DataMonitoringTagRuleData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _monitoringTagRuleTagRulesClientDiagnostics.CreateScope("MonitoringTagRuleResource.Update"); + using var scope = _dataMonitoringTagRuleTagRulesClientDiagnostics.CreateScope("DataMonitoringTagRuleResource.Update"); scope.Start(); try { - var response = _monitoringTagRuleTagRulesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var uri = _monitoringTagRuleTagRulesRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var response = _dataMonitoringTagRuleTagRulesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var uri = _dataMonitoringTagRuleTagRulesRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new DatadogArmOperation(Response.FromValue(new MonitoringTagRuleResource(Client, response), response.GetRawResponse()), rehydrationToken); + var operation = new DatadogArmOperation(Response.FromValue(new DataMonitoringTagRuleResource(Client, response), response.GetRawResponse()), rehydrationToken); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorResourceCollection.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorCollection.cs similarity index 76% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorResourceCollection.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorCollection.cs index 2e00fa6231c7..c4129f4f4f49 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorResourceCollection.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorCollection.cs @@ -21,26 +21,26 @@ namespace Azure.ResourceManager.Datadog /// /// A class representing a collection of and their operations. /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDatadogMonitorResources method from an instance of . + /// To get a instance call the GetDatadogMonitors method from an instance of . /// - public partial class DatadogMonitorResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class DatadogMonitorCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _datadogMonitorResourceMonitorsClientDiagnostics; - private readonly MonitorsRestOperations _datadogMonitorResourceMonitorsRestClient; + private readonly ClientDiagnostics _datadogMonitorMonitorsClientDiagnostics; + private readonly MonitorsRestOperations _datadogMonitorMonitorsRestClient; - /// Initializes a new instance of the class for mocking. - protected DatadogMonitorResourceCollection() + /// Initializes a new instance of the class for mocking. + protected DatadogMonitorCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal DatadogMonitorResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DatadogMonitorCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _datadogMonitorResourceMonitorsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Datadog", DatadogMonitorResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DatadogMonitorResource.ResourceType, out string datadogMonitorResourceMonitorsApiVersion); - _datadogMonitorResourceMonitorsRestClient = new MonitorsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, datadogMonitorResourceMonitorsApiVersion); + _datadogMonitorMonitorsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Datadog", DatadogMonitorResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DatadogMonitorResource.ResourceType, out string datadogMonitorMonitorsApiVersion); + _datadogMonitorMonitorsRestClient = new MonitorsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, datadogMonitorMonitorsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -75,21 +75,21 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Monitor resource name. - /// The to use. + /// The to use. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string monitorName, DatadogMonitorResourceData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string monitorName, DatadogMonitorData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResourceCollection.CreateOrUpdate"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _datadogMonitorResourceMonitorsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, monitorName, data, cancellationToken).ConfigureAwait(false); - var operation = new DatadogArmOperation(new DatadogMonitorResourceOperationSource(Client), _datadogMonitorResourceMonitorsClientDiagnostics, Pipeline, _datadogMonitorResourceMonitorsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, monitorName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _datadogMonitorMonitorsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, monitorName, data, cancellationToken).ConfigureAwait(false); + var operation = new DatadogArmOperation(new DatadogMonitorOperationSource(Client), _datadogMonitorMonitorsClientDiagnostics, Pipeline, _datadogMonitorMonitorsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, monitorName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -124,21 +124,21 @@ public virtual async Task> CreateOrUpdateAs /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Monitor resource name. - /// The to use. + /// The to use. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string monitorName, DatadogMonitorResourceData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string monitorName, DatadogMonitorData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResourceCollection.CreateOrUpdate"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorCollection.CreateOrUpdate"); scope.Start(); try { - var response = _datadogMonitorResourceMonitorsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, monitorName, data, cancellationToken); - var operation = new DatadogArmOperation(new DatadogMonitorResourceOperationSource(Client), _datadogMonitorResourceMonitorsClientDiagnostics, Pipeline, _datadogMonitorResourceMonitorsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, monitorName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _datadogMonitorMonitorsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, monitorName, data, cancellationToken); + var operation = new DatadogArmOperation(new DatadogMonitorOperationSource(Client), _datadogMonitorMonitorsClientDiagnostics, Pipeline, _datadogMonitorMonitorsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, monitorName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -179,11 +179,11 @@ public virtual async Task> GetAsync(string moni { Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResourceCollection.Get"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorCollection.Get"); scope.Start(); try { - var response = await _datadogMonitorResourceMonitorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, monitorName, cancellationToken).ConfigureAwait(false); + var response = await _datadogMonitorMonitorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, monitorName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new DatadogMonitorResource(Client, response.Value), response.GetRawResponse()); @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string moni /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -224,11 +224,11 @@ public virtual Response Get(string monitorName, Cancella { Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResourceCollection.Get"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorCollection.Get"); scope.Start(); try { - var response = _datadogMonitorResourceMonitorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, monitorName, cancellationToken); + var response = _datadogMonitorMonitorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, monitorName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new DatadogMonitorResource(Client, response.Value), response.GetRawResponse()); @@ -253,7 +253,7 @@ public virtual Response Get(string monitorName, Cancella /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -265,9 +265,9 @@ public virtual Response Get(string monitorName, Cancella /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogMonitorResourceMonitorsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogMonitorResourceMonitorsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DatadogMonitorResource(Client, DatadogMonitorResourceData.DeserializeDatadogMonitorResourceData(e)), _datadogMonitorResourceMonitorsClientDiagnostics, Pipeline, "DatadogMonitorResourceCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogMonitorMonitorsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogMonitorMonitorsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DatadogMonitorResource(Client, DatadogMonitorData.DeserializeDatadogMonitorData(e)), _datadogMonitorMonitorsClientDiagnostics, Pipeline, "DatadogMonitorCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -295,9 +295,9 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogMonitorResourceMonitorsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogMonitorResourceMonitorsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DatadogMonitorResource(Client, DatadogMonitorResourceData.DeserializeDatadogMonitorResourceData(e)), _datadogMonitorResourceMonitorsClientDiagnostics, Pipeline, "DatadogMonitorResourceCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogMonitorMonitorsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogMonitorMonitorsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DatadogMonitorResource(Client, DatadogMonitorData.DeserializeDatadogMonitorData(e)), _datadogMonitorMonitorsClientDiagnostics, Pipeline, "DatadogMonitorCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -329,11 +329,11 @@ public virtual async Task> ExistsAsync(string monitorName, Cancel { Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResourceCollection.Exists"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorCollection.Exists"); scope.Start(); try { - var response = await _datadogMonitorResourceMonitorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, monitorName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _datadogMonitorMonitorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, monitorName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string monitorName, Cancel /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -372,11 +372,11 @@ public virtual Response Exists(string monitorName, CancellationToken cance { Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResourceCollection.Exists"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorCollection.Exists"); scope.Start(); try { - var response = _datadogMonitorResourceMonitorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, monitorName, cancellationToken: cancellationToken); + var response = _datadogMonitorMonitorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, monitorName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -399,7 +399,7 @@ public virtual Response Exists(string monitorName, CancellationToken cance /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -415,11 +415,11 @@ public virtual async Task> GetIfExistsA { Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResourceCollection.GetIfExists"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorCollection.GetIfExists"); scope.Start(); try { - var response = await _datadogMonitorResourceMonitorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, monitorName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _datadogMonitorMonitorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, monitorName, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new DatadogMonitorResource(Client, response.Value), response.GetRawResponse()); @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -460,11 +460,11 @@ public virtual NullableResponse GetIfExists(string monit { Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResourceCollection.GetIfExists"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorCollection.GetIfExists"); scope.Start(); try { - var response = _datadogMonitorResourceMonitorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, monitorName, cancellationToken: cancellationToken); + var response = _datadogMonitorMonitorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, monitorName, cancellationToken: cancellationToken); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new DatadogMonitorResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorResourceData.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorData.Serialization.cs similarity index 76% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorResourceData.Serialization.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorData.Serialization.cs index 3a21ef029fde..ba28dd5ea0f9 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorResourceData.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorData.Serialization.cs @@ -16,11 +16,11 @@ namespace Azure.ResourceManager.Datadog { - public partial class DatadogMonitorResourceData : IUtf8JsonSerializable, IJsonModel + public partial class DatadogMonitorData : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -31,23 +31,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe /// The client options for reading and writing models. protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(DatadogMonitorResourceData)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorData)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Sku)) - { - writer.WritePropertyName("sku"u8); - writer.WriteObjectValue(Sku, options); - } if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -55,19 +55,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } } - DatadogMonitorResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DatadogMonitorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(DatadogMonitorResourceData)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorData)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDatadogMonitorResourceData(document.RootElement, options); + return DeserializeDatadogMonitorData(document.RootElement, options); } - internal static DatadogMonitorResourceData DeserializeDatadogMonitorResourceData(JsonElement element, ModelReaderWriterOptions options = null) + internal static DatadogMonitorData DeserializeDatadogMonitorData(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -75,8 +75,8 @@ internal static DatadogMonitorResourceData DeserializeDatadogMonitorResourceData { return null; } - ResourceSku sku = default; - MonitorProperties properties = default; + DatadogMonitorProperties properties = default; + DatadogSku sku = default; ManagedServiceIdentity identity = default; IDictionary tags = default; AzureLocation location = default; @@ -88,22 +88,22 @@ internal static DatadogMonitorResourceData DeserializeDatadogMonitorResourceData Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("sku"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - sku = ResourceSku.DeserializeResourceSku(property.Value, options); + properties = DatadogMonitorProperties.DeserializeDatadogMonitorProperties(property.Value, options); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("sku"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - properties = MonitorProperties.DeserializeMonitorProperties(property.Value, options); + sku = DatadogSku.DeserializeDatadogSku(property.Value, options); continue; } if (property.NameEquals("identity"u8)) @@ -164,48 +164,48 @@ internal static DatadogMonitorResourceData DeserializeDatadogMonitorResourceData } } serializedAdditionalRawData = rawDataDictionary; - return new DatadogMonitorResourceData( + return new DatadogMonitorData( id, name, type, systemData, tags ?? new ChangeTrackingDictionary(), location, - sku, properties, + sku, identity, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); default: - throw new FormatException($"The model {nameof(DatadogMonitorResourceData)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorData)} does not support writing '{options.Format}' format."); } } - DatadogMonitorResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DatadogMonitorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeDatadogMonitorResourceData(document.RootElement, options); + return DeserializeDatadogMonitorData(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DatadogMonitorResourceData)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorData)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorResourceData.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorData.cs similarity index 74% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorResourceData.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorData.cs index 1cb677445207..ec83cbeff300 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorResourceData.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorData.cs @@ -13,8 +13,11 @@ namespace Azure.ResourceManager.Datadog { - /// A class representing the DatadogMonitorResource data model. - public partial class DatadogMonitorResourceData : TrackedResourceData + /// + /// A class representing the DatadogMonitor data model. + /// Concrete tracked resource types can be created by aliasing this type using a specific property type. + /// + public partial class DatadogMonitorData : TrackedResourceData { /// /// Keeps track of any properties unknown to the library. @@ -48,47 +51,47 @@ public partial class DatadogMonitorResourceData : TrackedResourceData /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// The location. - public DatadogMonitorResourceData(AzureLocation location) : base(location) + public DatadogMonitorData(AzureLocation location) : base(location) { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// The tags. /// The location. - /// /// Properties specific to the monitor resource. + /// /// Gets or sets the identity. Current supported identity types: SystemAssigned, UserAssigned. /// Keeps track of any properties unknown to the library. - internal DatadogMonitorResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ResourceSku sku, MonitorProperties properties, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal DatadogMonitorData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, DatadogMonitorProperties properties, DatadogSku sku, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { - Sku = sku; Properties = properties; + Sku = sku; Identity = identity; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal DatadogMonitorResourceData() + /// Initializes a new instance of for deserialization. + internal DatadogMonitorData() { } + /// Properties specific to the monitor resource. + public DatadogMonitorProperties Properties { get; set; } /// Gets or sets the sku. - internal ResourceSku Sku { get; set; } - /// Name of the SKU. + internal DatadogSku Sku { get; set; } + /// Name of the SKU in {PlanId} format. For Terraform, the only allowed value is 'Linked'. public string SkuName { get => Sku is null ? default : Sku.Name; - set => Sku = new ResourceSku(value); + set => Sku = new DatadogSku(value); } - /// Properties specific to the monitor resource. - public MonitorProperties Properties { get; set; } /// Gets or sets the identity. Current supported identity types: SystemAssigned, UserAssigned. public ManagedServiceIdentity Identity { get; set; } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorResource.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorResource.Serialization.cs index bef449b503de..ce2f5c6b9713 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorResource.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorResource.Serialization.cs @@ -11,19 +11,19 @@ namespace Azure.ResourceManager.Datadog { - public partial class DatadogMonitorResource : IJsonModel + public partial class DatadogMonitorResource : IJsonModel { - private static DatadogMonitorResourceData s_dataDeserializationInstance; - private static DatadogMonitorResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + private static DatadogMonitorData s_dataDeserializationInstance; + private static DatadogMonitorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatadogMonitorResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + DatadogMonitorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDatadogContext.Default); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDatadogContext.Default); - DatadogMonitorResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDatadogContext.Default); + DatadogMonitorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDatadogContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorResource.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorResource.cs index fd5c00868355..bcdefdbd4ca6 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorResource.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorResource.cs @@ -6,10 +6,8 @@ #nullable disable using System; -using System.ClientModel.Primitives; using System.Collections.Generic; using System.Globalization; -using System.Text; using System.Threading; using System.Threading.Tasks; using Autorest.CSharp.Core; @@ -17,15 +15,14 @@ using Azure.Core.Pipeline; using Azure.ResourceManager.Datadog.Models; using Azure.ResourceManager.Resources; -using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Datadog { /// - /// A Class representing a DatadogMonitorResource along with the instance operations that can be performed on it. + /// A Class representing a DatadogMonitor along with the instance operations that can be performed on it. /// If you have a you can construct a /// from an instance of using the GetDatadogMonitorResource method. - /// Otherwise you can get one from its parent resource using the GetDatadogMonitorResource method. + /// Otherwise you can get one from its parent resource using the GetDatadogMonitor method. /// public partial class DatadogMonitorResource : ArmResource { @@ -39,9 +36,13 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _datadogMonitorResourceMonitorsClientDiagnostics; - private readonly MonitorsRestOperations _datadogMonitorResourceMonitorsRestClient; - private readonly DatadogMonitorResourceData _data; + private readonly ClientDiagnostics _datadogMonitorMonitorsClientDiagnostics; + private readonly MonitorsRestOperations _datadogMonitorMonitorsRestClient; + private readonly ClientDiagnostics _billingInfoClientDiagnostics; + private readonly BillingInfoRestOperations _billingInfoRestClient; + private readonly ClientDiagnostics _organizationsClientDiagnostics; + private readonly OrganizationsRestOperations _organizationsRestClient; + private readonly DatadogMonitorData _data; /// Gets the resource type for the operations. public static readonly ResourceType ResourceType = "Microsoft.Datadog/monitors"; @@ -54,7 +55,7 @@ protected DatadogMonitorResource() /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal DatadogMonitorResource(ArmClient client, DatadogMonitorResourceData data) : this(client, data.Id) + internal DatadogMonitorResource(ArmClient client, DatadogMonitorData data) : this(client, data.Id) { HasData = true; _data = data; @@ -65,9 +66,13 @@ internal DatadogMonitorResource(ArmClient client, DatadogMonitorResourceData dat /// The identifier of the resource that is the target of operations. internal DatadogMonitorResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _datadogMonitorResourceMonitorsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Datadog", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string datadogMonitorResourceMonitorsApiVersion); - _datadogMonitorResourceMonitorsRestClient = new MonitorsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, datadogMonitorResourceMonitorsApiVersion); + _datadogMonitorMonitorsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Datadog", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string datadogMonitorMonitorsApiVersion); + _datadogMonitorMonitorsRestClient = new MonitorsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, datadogMonitorMonitorsApiVersion); + _billingInfoClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Datadog", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _billingInfoRestClient = new BillingInfoRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _organizationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Datadog", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _organizationsRestClient = new OrganizationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -78,7 +83,7 @@ internal DatadogMonitorResource(ArmClient client, ResourceIdentifier id) : base( /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual DatadogMonitorResourceData Data + public virtual DatadogMonitorData Data { get { @@ -94,80 +99,80 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of MonitoringTagRuleResources in the DatadogMonitorResource. - /// An object representing collection of MonitoringTagRuleResources and their operations over a MonitoringTagRuleResource. - public virtual MonitoringTagRuleCollection GetMonitoringTagRules() + /// Gets a collection of DatadogMonitoredSubscriptionResources in the DatadogMonitor. + /// An object representing collection of DatadogMonitoredSubscriptionResources and their operations over a DatadogMonitoredSubscriptionResource. + public virtual DatadogMonitoredSubscriptionCollection GetDatadogMonitoredSubscriptions() { - return GetCachedClient(client => new MonitoringTagRuleCollection(client, Id)); + return GetCachedClient(client => new DatadogMonitoredSubscriptionCollection(client, Id)); } /// - /// Get a tag rule set for a given monitor resource. + /// List the subscriptions currently being monitored by the Datadog monitor resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/tagRules/{ruleSetName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName} /// /// /// Operation Id - /// TagRules_Get + /// MonitoredSubscriptions_Get /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource - /// + /// /// /// /// - /// Rule set name. + /// The configuration name. Only 'default' value is supported. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetMonitoringTagRuleAsync(string ruleSetName, CancellationToken cancellationToken = default) + public virtual async Task> GetDatadogMonitoredSubscriptionAsync(string configurationName, CancellationToken cancellationToken = default) { - return await GetMonitoringTagRules().GetAsync(ruleSetName, cancellationToken).ConfigureAwait(false); + return await GetDatadogMonitoredSubscriptions().GetAsync(configurationName, cancellationToken).ConfigureAwait(false); } /// - /// Get a tag rule set for a given monitor resource. + /// List the subscriptions currently being monitored by the Datadog monitor resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/tagRules/{ruleSetName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName} /// /// /// Operation Id - /// TagRules_Get + /// MonitoredSubscriptions_Get /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource - /// + /// /// /// /// - /// Rule set name. + /// The configuration name. Only 'default' value is supported. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetMonitoringTagRule(string ruleSetName, CancellationToken cancellationToken = default) + public virtual Response GetDatadogMonitoredSubscription(string configurationName, CancellationToken cancellationToken = default) { - return GetMonitoringTagRules().Get(ruleSetName, cancellationToken); + return GetDatadogMonitoredSubscriptions().Get(configurationName, cancellationToken); } - /// Gets a collection of DatadogSingleSignOnResources in the DatadogMonitorResource. + /// Gets a collection of DatadogSingleSignOnResources in the DatadogMonitor. /// An object representing collection of DatadogSingleSignOnResources and their operations over a DatadogSingleSignOnResource. - public virtual DatadogSingleSignOnResourceCollection GetDatadogSingleSignOnResources() + public virtual DatadogSingleSignOnCollection GetDatadogSingleSignOns() { - return GetCachedClient(client => new DatadogSingleSignOnResourceCollection(client, Id)); + return GetCachedClient(client => new DatadogSingleSignOnCollection(client, Id)); } /// @@ -183,7 +188,7 @@ public virtual DatadogSingleSignOnResourceCollection GetDatadogSingleSignOnResou /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -196,9 +201,9 @@ public virtual DatadogSingleSignOnResourceCollection GetDatadogSingleSignOnResou /// is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetDatadogSingleSignOnResourceAsync(string configurationName, CancellationToken cancellationToken = default) + public virtual async Task> GetDatadogSingleSignOnAsync(string configurationName, CancellationToken cancellationToken = default) { - return await GetDatadogSingleSignOnResources().GetAsync(configurationName, cancellationToken).ConfigureAwait(false); + return await GetDatadogSingleSignOns().GetAsync(configurationName, cancellationToken).ConfigureAwait(false); } /// @@ -214,7 +219,7 @@ public virtual async Task> GetDatadogSingl /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -227,9 +232,78 @@ public virtual async Task> GetDatadogSingl /// is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetDatadogSingleSignOnResource(string configurationName, CancellationToken cancellationToken = default) + public virtual Response GetDatadogSingleSignOn(string configurationName, CancellationToken cancellationToken = default) + { + return GetDatadogSingleSignOns().Get(configurationName, cancellationToken); + } + + /// Gets a collection of DataMonitoringTagRuleResources in the DatadogMonitor. + /// An object representing collection of DataMonitoringTagRuleResources and their operations over a DataMonitoringTagRuleResource. + public virtual DataMonitoringTagRuleCollection GetDataMonitoringTagRules() + { + return GetCachedClient(client => new DataMonitoringTagRuleCollection(client, Id)); + } + + /// + /// Get a tag rule set for a given monitor resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/tagRules/{ruleSetName} + /// + /// + /// Operation Id + /// TagRules_Get + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// Resource + /// + /// + /// + /// + /// Rule set name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDataMonitoringTagRuleAsync(string ruleSetName, CancellationToken cancellationToken = default) + { + return await GetDataMonitoringTagRules().GetAsync(ruleSetName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a tag rule set for a given monitor resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/tagRules/{ruleSetName} + /// + /// + /// Operation Id + /// TagRules_Get + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// Resource + /// + /// + /// + /// + /// Rule set name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDataMonitoringTagRule(string ruleSetName, CancellationToken cancellationToken = default) { - return GetDatadogSingleSignOnResources().Get(configurationName, cancellationToken); + return GetDataMonitoringTagRules().Get(ruleSetName, cancellationToken); } /// @@ -245,7 +319,7 @@ public virtual Response GetDatadogSingleSignOnResou /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -256,11 +330,11 @@ public virtual Response GetDatadogSingleSignOnResou /// The cancellation token to use. public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.Get"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.Get"); scope.Start(); try { - var response = await _datadogMonitorResourceMonitorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _datadogMonitorMonitorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new DatadogMonitorResource(Client, response.Value), response.GetRawResponse()); @@ -285,7 +359,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -296,11 +370,11 @@ public virtual async Task> GetAsync(Cancellatio /// The cancellation token to use. public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.Get"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.Get"); scope.Start(); try { - var response = _datadogMonitorResourceMonitorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _datadogMonitorMonitorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new DatadogMonitorResource(Client, response.Value), response.GetRawResponse()); @@ -325,7 +399,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -337,12 +411,12 @@ public virtual Response Get(CancellationToken cancellati /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.Delete"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.Delete"); scope.Start(); try { - var response = await _datadogMonitorResourceMonitorsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new DatadogArmOperation(_datadogMonitorResourceMonitorsClientDiagnostics, Pipeline, _datadogMonitorResourceMonitorsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _datadogMonitorMonitorsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DatadogArmOperation(_datadogMonitorMonitorsClientDiagnostics, Pipeline, _datadogMonitorMonitorsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -367,7 +441,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -379,12 +453,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.Delete"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.Delete"); scope.Start(); try { - var response = _datadogMonitorResourceMonitorsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new DatadogArmOperation(_datadogMonitorResourceMonitorsClientDiagnostics, Pipeline, _datadogMonitorResourceMonitorsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _datadogMonitorMonitorsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new DatadogArmOperation(_datadogMonitorMonitorsClientDiagnostics, Pipeline, _datadogMonitorMonitorsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -409,7 +483,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -418,19 +492,19 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. + /// The to use. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DatadogMonitorResourcePatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DatadogMonitorPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.Update"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.Update"); scope.Start(); try { - var response = await _datadogMonitorResourceMonitorsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new DatadogArmOperation(new DatadogMonitorResourceOperationSource(Client), _datadogMonitorResourceMonitorsClientDiagnostics, Pipeline, _datadogMonitorResourceMonitorsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var response = await _datadogMonitorMonitorsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new DatadogArmOperation(new DatadogMonitorOperationSource(Client), _datadogMonitorMonitorsClientDiagnostics, Pipeline, _datadogMonitorMonitorsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -455,7 +529,7 @@ public virtual async Task> UpdateAsync(Wait /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -464,19 +538,19 @@ public virtual async Task> UpdateAsync(Wait /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. + /// The to use. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DatadogMonitorResourcePatch patch, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, DatadogMonitorPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.Update"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.Update"); scope.Start(); try { - var response = _datadogMonitorResourceMonitorsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - var operation = new DatadogArmOperation(new DatadogMonitorResourceOperationSource(Client), _datadogMonitorResourceMonitorsClientDiagnostics, Pipeline, _datadogMonitorResourceMonitorsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + var response = _datadogMonitorMonitorsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new DatadogArmOperation(new DatadogMonitorOperationSource(Client), _datadogMonitorMonitorsClientDiagnostics, Pipeline, _datadogMonitorMonitorsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -488,66 +562,6 @@ public virtual ArmOperation Update(WaitUntil waitUntil, } } - /// - /// List the api keys for a given monitor resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listApiKeys - /// - /// - /// Operation Id - /// Monitors_ListApiKeys - /// - /// - /// Default Api Version - /// 2021-03-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetApiKeysAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogMonitorResourceMonitorsRestClient.CreateListApiKeysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogMonitorResourceMonitorsRestClient.CreateListApiKeysNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DatadogApiKey.DeserializeDatadogApiKey(e), _datadogMonitorResourceMonitorsClientDiagnostics, Pipeline, "DatadogMonitorResource.GetApiKeys", "value", "nextLink", cancellationToken); - } - - /// - /// List the api keys for a given monitor resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listApiKeys - /// - /// - /// Operation Id - /// Monitors_ListApiKeys - /// - /// - /// Default Api Version - /// 2021-03-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetApiKeys(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogMonitorResourceMonitorsRestClient.CreateListApiKeysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogMonitorResourceMonitorsRestClient.CreateListApiKeysNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DatadogApiKey.DeserializeDatadogApiKey(e), _datadogMonitorResourceMonitorsClientDiagnostics, Pipeline, "DatadogMonitorResource.GetApiKeys", "value", "nextLink", cancellationToken); - } - /// /// Get the default api key. /// @@ -561,7 +575,7 @@ public virtual Pageable GetApiKeys(CancellationToken cancellation /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -572,11 +586,11 @@ public virtual Pageable GetApiKeys(CancellationToken cancellation /// The cancellation token to use. public virtual async Task> GetDefaultKeyAsync(CancellationToken cancellationToken = default) { - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.GetDefaultKey"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.GetDefaultKey"); scope.Start(); try { - var response = await _datadogMonitorResourceMonitorsRestClient.GetDefaultKeyAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _datadogMonitorMonitorsRestClient.GetDefaultKeyAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -599,7 +613,7 @@ public virtual async Task> GetDefaultKeyAsync(Cancellati /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -610,11 +624,11 @@ public virtual async Task> GetDefaultKeyAsync(Cancellati /// The cancellation token to use. public virtual Response GetDefaultKey(CancellationToken cancellationToken = default) { - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.GetDefaultKey"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.GetDefaultKey"); scope.Start(); try { - var response = _datadogMonitorResourceMonitorsRestClient.GetDefaultKey(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _datadogMonitorMonitorsRestClient.GetDefaultKey(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -625,19 +639,19 @@ public virtual Response GetDefaultKey(CancellationToken cancellat } /// - /// Set the default api key. + /// List the api keys for a given monitor resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/setDefaultKey + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listApiKeys /// /// /// Operation Id - /// Monitors_SetDefaultKey + /// Monitors_ListApiKeys /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -645,38 +659,29 @@ public virtual Response GetDefaultKey(CancellationToken cancellat /// /// /// - /// The to use. /// The cancellation token to use. - public virtual async Task SetDefaultKeyAsync(DatadogApiKey body = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetApiKeysAsync(CancellationToken cancellationToken = default) { - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.SetDefaultKey"); - scope.Start(); - try - { - var response = await _datadogMonitorResourceMonitorsRestClient.SetDefaultKeyAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogMonitorMonitorsRestClient.CreateListApiKeysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogMonitorMonitorsRestClient.CreateListApiKeysNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DatadogApiKey.DeserializeDatadogApiKey(e), _datadogMonitorMonitorsClientDiagnostics, Pipeline, "DatadogMonitorResource.GetApiKeys", "value", "nextLink", cancellationToken); } /// - /// Set the default api key. + /// List the api keys for a given monitor resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/setDefaultKey + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/listApiKeys /// /// /// Operation Id - /// Monitors_SetDefaultKey + /// Monitors_ListApiKeys /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -684,22 +689,13 @@ public virtual async Task SetDefaultKeyAsync(DatadogApiKey body = null /// /// /// - /// The to use. /// The cancellation token to use. - public virtual Response SetDefaultKey(DatadogApiKey body = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetApiKeys(CancellationToken cancellationToken = default) { - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.SetDefaultKey"); - scope.Start(); - try - { - var response = _datadogMonitorResourceMonitorsRestClient.SetDefaultKey(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogMonitorMonitorsRestClient.CreateListApiKeysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogMonitorMonitorsRestClient.CreateListApiKeysNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DatadogApiKey.DeserializeDatadogApiKey(e), _datadogMonitorMonitorsClientDiagnostics, Pipeline, "DatadogMonitorResource.GetApiKeys", "value", "nextLink", cancellationToken); } /// @@ -715,7 +711,7 @@ public virtual Response SetDefaultKey(DatadogApiKey body = null, CancellationTok /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -727,9 +723,9 @@ public virtual Response SetDefaultKey(DatadogApiKey body = null, CancellationTok /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetHostsAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogMonitorResourceMonitorsRestClient.CreateListHostsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogMonitorResourceMonitorsRestClient.CreateListHostsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DatadogHost.DeserializeDatadogHost(e), _datadogMonitorResourceMonitorsClientDiagnostics, Pipeline, "DatadogMonitorResource.GetHosts", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogMonitorMonitorsRestClient.CreateListHostsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogMonitorMonitorsRestClient.CreateListHostsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DatadogHost.DeserializeDatadogHost(e), _datadogMonitorMonitorsClientDiagnostics, Pipeline, "DatadogMonitorResource.GetHosts", "value", "nextLink", cancellationToken); } /// @@ -745,7 +741,7 @@ public virtual AsyncPageable GetHostsAsync(CancellationToken cancel /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -757,9 +753,9 @@ public virtual AsyncPageable GetHostsAsync(CancellationToken cancel /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetHosts(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogMonitorResourceMonitorsRestClient.CreateListHostsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogMonitorResourceMonitorsRestClient.CreateListHostsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DatadogHost.DeserializeDatadogHost(e), _datadogMonitorResourceMonitorsClientDiagnostics, Pipeline, "DatadogMonitorResource.GetHosts", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogMonitorMonitorsRestClient.CreateListHostsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogMonitorMonitorsRestClient.CreateListHostsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DatadogHost.DeserializeDatadogHost(e), _datadogMonitorMonitorsClientDiagnostics, Pipeline, "DatadogMonitorResource.GetHosts", "value", "nextLink", cancellationToken); } /// @@ -775,7 +771,7 @@ public virtual Pageable GetHosts(CancellationToken cancellationToke /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -784,12 +780,12 @@ public virtual Pageable GetHosts(CancellationToken cancellationToke /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetLinkedResourcesAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetLinkedResourcesAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogMonitorResourceMonitorsRestClient.CreateListLinkedResourcesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogMonitorResourceMonitorsRestClient.CreateListLinkedResourcesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(e.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDatadogContext.Default), _datadogMonitorResourceMonitorsClientDiagnostics, Pipeline, "DatadogMonitorResource.GetLinkedResources", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogMonitorMonitorsRestClient.CreateListLinkedResourcesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogMonitorMonitorsRestClient.CreateListLinkedResourcesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DatadogLinkedResourceResult.DeserializeDatadogLinkedResourceResult(e), _datadogMonitorMonitorsClientDiagnostics, Pipeline, "DatadogMonitorResource.GetLinkedResources", "value", "nextLink", cancellationToken); } /// @@ -805,7 +801,7 @@ public virtual AsyncPageable GetLinkedResourcesAsync(CancellationTo /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -814,12 +810,12 @@ public virtual AsyncPageable GetLinkedResourcesAsync(CancellationTo /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetLinkedResources(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetLinkedResources(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogMonitorResourceMonitorsRestClient.CreateListLinkedResourcesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogMonitorResourceMonitorsRestClient.CreateListLinkedResourcesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(e.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDatadogContext.Default), _datadogMonitorResourceMonitorsClientDiagnostics, Pipeline, "DatadogMonitorResource.GetLinkedResources", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogMonitorMonitorsRestClient.CreateListLinkedResourcesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogMonitorMonitorsRestClient.CreateListLinkedResourcesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DatadogLinkedResourceResult.DeserializeDatadogLinkedResourceResult(e), _datadogMonitorMonitorsClientDiagnostics, Pipeline, "DatadogMonitorResource.GetLinkedResources", "value", "nextLink", cancellationToken); } /// @@ -835,7 +831,7 @@ public virtual Pageable GetLinkedResources(CancellationToken cancel /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -844,12 +840,12 @@ public virtual Pageable GetLinkedResources(CancellationToken cancel /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetMonitoredResourcesAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetMonitoredResourcesAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogMonitorResourceMonitorsRestClient.CreateListMonitoredResourcesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogMonitorResourceMonitorsRestClient.CreateListMonitoredResourcesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => MonitoredResourceContent.DeserializeMonitoredResourceContent(e), _datadogMonitorResourceMonitorsClientDiagnostics, Pipeline, "DatadogMonitorResource.GetMonitoredResources", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogMonitorMonitorsRestClient.CreateListMonitoredResourcesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogMonitorMonitorsRestClient.CreateListMonitoredResourcesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DatadogMonitoredResourceResult.DeserializeDatadogMonitoredResourceResult(e), _datadogMonitorMonitorsClientDiagnostics, Pipeline, "DatadogMonitorResource.GetMonitoredResources", "value", "nextLink", cancellationToken); } /// @@ -865,7 +861,7 @@ public virtual AsyncPageable GetMonitoredResourcesAsyn /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -874,12 +870,12 @@ public virtual AsyncPageable GetMonitoredResourcesAsyn /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetMonitoredResources(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetMonitoredResources(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogMonitorResourceMonitorsRestClient.CreateListMonitoredResourcesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogMonitorResourceMonitorsRestClient.CreateListMonitoredResourcesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => MonitoredResourceContent.DeserializeMonitoredResourceContent(e), _datadogMonitorResourceMonitorsClientDiagnostics, Pipeline, "DatadogMonitorResource.GetMonitoredResources", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogMonitorMonitorsRestClient.CreateListMonitoredResourcesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogMonitorMonitorsRestClient.CreateListMonitoredResourcesNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DatadogMonitoredResourceResult.DeserializeDatadogMonitoredResourceResult(e), _datadogMonitorMonitorsClientDiagnostics, Pipeline, "DatadogMonitorResource.GetMonitoredResources", "value", "nextLink", cancellationToken); } /// @@ -895,7 +891,7 @@ public virtual Pageable GetMonitoredResources(Cancella /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -906,11 +902,11 @@ public virtual Pageable GetMonitoredResources(Cancella /// The cancellation token to use. public virtual async Task> RefreshSetPasswordLinkAsync(CancellationToken cancellationToken = default) { - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.RefreshSetPasswordLink"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.RefreshSetPasswordLink"); scope.Start(); try { - var response = await _datadogMonitorResourceMonitorsRestClient.RefreshSetPasswordLinkAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _datadogMonitorMonitorsRestClient.RefreshSetPasswordLinkAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -933,7 +929,7 @@ public virtual async Task> RefreshSetPasswordLi /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -944,11 +940,11 @@ public virtual async Task> RefreshSetPasswordLi /// The cancellation token to use. public virtual Response RefreshSetPasswordLink(CancellationToken cancellationToken = default) { - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.RefreshSetPasswordLink"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.RefreshSetPasswordLink"); scope.Start(); try { - var response = _datadogMonitorResourceMonitorsRestClient.RefreshSetPasswordLink(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _datadogMonitorMonitorsRestClient.RefreshSetPasswordLink(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -958,6 +954,230 @@ public virtual Response RefreshSetPasswordLink(Cancellat } } + /// + /// Set the default api key. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/setDefaultKey + /// + /// + /// Operation Id + /// Monitors_SetDefaultKey + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// Resource + /// + /// + /// + /// + /// The to use. + /// The cancellation token to use. + public virtual async Task SetDefaultKeyAsync(DatadogApiKey body = null, CancellationToken cancellationToken = default) + { + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.SetDefaultKey"); + scope.Start(); + try + { + var response = await _datadogMonitorMonitorsRestClient.SetDefaultKeyAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Set the default api key. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/setDefaultKey + /// + /// + /// Operation Id + /// Monitors_SetDefaultKey + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// Resource + /// + /// + /// + /// + /// The to use. + /// The cancellation token to use. + public virtual Response SetDefaultKey(DatadogApiKey body = null, CancellationToken cancellationToken = default) + { + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.SetDefaultKey"); + scope.Start(); + try + { + var response = _datadogMonitorMonitorsRestClient.SetDefaultKey(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get marketplace and organization info mapped to the given monitor. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/getBillingInfo + /// + /// + /// Operation Id + /// BillingInfo_Get + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetBillingInfoAsync(CancellationToken cancellationToken = default) + { + using var scope = _billingInfoClientDiagnostics.CreateScope("DatadogMonitorResource.GetBillingInfo"); + scope.Start(); + try + { + var response = await _billingInfoRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get marketplace and organization info mapped to the given monitor. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/getBillingInfo + /// + /// + /// Operation Id + /// BillingInfo_Get + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetBillingInfo(CancellationToken cancellationToken = default) + { + using var scope = _billingInfoClientDiagnostics.CreateScope("DatadogMonitorResource.GetBillingInfo"); + scope.Start(); + try + { + var response = _billingInfoRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Reinstate integration with your Datadog organization by choosing one of the available subscription plans. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/resubscribe + /// + /// + /// Operation Id + /// Organizations_Resubscribe + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resubscribe Properties. + /// The cancellation token to use. + public virtual async Task> ResubscribeOrganizationAsync(WaitUntil waitUntil, ResubscribeOrganizationContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _organizationsClientDiagnostics.CreateScope("DatadogMonitorResource.ResubscribeOrganization"); + scope.Start(); + try + { + var response = await _organizationsRestClient.ResubscribeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new DatadogArmOperation(new DatadogMonitorOperationSource(Client), _organizationsClientDiagnostics, Pipeline, _organizationsRestClient.CreateResubscribeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Reinstate integration with your Datadog organization by choosing one of the available subscription plans. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/resubscribe + /// + /// + /// Operation Id + /// Organizations_Resubscribe + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resubscribe Properties. + /// The cancellation token to use. + public virtual ArmOperation ResubscribeOrganization(WaitUntil waitUntil, ResubscribeOrganizationContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _organizationsClientDiagnostics.CreateScope("DatadogMonitorResource.ResubscribeOrganization"); + scope.Start(); + try + { + var response = _organizationsRestClient.Resubscribe(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new DatadogArmOperation(new DatadogMonitorOperationSource(Client), _organizationsClientDiagnostics, Pipeline, _organizationsRestClient.CreateResubscribeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Add a tag to the current resource. /// @@ -971,7 +1191,7 @@ public virtual Response RefreshSetPasswordLink(Cancellat /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -988,7 +1208,7 @@ public virtual async Task> AddTagAsync(string k Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.AddTag"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.AddTag"); scope.Start(); try { @@ -997,13 +1217,13 @@ public virtual async Task> AddTagAsync(string k var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues[key] = value; await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _datadogMonitorResourceMonitorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var originalResponse = await _datadogMonitorMonitorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return Response.FromValue(new DatadogMonitorResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new DatadogMonitorResourcePatch(); + var patch = new DatadogMonitorPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -1033,7 +1253,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -1050,7 +1270,7 @@ public virtual Response AddTag(string key, string value, Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.AddTag"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.AddTag"); scope.Start(); try { @@ -1059,13 +1279,13 @@ public virtual Response AddTag(string key, string value, var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _datadogMonitorResourceMonitorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var originalResponse = _datadogMonitorMonitorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return Response.FromValue(new DatadogMonitorResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new DatadogMonitorResourcePatch(); + var patch = new DatadogMonitorPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -1095,7 +1315,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -1110,7 +1330,7 @@ public virtual async Task> SetTagsAsync(IDictio { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.SetTags"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.SetTags"); scope.Start(); try { @@ -1120,13 +1340,13 @@ public virtual async Task> SetTagsAsync(IDictio var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.ReplaceWith(tags); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _datadogMonitorResourceMonitorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var originalResponse = await _datadogMonitorMonitorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return Response.FromValue(new DatadogMonitorResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new DatadogMonitorResourcePatch(); + var patch = new DatadogMonitorPatch(); patch.Tags.ReplaceWith(tags); var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); @@ -1152,7 +1372,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -1167,7 +1387,7 @@ public virtual Response SetTags(IDictionary SetTags(IDictionary SetTags(IDictionary /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -1224,7 +1444,7 @@ public virtual async Task> RemoveTagAsync(strin { Argument.AssertNotNull(key, nameof(key)); - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.RemoveTag"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.RemoveTag"); scope.Start(); try { @@ -1233,13 +1453,13 @@ public virtual async Task> RemoveTagAsync(strin var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.Remove(key); await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _datadogMonitorResourceMonitorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var originalResponse = await _datadogMonitorMonitorsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return Response.FromValue(new DatadogMonitorResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new DatadogMonitorResourcePatch(); + var patch = new DatadogMonitorPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -1269,7 +1489,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -1284,7 +1504,7 @@ public virtual Response RemoveTag(string key, Cancellati { Argument.AssertNotNull(key, nameof(key)); - using var scope = _datadogMonitorResourceMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.RemoveTag"); + using var scope = _datadogMonitorMonitorsClientDiagnostics.CreateScope("DatadogMonitorResource.RemoveTag"); scope.Start(); try { @@ -1293,13 +1513,13 @@ public virtual Response RemoveTag(string key, Cancellati var originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _datadogMonitorResourceMonitorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var originalResponse = _datadogMonitorMonitorsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return Response.FromValue(new DatadogMonitorResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new DatadogMonitorResourcePatch(); + var patch = new DatadogMonitorPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitoredSubscriptionCollection.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitoredSubscriptionCollection.cs new file mode 100644 index 000000000000..a1eb6e72aaa4 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitoredSubscriptionCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Datadog +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDatadogMonitoredSubscriptions method from an instance of . + /// + public partial class DatadogMonitoredSubscriptionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics; + private readonly MonitoredSubscriptionsRestOperations _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected DatadogMonitoredSubscriptionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DatadogMonitoredSubscriptionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Datadog", DatadogMonitoredSubscriptionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DatadogMonitoredSubscriptionResource.ResourceType, out string datadogMonitoredSubscriptionMonitoredSubscriptionsApiVersion); + _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient = new MonitoredSubscriptionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, datadogMonitoredSubscriptionMonitoredSubscriptionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DatadogMonitorResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DatadogMonitorResource.ResourceType), nameof(id)); + } + + /// + /// Add the subscriptions that should be monitored by the Datadog monitor resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_CreateorUpdate + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The configuration name. Only 'default' value is supported. + /// The to use. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string configurationName, DatadogMonitoredSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("DatadogMonitoredSubscriptionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateorUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, data, cancellationToken).ConfigureAwait(false); + var operation = new DatadogArmOperation(new DatadogMonitoredSubscriptionOperationSource(Client), _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics, Pipeline, _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateCreateorUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add the subscriptions that should be monitored by the Datadog monitor resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_CreateorUpdate + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The configuration name. Only 'default' value is supported. + /// The to use. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string configurationName, DatadogMonitoredSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("DatadogMonitoredSubscriptionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateorUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, data, cancellationToken); + var operation = new DatadogArmOperation(new DatadogMonitoredSubscriptionOperationSource(Client), _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics, Pipeline, _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateCreateorUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List the subscriptions currently being monitored by the Datadog monitor resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// Resource + /// + /// + /// + /// + /// The configuration name. Only 'default' value is supported. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string configurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + + using var scope = _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("DatadogMonitoredSubscriptionCollection.Get"); + scope.Start(); + try + { + var response = await _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DatadogMonitoredSubscriptionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List the subscriptions currently being monitored by the Datadog monitor resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// Resource + /// + /// + /// + /// + /// The configuration name. Only 'default' value is supported. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string configurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + + using var scope = _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("DatadogMonitoredSubscriptionCollection.Get"); + scope.Start(); + try + { + var response = _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DatadogMonitoredSubscriptionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List the subscriptions currently being monitored by the Datadog monitor resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions + /// + /// + /// Operation Id + /// MonitoredSubscriptions_List + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DatadogMonitoredSubscriptionResource(Client, DatadogMonitoredSubscriptionData.DeserializeDatadogMonitoredSubscriptionData(e)), _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics, Pipeline, "DatadogMonitoredSubscriptionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List the subscriptions currently being monitored by the Datadog monitor resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions + /// + /// + /// Operation Id + /// MonitoredSubscriptions_List + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DatadogMonitoredSubscriptionResource(Client, DatadogMonitoredSubscriptionData.DeserializeDatadogMonitoredSubscriptionData(e)), _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics, Pipeline, "DatadogMonitoredSubscriptionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// Resource + /// + /// + /// + /// + /// The configuration name. Only 'default' value is supported. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string configurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + + using var scope = _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("DatadogMonitoredSubscriptionCollection.Exists"); + scope.Start(); + try + { + var response = await _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// Resource + /// + /// + /// + /// + /// The configuration name. Only 'default' value is supported. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string configurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + + using var scope = _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("DatadogMonitoredSubscriptionCollection.Exists"); + scope.Start(); + try + { + var response = _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// Resource + /// + /// + /// + /// + /// The configuration name. Only 'default' value is supported. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string configurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + + using var scope = _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("DatadogMonitoredSubscriptionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DatadogMonitoredSubscriptionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// Resource + /// + /// + /// + /// + /// The configuration name. Only 'default' value is supported. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string configurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + + using var scope = _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("DatadogMonitoredSubscriptionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DatadogMonitoredSubscriptionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitoredSubscriptionData.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitoredSubscriptionData.Serialization.cs new file mode 100644 index 000000000000..3a23bb81557c --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitoredSubscriptionData.Serialization.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Datadog.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Datadog +{ + public partial class DatadogMonitoredSubscriptionData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatadogMonitoredSubscriptionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DatadogMonitoredSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatadogMonitoredSubscriptionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatadogMonitoredSubscriptionData(document.RootElement, options); + } + + internal static DatadogMonitoredSubscriptionData DeserializeDatadogMonitoredSubscriptionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DatadogSubscriptionProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DatadogSubscriptionProperties.DeserializeDatadogSubscriptionProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerDatadogContext.Default); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatadogMonitoredSubscriptionData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); + default: + throw new FormatException($"The model {nameof(DatadogMonitoredSubscriptionData)} does not support writing '{options.Format}' format."); + } + } + + DatadogMonitoredSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDatadogMonitoredSubscriptionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatadogMonitoredSubscriptionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitoredSubscriptionData.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitoredSubscriptionData.cs new file mode 100644 index 000000000000..e60b99ffd0f1 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitoredSubscriptionData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Datadog.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Datadog +{ + /// + /// A class representing the DatadogMonitoredSubscription data model. + /// The request to update subscriptions needed to be monitored by the Datadog monitor resource. + /// + public partial class DatadogMonitoredSubscriptionData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DatadogMonitoredSubscriptionData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The request to update subscriptions needed to be monitored by the Datadog monitor resource. + /// Keeps track of any properties unknown to the library. + internal DatadogMonitoredSubscriptionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DatadogSubscriptionProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The request to update subscriptions needed to be monitored by the Datadog monitor resource. + public DatadogSubscriptionProperties Properties { get; set; } + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitoredSubscriptionResource.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitoredSubscriptionResource.Serialization.cs new file mode 100644 index 000000000000..09e90fdf22f3 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitoredSubscriptionResource.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.Datadog +{ + public partial class DatadogMonitoredSubscriptionResource : IJsonModel + { + private static DatadogMonitoredSubscriptionData s_dataDeserializationInstance; + private static DatadogMonitoredSubscriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DatadogMonitoredSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDatadogContext.Default); + + DatadogMonitoredSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDatadogContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitoredSubscriptionResource.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitoredSubscriptionResource.cs new file mode 100644 index 000000000000..ca0feef4db52 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitoredSubscriptionResource.cs @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Datadog +{ + /// + /// A Class representing a DatadogMonitoredSubscription along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDatadogMonitoredSubscriptionResource method. + /// Otherwise you can get one from its parent resource using the GetDatadogMonitoredSubscription method. + /// + public partial class DatadogMonitoredSubscriptionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The monitorName. + /// The configurationName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string monitorName, string configurationName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics; + private readonly MonitoredSubscriptionsRestOperations _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient; + private readonly DatadogMonitoredSubscriptionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Datadog/monitors/monitoredSubscriptions"; + + /// Initializes a new instance of the class for mocking. + protected DatadogMonitoredSubscriptionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DatadogMonitoredSubscriptionResource(ArmClient client, DatadogMonitoredSubscriptionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DatadogMonitoredSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Datadog", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string datadogMonitoredSubscriptionMonitoredSubscriptionsApiVersion); + _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient = new MonitoredSubscriptionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, datadogMonitoredSubscriptionMonitoredSubscriptionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DatadogMonitoredSubscriptionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// List the subscriptions currently being monitored by the Datadog monitor resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("DatadogMonitoredSubscriptionResource.Get"); + scope.Start(); + try + { + var response = await _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DatadogMonitoredSubscriptionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List the subscriptions currently being monitored by the Datadog monitor resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Get + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("DatadogMonitoredSubscriptionResource.Get"); + scope.Start(); + try + { + var response = _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DatadogMonitoredSubscriptionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the subscriptions that are being monitored by the Datadog monitor resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Delete + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("DatadogMonitoredSubscriptionResource.Delete"); + scope.Start(); + try + { + var response = await _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DatadogArmOperation(_datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics, Pipeline, _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the subscriptions that are being monitored by the Datadog monitor resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Delete + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("DatadogMonitoredSubscriptionResource.Delete"); + scope.Start(); + try + { + var response = _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DatadogArmOperation(_datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics, Pipeline, _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the subscriptions that are being monitored by the Datadog monitor resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Update + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DatadogMonitoredSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("DatadogMonitoredSubscriptionResource.Update"); + scope.Start(); + try + { + var response = await _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new DatadogArmOperation(new DatadogMonitoredSubscriptionOperationSource(Client), _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics, Pipeline, _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the subscriptions that are being monitored by the Datadog monitor resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Datadog/monitors/{monitorName}/monitoredSubscriptions/{configurationName} + /// + /// + /// Operation Id + /// MonitoredSubscriptions_Update + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The to use. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DatadogMonitoredSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics.CreateScope("DatadogMonitoredSubscriptionResource.Update"); + scope.Start(); + try + { + var response = _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new DatadogArmOperation(new DatadogMonitoredSubscriptionOperationSource(Client), _datadogMonitoredSubscriptionMonitoredSubscriptionsClientDiagnostics, Pipeline, _datadogMonitoredSubscriptionMonitoredSubscriptionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnResourceCollection.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnCollection.cs similarity index 75% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnResourceCollection.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnCollection.cs index b070cf293b74..504907caa026 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnResourceCollection.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnCollection.cs @@ -20,26 +20,26 @@ namespace Azure.ResourceManager.Datadog /// /// A class representing a collection of and their operations. /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetDatadogSingleSignOnResources method from an instance of . + /// To get a instance call the GetDatadogSingleSignOns method from an instance of . /// - public partial class DatadogSingleSignOnResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class DatadogSingleSignOnCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _datadogSingleSignOnResourceSingleSignOnConfigurationsClientDiagnostics; - private readonly SingleSignOnConfigurationsRestOperations _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient; + private readonly ClientDiagnostics _datadogSingleSignOnSingleSignOnConfigurationsClientDiagnostics; + private readonly SingleSignOnConfigurationsRestOperations _datadogSingleSignOnSingleSignOnConfigurationsRestClient; - /// Initializes a new instance of the class for mocking. - protected DatadogSingleSignOnResourceCollection() + /// Initializes a new instance of the class for mocking. + protected DatadogSingleSignOnCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal DatadogSingleSignOnResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal DatadogSingleSignOnCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _datadogSingleSignOnResourceSingleSignOnConfigurationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Datadog", DatadogSingleSignOnResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DatadogSingleSignOnResource.ResourceType, out string datadogSingleSignOnResourceSingleSignOnConfigurationsApiVersion); - _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient = new SingleSignOnConfigurationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, datadogSingleSignOnResourceSingleSignOnConfigurationsApiVersion); + _datadogSingleSignOnSingleSignOnConfigurationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Datadog", DatadogSingleSignOnResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DatadogSingleSignOnResource.ResourceType, out string datadogSingleSignOnSingleSignOnConfigurationsApiVersion); + _datadogSingleSignOnSingleSignOnConfigurationsRestClient = new SingleSignOnConfigurationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, datadogSingleSignOnSingleSignOnConfigurationsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -74,21 +74,21 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Configuration name. - /// The to use. + /// The to use. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string configurationName, DatadogSingleSignOnResourceData data, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string configurationName, DatadogSingleSignOnData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _datadogSingleSignOnResourceSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnResourceCollection.CreateOrUpdate"); + using var scope = _datadogSingleSignOnSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, data, cancellationToken).ConfigureAwait(false); - var operation = new DatadogArmOperation(new DatadogSingleSignOnResourceOperationSource(Client), _datadogSingleSignOnResourceSingleSignOnConfigurationsClientDiagnostics, Pipeline, _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _datadogSingleSignOnSingleSignOnConfigurationsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, data, cancellationToken).ConfigureAwait(false); + var operation = new DatadogArmOperation(new DatadogSingleSignOnOperationSource(Client), _datadogSingleSignOnSingleSignOnConfigurationsClientDiagnostics, Pipeline, _datadogSingleSignOnSingleSignOnConfigurationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -123,21 +123,21 @@ public virtual async Task> CreateOrUpd /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// Configuration name. - /// The to use. + /// The to use. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string configurationName, DatadogSingleSignOnResourceData data, CancellationToken cancellationToken = default) + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string configurationName, DatadogSingleSignOnData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _datadogSingleSignOnResourceSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnResourceCollection.CreateOrUpdate"); + using var scope = _datadogSingleSignOnSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnCollection.CreateOrUpdate"); scope.Start(); try { - var response = _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, data, cancellationToken); - var operation = new DatadogArmOperation(new DatadogSingleSignOnResourceOperationSource(Client), _datadogSingleSignOnResourceSingleSignOnConfigurationsClientDiagnostics, Pipeline, _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _datadogSingleSignOnSingleSignOnConfigurationsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, data, cancellationToken); + var operation = new DatadogArmOperation(new DatadogSingleSignOnOperationSource(Client), _datadogSingleSignOnSingleSignOnConfigurationsClientDiagnostics, Pipeline, _datadogSingleSignOnSingleSignOnConfigurationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -178,11 +178,11 @@ public virtual async Task> GetAsync(string { Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - using var scope = _datadogSingleSignOnResourceSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnResourceCollection.Get"); + using var scope = _datadogSingleSignOnSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnCollection.Get"); scope.Start(); try { - var response = await _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken).ConfigureAwait(false); + var response = await _datadogSingleSignOnSingleSignOnConfigurationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new DatadogSingleSignOnResource(Client, response.Value), response.GetRawResponse()); @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -223,11 +223,11 @@ public virtual Response Get(string configurationNam { Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - using var scope = _datadogSingleSignOnResourceSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnResourceCollection.Get"); + using var scope = _datadogSingleSignOnSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnCollection.Get"); scope.Start(); try { - var response = _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken); + var response = _datadogSingleSignOnSingleSignOnConfigurationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new DatadogSingleSignOnResource(Client, response.Value), response.GetRawResponse()); @@ -252,7 +252,7 @@ public virtual Response Get(string configurationNam /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -264,9 +264,9 @@ public virtual Response Get(string configurationNam /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DatadogSingleSignOnResource(Client, DatadogSingleSignOnResourceData.DeserializeDatadogSingleSignOnResourceData(e)), _datadogSingleSignOnResourceSingleSignOnConfigurationsClientDiagnostics, Pipeline, "DatadogSingleSignOnResourceCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogSingleSignOnSingleSignOnConfigurationsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogSingleSignOnSingleSignOnConfigurationsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DatadogSingleSignOnResource(Client, DatadogSingleSignOnData.DeserializeDatadogSingleSignOnData(e)), _datadogSingleSignOnSingleSignOnConfigurationsClientDiagnostics, Pipeline, "DatadogSingleSignOnCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -294,9 +294,9 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DatadogSingleSignOnResource(Client, DatadogSingleSignOnResourceData.DeserializeDatadogSingleSignOnResourceData(e)), _datadogSingleSignOnResourceSingleSignOnConfigurationsClientDiagnostics, Pipeline, "DatadogSingleSignOnResourceCollection.GetAll", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _datadogSingleSignOnSingleSignOnConfigurationsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _datadogSingleSignOnSingleSignOnConfigurationsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DatadogSingleSignOnResource(Client, DatadogSingleSignOnData.DeserializeDatadogSingleSignOnData(e)), _datadogSingleSignOnSingleSignOnConfigurationsClientDiagnostics, Pipeline, "DatadogSingleSignOnCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -328,11 +328,11 @@ public virtual async Task> ExistsAsync(string configurationName, { Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - using var scope = _datadogSingleSignOnResourceSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnResourceCollection.Exists"); + using var scope = _datadogSingleSignOnSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnCollection.Exists"); scope.Start(); try { - var response = await _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _datadogSingleSignOnSingleSignOnConfigurationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string configurationName, /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -371,11 +371,11 @@ public virtual Response Exists(string configurationName, CancellationToken { Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - using var scope = _datadogSingleSignOnResourceSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnResourceCollection.Exists"); + using var scope = _datadogSingleSignOnSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnCollection.Exists"); scope.Start(); try { - var response = _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken: cancellationToken); + var response = _datadogSingleSignOnSingleSignOnConfigurationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -398,7 +398,7 @@ public virtual Response Exists(string configurationName, CancellationToken /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -414,11 +414,11 @@ public virtual async Task> GetIfEx { Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - using var scope = _datadogSingleSignOnResourceSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnResourceCollection.GetIfExists"); + using var scope = _datadogSingleSignOnSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnCollection.GetIfExists"); scope.Start(); try { - var response = await _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _datadogSingleSignOnSingleSignOnConfigurationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new DatadogSingleSignOnResource(Client, response.Value), response.GetRawResponse()); @@ -443,7 +443,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -459,11 +459,11 @@ public virtual NullableResponse GetIfExists(string { Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - using var scope = _datadogSingleSignOnResourceSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnResourceCollection.GetIfExists"); + using var scope = _datadogSingleSignOnSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnCollection.GetIfExists"); scope.Start(); try { - var response = _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken: cancellationToken); + var response = _datadogSingleSignOnSingleSignOnConfigurationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configurationName, cancellationToken: cancellationToken); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new DatadogSingleSignOnResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnResourceData.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnData.Serialization.cs similarity index 71% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnResourceData.Serialization.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnData.Serialization.cs index 4a57883f215e..c3da518207ed 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnResourceData.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnData.Serialization.cs @@ -16,11 +16,11 @@ namespace Azure.ResourceManager.Datadog { - public partial class DatadogSingleSignOnResourceData : IUtf8JsonSerializable, IJsonModel + public partial class DatadogSingleSignOnData : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -31,10 +31,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo /// The client options for reading and writing models. protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(DatadogSingleSignOnResourceData)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(DatadogSingleSignOnData)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); @@ -45,19 +45,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } } - DatadogSingleSignOnResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DatadogSingleSignOnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(DatadogSingleSignOnResourceData)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(DatadogSingleSignOnData)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDatadogSingleSignOnResourceData(document.RootElement, options); + return DeserializeDatadogSingleSignOnData(document.RootElement, options); } - internal static DatadogSingleSignOnResourceData DeserializeDatadogSingleSignOnResourceData(JsonElement element, ModelReaderWriterOptions options = null) + internal static DatadogSingleSignOnData DeserializeDatadogSingleSignOnData(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -113,7 +113,7 @@ internal static DatadogSingleSignOnResourceData DeserializeDatadogSingleSignOnRe } } serializedAdditionalRawData = rawDataDictionary; - return new DatadogSingleSignOnResourceData( + return new DatadogSingleSignOnData( id, name, type, @@ -122,35 +122,35 @@ internal static DatadogSingleSignOnResourceData DeserializeDatadogSingleSignOnRe serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); default: - throw new FormatException($"The model {nameof(DatadogSingleSignOnResourceData)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogSingleSignOnData)} does not support writing '{options.Format}' format."); } } - DatadogSingleSignOnResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DatadogSingleSignOnData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeDatadogSingleSignOnResourceData(document.RootElement, options); + return DeserializeDatadogSingleSignOnData(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DatadogSingleSignOnResourceData)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogSingleSignOnData)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnResourceData.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnData.cs similarity index 79% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnResourceData.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnData.cs index a3e010664292..5ea218c7df85 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnResourceData.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnData.cs @@ -13,8 +13,11 @@ namespace Azure.ResourceManager.Datadog { - /// A class representing the DatadogSingleSignOnResource data model. - public partial class DatadogSingleSignOnResourceData : ResourceData + /// + /// A class representing the DatadogSingleSignOn data model. + /// Concrete proxy resource types can be created by aliasing this type using a specific property type. + /// + public partial class DatadogSingleSignOnData : ResourceData { /// /// Keeps track of any properties unknown to the library. @@ -48,19 +51,19 @@ public partial class DatadogSingleSignOnResourceData : ResourceData /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public DatadogSingleSignOnResourceData() + /// Initializes a new instance of . + public DatadogSingleSignOnData() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// /// Keeps track of any properties unknown to the library. - internal DatadogSingleSignOnResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DatadogSingleSignOnProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal DatadogSingleSignOnData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DatadogSingleSignOnProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Properties = properties; _serializedAdditionalRawData = serializedAdditionalRawData; diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnResource.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnResource.Serialization.cs index 1063f82f5d67..de006a8f7eb2 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnResource.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnResource.Serialization.cs @@ -11,19 +11,19 @@ namespace Azure.ResourceManager.Datadog { - public partial class DatadogSingleSignOnResource : IJsonModel + public partial class DatadogSingleSignOnResource : IJsonModel { - private static DatadogSingleSignOnResourceData s_dataDeserializationInstance; - private static DatadogSingleSignOnResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + private static DatadogSingleSignOnData s_dataDeserializationInstance; + private static DatadogSingleSignOnData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatadogSingleSignOnResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + DatadogSingleSignOnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDatadogContext.Default); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDatadogContext.Default); - DatadogSingleSignOnResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDatadogContext.Default); + DatadogSingleSignOnData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDatadogContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnResource.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnResource.cs index 249f4195b7a9..11f2e80b8426 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnResource.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnResource.cs @@ -15,10 +15,10 @@ namespace Azure.ResourceManager.Datadog { /// - /// A Class representing a DatadogSingleSignOnResource along with the instance operations that can be performed on it. + /// A Class representing a DatadogSingleSignOn along with the instance operations that can be performed on it. /// If you have a you can construct a /// from an instance of using the GetDatadogSingleSignOnResource method. - /// Otherwise you can get one from its parent resource using the GetDatadogSingleSignOnResource method. + /// Otherwise you can get one from its parent resource using the GetDatadogSingleSignOn method. /// public partial class DatadogSingleSignOnResource : ArmResource { @@ -33,9 +33,9 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _datadogSingleSignOnResourceSingleSignOnConfigurationsClientDiagnostics; - private readonly SingleSignOnConfigurationsRestOperations _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient; - private readonly DatadogSingleSignOnResourceData _data; + private readonly ClientDiagnostics _datadogSingleSignOnSingleSignOnConfigurationsClientDiagnostics; + private readonly SingleSignOnConfigurationsRestOperations _datadogSingleSignOnSingleSignOnConfigurationsRestClient; + private readonly DatadogSingleSignOnData _data; /// Gets the resource type for the operations. public static readonly ResourceType ResourceType = "Microsoft.Datadog/monitors/singleSignOnConfigurations"; @@ -48,7 +48,7 @@ protected DatadogSingleSignOnResource() /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal DatadogSingleSignOnResource(ArmClient client, DatadogSingleSignOnResourceData data) : this(client, data.Id) + internal DatadogSingleSignOnResource(ArmClient client, DatadogSingleSignOnData data) : this(client, data.Id) { HasData = true; _data = data; @@ -59,9 +59,9 @@ internal DatadogSingleSignOnResource(ArmClient client, DatadogSingleSignOnResour /// The identifier of the resource that is the target of operations. internal DatadogSingleSignOnResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _datadogSingleSignOnResourceSingleSignOnConfigurationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Datadog", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string datadogSingleSignOnResourceSingleSignOnConfigurationsApiVersion); - _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient = new SingleSignOnConfigurationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, datadogSingleSignOnResourceSingleSignOnConfigurationsApiVersion); + _datadogSingleSignOnSingleSignOnConfigurationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Datadog", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string datadogSingleSignOnSingleSignOnConfigurationsApiVersion); + _datadogSingleSignOnSingleSignOnConfigurationsRestClient = new SingleSignOnConfigurationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, datadogSingleSignOnSingleSignOnConfigurationsApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -72,7 +72,7 @@ internal DatadogSingleSignOnResource(ArmClient client, ResourceIdentifier id) : /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual DatadogSingleSignOnResourceData Data + public virtual DatadogSingleSignOnData Data { get { @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -112,11 +112,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _datadogSingleSignOnResourceSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnResource.Get"); + using var scope = _datadogSingleSignOnSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnResource.Get"); scope.Start(); try { - var response = await _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _datadogSingleSignOnSingleSignOnConfigurationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new DatadogSingleSignOnResource(Client, response.Value), response.GetRawResponse()); @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -152,11 +152,11 @@ public virtual async Task> GetAsync(Cancel /// The cancellation token to use. public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _datadogSingleSignOnResourceSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnResource.Get"); + using var scope = _datadogSingleSignOnSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnResource.Get"); scope.Start(); try { - var response = _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var response = _datadogSingleSignOnSingleSignOnConfigurationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new DatadogSingleSignOnResource(Client, response.Value), response.GetRawResponse()); @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -190,19 +190,19 @@ public virtual Response Get(CancellationToken cance /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. + /// The to use. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DatadogSingleSignOnResourceData data, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DatadogSingleSignOnData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _datadogSingleSignOnResourceSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnResource.Update"); + using var scope = _datadogSingleSignOnSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnResource.Update"); scope.Start(); try { - var response = await _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new DatadogArmOperation(new DatadogSingleSignOnResourceOperationSource(Client), _datadogSingleSignOnResourceSingleSignOnConfigurationsClientDiagnostics, Pipeline, _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _datadogSingleSignOnSingleSignOnConfigurationsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new DatadogArmOperation(new DatadogSingleSignOnOperationSource(Client), _datadogSingleSignOnSingleSignOnConfigurationsClientDiagnostics, Pipeline, _datadogSingleSignOnSingleSignOnConfigurationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -227,7 +227,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -236,19 +236,19 @@ public virtual async Task> UpdateAsync /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. + /// The to use. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DatadogSingleSignOnResourceData data, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, DatadogSingleSignOnData data, CancellationToken cancellationToken = default) { Argument.AssertNotNull(data, nameof(data)); - using var scope = _datadogSingleSignOnResourceSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnResource.Update"); + using var scope = _datadogSingleSignOnSingleSignOnConfigurationsClientDiagnostics.CreateScope("DatadogSingleSignOnResource.Update"); scope.Start(); try { - var response = _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new DatadogArmOperation(new DatadogSingleSignOnResourceOperationSource(Client), _datadogSingleSignOnResourceSingleSignOnConfigurationsClientDiagnostics, Pipeline, _datadogSingleSignOnResourceSingleSignOnConfigurationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _datadogSingleSignOnSingleSignOnConfigurationsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new DatadogArmOperation(new DatadogSingleSignOnOperationSource(Client), _datadogSingleSignOnSingleSignOnConfigurationsClientDiagnostics, Pipeline, _datadogSingleSignOnSingleSignOnConfigurationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Extensions/DatadogExtensions.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Extensions/DatadogExtensions.cs index 3ccd2696b82a..89adcec3fb42 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Extensions/DatadogExtensions.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Extensions/DatadogExtensions.cs @@ -53,22 +53,22 @@ public static DatadogMonitorResource GetDatadogMonitorResource(this ArmClient cl } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static MonitoringTagRuleResource GetMonitoringTagRuleResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DatadogMonitoredSubscriptionResource GetDatadogMonitoredSubscriptionResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableDatadogArmClient(client).GetMonitoringTagRuleResource(id); + return GetMockableDatadogArmClient(client).GetDatadogMonitoredSubscriptionResource(id); } /// @@ -90,21 +90,40 @@ public static DatadogSingleSignOnResource GetDatadogSingleSignOnResource(this Ar return GetMockableDatadogArmClient(client).GetDatadogSingleSignOnResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DataMonitoringTagRuleResource GetDataMonitoringTagRuleResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDatadogArmClient(client).GetDataMonitoringTagRuleResource(id); + } + /// /// Gets a collection of DatadogMonitorResources in the ResourceGroupResource. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// is null. /// An object representing collection of DatadogMonitorResources and their operations over a DatadogMonitorResource. - public static DatadogMonitorResourceCollection GetDatadogMonitorResources(this ResourceGroupResource resourceGroupResource) + public static DatadogMonitorCollection GetDatadogMonitors(this ResourceGroupResource resourceGroupResource) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableDatadogResourceGroupResource(resourceGroupResource).GetDatadogMonitorResources(); + return GetMockableDatadogResourceGroupResource(resourceGroupResource).GetDatadogMonitors(); } /// @@ -120,7 +139,7 @@ public static DatadogMonitorResourceCollection GetDatadogMonitorResources(this R /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -129,7 +148,7 @@ public static DatadogMonitorResourceCollection GetDatadogMonitorResources(this R /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. @@ -138,11 +157,11 @@ public static DatadogMonitorResourceCollection GetDatadogMonitorResources(this R /// or is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static async Task> GetDatadogMonitorResourceAsync(this ResourceGroupResource resourceGroupResource, string monitorName, CancellationToken cancellationToken = default) + public static async Task> GetDatadogMonitorAsync(this ResourceGroupResource resourceGroupResource, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockableDatadogResourceGroupResource(resourceGroupResource).GetDatadogMonitorResourceAsync(monitorName, cancellationToken).ConfigureAwait(false); + return await GetMockableDatadogResourceGroupResource(resourceGroupResource).GetDatadogMonitorAsync(monitorName, cancellationToken).ConfigureAwait(false); } /// @@ -158,7 +177,7 @@ public static async Task> GetDatadogMonitorReso /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -167,7 +186,7 @@ public static async Task> GetDatadogMonitorReso /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. @@ -176,11 +195,11 @@ public static async Task> GetDatadogMonitorReso /// or is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static Response GetDatadogMonitorResource(this ResourceGroupResource resourceGroupResource, string monitorName, CancellationToken cancellationToken = default) + public static Response GetDatadogMonitor(this ResourceGroupResource resourceGroupResource, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableDatadogResourceGroupResource(resourceGroupResource).GetDatadogMonitorResource(monitorName, cancellationToken); + return GetMockableDatadogResourceGroupResource(resourceGroupResource).GetDatadogMonitor(monitorName, cancellationToken); } /// @@ -196,7 +215,7 @@ public static Response GetDatadogMonitorResource(this Re /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// @@ -207,8 +226,8 @@ public static Response GetDatadogMonitorResource(this Re /// The instance the method will execute against. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetMarketplaceAgreementsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetMarketplaceAgreementsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -228,7 +247,7 @@ public static AsyncPageable GetMarketplaceAg /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// @@ -239,8 +258,8 @@ public static AsyncPageable GetMarketplaceAg /// The instance the method will execute against. /// The cancellation token to use. /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetMarketplaceAgreements(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetMarketplaceAgreements(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -260,19 +279,19 @@ public static Pageable GetMarketplaceAgreeme /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The to use. + /// The request body. /// The cancellation token to use. /// is null. - public static async Task> CreateOrUpdateMarketplaceAgreementAsync(this SubscriptionResource subscriptionResource, DatadogAgreementResourceProperties body = null, CancellationToken cancellationToken = default) + public static async Task> CreateOrUpdateMarketplaceAgreementAsync(this SubscriptionResource subscriptionResource, DatadogAgreement body = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -292,19 +311,19 @@ public static async Task> CreateOrU /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The to use. + /// The request body. /// The cancellation token to use. /// is null. - public static Response CreateOrUpdateMarketplaceAgreement(this SubscriptionResource subscriptionResource, DatadogAgreementResourceProperties body = null, CancellationToken cancellationToken = default) + public static Response CreateOrUpdateMarketplaceAgreement(this SubscriptionResource subscriptionResource, DatadogAgreement body = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -324,7 +343,7 @@ public static Response CreateOrUpdateMarketp /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -333,18 +352,18 @@ public static Response CreateOrUpdateMarketp /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The cancellation token to use. /// is null. /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetDatadogMonitorResourcesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + public static AsyncPageable GetDatadogMonitorsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableDatadogSubscriptionResource(subscriptionResource).GetDatadogMonitorResourcesAsync(cancellationToken); + return GetMockableDatadogSubscriptionResource(subscriptionResource).GetDatadogMonitorsAsync(cancellationToken); } /// @@ -360,7 +379,7 @@ public static AsyncPageable GetDatadogMonitorResourcesAs /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -369,18 +388,148 @@ public static AsyncPageable GetDatadogMonitorResourcesAs /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The cancellation token to use. /// is null. /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetDatadogMonitorResources(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + public static Pageable GetDatadogMonitors(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDatadogSubscriptionResource(subscriptionResource).GetDatadogMonitors(cancellationToken); + } + + /// + /// Informs if the current subscription is being already monitored for selected Datadog organization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Datadog/subscriptionStatuses + /// + /// + /// Operation Id + /// CreationSupported_List + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Datadog Organization Id. + /// The cancellation token to use. + /// or is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetSubscriptionStatusesAsync(this SubscriptionResource subscriptionResource, string datadogOrganizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDatadogSubscriptionResource(subscriptionResource).GetSubscriptionStatusesAsync(datadogOrganizationId, cancellationToken); + } + + /// + /// Informs if the current subscription is being already monitored for selected Datadog organization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Datadog/subscriptionStatuses + /// + /// + /// Operation Id + /// CreationSupported_List + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Datadog Organization Id. + /// The cancellation token to use. + /// or is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetSubscriptionStatuses(this SubscriptionResource subscriptionResource, string datadogOrganizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDatadogSubscriptionResource(subscriptionResource).GetSubscriptionStatuses(datadogOrganizationId, cancellationToken); + } + + /// + /// Informs if the current subscription is being already monitored for selected Datadog organization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Datadog/subscriptionStatuses/default + /// + /// + /// Operation Id + /// CreationSupported_Get + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Datadog Organization Id. + /// The cancellation token to use. + /// or is null. + public static async Task> GetSubscriptionStatusAsync(this SubscriptionResource subscriptionResource, string datadogOrganizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableDatadogSubscriptionResource(subscriptionResource).GetSubscriptionStatusAsync(datadogOrganizationId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Informs if the current subscription is being already monitored for selected Datadog organization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Datadog/subscriptionStatuses/default + /// + /// + /// Operation Id + /// CreationSupported_Get + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Datadog Organization Id. + /// The cancellation token to use. + /// or is null. + public static Response GetSubscriptionStatus(this SubscriptionResource subscriptionResource, string datadogOrganizationId, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableDatadogSubscriptionResource(subscriptionResource).GetDatadogMonitorResources(cancellationToken); + return GetMockableDatadogSubscriptionResource(subscriptionResource).GetSubscriptionStatus(datadogOrganizationId, cancellationToken); } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Extensions/MockableDatadogArmClient.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Extensions/MockableDatadogArmClient.cs index 7246ba834fff..c3942b32222d 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Extensions/MockableDatadogArmClient.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Extensions/MockableDatadogArmClient.cs @@ -47,15 +47,15 @@ public virtual DatadogMonitorResource GetDatadogMonitorResource(ResourceIdentifi } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual MonitoringTagRuleResource GetMonitoringTagRuleResource(ResourceIdentifier id) + /// Returns a object. + public virtual DatadogMonitoredSubscriptionResource GetDatadogMonitoredSubscriptionResource(ResourceIdentifier id) { - MonitoringTagRuleResource.ValidateResourceId(id); - return new MonitoringTagRuleResource(Client, id); + DatadogMonitoredSubscriptionResource.ValidateResourceId(id); + return new DatadogMonitoredSubscriptionResource(Client, id); } /// @@ -69,5 +69,17 @@ public virtual DatadogSingleSignOnResource GetDatadogSingleSignOnResource(Resour DatadogSingleSignOnResource.ValidateResourceId(id); return new DatadogSingleSignOnResource(Client, id); } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DataMonitoringTagRuleResource GetDataMonitoringTagRuleResource(ResourceIdentifier id) + { + DataMonitoringTagRuleResource.ValidateResourceId(id); + return new DataMonitoringTagRuleResource(Client, id); + } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Extensions/MockableDatadogResourceGroupResource.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Extensions/MockableDatadogResourceGroupResource.cs index d7f7a5ce5c05..fda17084da15 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Extensions/MockableDatadogResourceGroupResource.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Extensions/MockableDatadogResourceGroupResource.cs @@ -35,9 +35,9 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// Gets a collection of DatadogMonitorResources in the ResourceGroupResource. /// An object representing collection of DatadogMonitorResources and their operations over a DatadogMonitorResource. - public virtual DatadogMonitorResourceCollection GetDatadogMonitorResources() + public virtual DatadogMonitorCollection GetDatadogMonitors() { - return GetCachedClient(client => new DatadogMonitorResourceCollection(client, Id)); + return GetCachedClient(client => new DatadogMonitorCollection(client, Id)); } /// @@ -53,7 +53,7 @@ public virtual DatadogMonitorResourceCollection GetDatadogMonitorResources() /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -66,9 +66,9 @@ public virtual DatadogMonitorResourceCollection GetDatadogMonitorResources() /// is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetDatadogMonitorResourceAsync(string monitorName, CancellationToken cancellationToken = default) + public virtual async Task> GetDatadogMonitorAsync(string monitorName, CancellationToken cancellationToken = default) { - return await GetDatadogMonitorResources().GetAsync(monitorName, cancellationToken).ConfigureAwait(false); + return await GetDatadogMonitors().GetAsync(monitorName, cancellationToken).ConfigureAwait(false); } /// @@ -84,7 +84,7 @@ public virtual async Task> GetDatadogMonitorRes /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -97,9 +97,9 @@ public virtual async Task> GetDatadogMonitorRes /// is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetDatadogMonitorResource(string monitorName, CancellationToken cancellationToken = default) + public virtual Response GetDatadogMonitor(string monitorName, CancellationToken cancellationToken = default) { - return GetDatadogMonitorResources().Get(monitorName, cancellationToken); + return GetDatadogMonitors().Get(monitorName, cancellationToken); } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Extensions/MockableDatadogSubscriptionResource.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Extensions/MockableDatadogSubscriptionResource.cs index e083c6e15891..96262666bad3 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Extensions/MockableDatadogSubscriptionResource.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Extensions/MockableDatadogSubscriptionResource.cs @@ -20,8 +20,10 @@ public partial class MockableDatadogSubscriptionResource : ArmResource { private ClientDiagnostics _marketplaceAgreementsClientDiagnostics; private MarketplaceAgreementsRestOperations _marketplaceAgreementsRestClient; - private ClientDiagnostics _datadogMonitorResourceMonitorsClientDiagnostics; - private MonitorsRestOperations _datadogMonitorResourceMonitorsRestClient; + private ClientDiagnostics _datadogMonitorMonitorsClientDiagnostics; + private MonitorsRestOperations _datadogMonitorMonitorsRestClient; + private ClientDiagnostics _creationSupportedClientDiagnostics; + private CreationSupportedRestOperations _creationSupportedRestClient; /// Initializes a new instance of the class for mocking. protected MockableDatadogSubscriptionResource() @@ -37,8 +39,10 @@ internal MockableDatadogSubscriptionResource(ArmClient client, ResourceIdentifie private ClientDiagnostics MarketplaceAgreementsClientDiagnostics => _marketplaceAgreementsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Datadog", ProviderConstants.DefaultProviderNamespace, Diagnostics); private MarketplaceAgreementsRestOperations MarketplaceAgreementsRestClient => _marketplaceAgreementsRestClient ??= new MarketplaceAgreementsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - private ClientDiagnostics DatadogMonitorResourceMonitorsClientDiagnostics => _datadogMonitorResourceMonitorsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Datadog", DatadogMonitorResource.ResourceType.Namespace, Diagnostics); - private MonitorsRestOperations DatadogMonitorResourceMonitorsRestClient => _datadogMonitorResourceMonitorsRestClient ??= new MonitorsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DatadogMonitorResource.ResourceType)); + private ClientDiagnostics DatadogMonitorMonitorsClientDiagnostics => _datadogMonitorMonitorsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Datadog", DatadogMonitorResource.ResourceType.Namespace, Diagnostics); + private MonitorsRestOperations DatadogMonitorMonitorsRestClient => _datadogMonitorMonitorsRestClient ??= new MonitorsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DatadogMonitorResource.ResourceType)); + private ClientDiagnostics CreationSupportedClientDiagnostics => _creationSupportedClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Datadog", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private CreationSupportedRestOperations CreationSupportedRestClient => _creationSupportedRestClient ??= new CreationSupportedRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -59,17 +63,17 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetMarketplaceAgreementsAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetMarketplaceAgreementsAsync(CancellationToken cancellationToken = default) { HttpMessage FirstPageRequest(int? pageSizeHint) => MarketplaceAgreementsRestClient.CreateListRequest(Id.SubscriptionId); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => MarketplaceAgreementsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DatadogAgreementResourceProperties.DeserializeDatadogAgreementResourceProperties(e), MarketplaceAgreementsClientDiagnostics, Pipeline, "MockableDatadogSubscriptionResource.GetMarketplaceAgreements", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DatadogAgreement.DeserializeDatadogAgreement(e), MarketplaceAgreementsClientDiagnostics, Pipeline, "MockableDatadogSubscriptionResource.GetMarketplaceAgreements", "value", "nextLink", cancellationToken); } /// @@ -85,17 +89,17 @@ public virtual AsyncPageable GetMarketplaceA /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetMarketplaceAgreements(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetMarketplaceAgreements(CancellationToken cancellationToken = default) { HttpMessage FirstPageRequest(int? pageSizeHint) => MarketplaceAgreementsRestClient.CreateListRequest(Id.SubscriptionId); HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => MarketplaceAgreementsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DatadogAgreementResourceProperties.DeserializeDatadogAgreementResourceProperties(e), MarketplaceAgreementsClientDiagnostics, Pipeline, "MockableDatadogSubscriptionResource.GetMarketplaceAgreements", "value", "nextLink", cancellationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DatadogAgreement.DeserializeDatadogAgreement(e), MarketplaceAgreementsClientDiagnostics, Pipeline, "MockableDatadogSubscriptionResource.GetMarketplaceAgreements", "value", "nextLink", cancellationToken); } /// @@ -111,13 +115,13 @@ public virtual Pageable GetMarketplaceAgreem /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// - /// The to use. + /// The request body. /// The cancellation token to use. - public virtual async Task> CreateOrUpdateMarketplaceAgreementAsync(DatadogAgreementResourceProperties body = null, CancellationToken cancellationToken = default) + public virtual async Task> CreateOrUpdateMarketplaceAgreementAsync(DatadogAgreement body = null, CancellationToken cancellationToken = default) { using var scope = MarketplaceAgreementsClientDiagnostics.CreateScope("MockableDatadogSubscriptionResource.CreateOrUpdateMarketplaceAgreement"); scope.Start(); @@ -146,13 +150,13 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// - /// The to use. + /// The request body. /// The cancellation token to use. - public virtual Response CreateOrUpdateMarketplaceAgreement(DatadogAgreementResourceProperties body = null, CancellationToken cancellationToken = default) + public virtual Response CreateOrUpdateMarketplaceAgreement(DatadogAgreement body = null, CancellationToken cancellationToken = default) { using var scope = MarketplaceAgreementsClientDiagnostics.CreateScope("MockableDatadogSubscriptionResource.CreateOrUpdateMarketplaceAgreement"); scope.Start(); @@ -181,7 +185,7 @@ public virtual Response CreateOrUpdateMarket /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -191,11 +195,11 @@ public virtual Response CreateOrUpdateMarket /// /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDatadogMonitorResourcesAsync(CancellationToken cancellationToken = default) + public virtual AsyncPageable GetDatadogMonitorsAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DatadogMonitorResourceMonitorsRestClient.CreateListRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DatadogMonitorResourceMonitorsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DatadogMonitorResource(Client, DatadogMonitorResourceData.DeserializeDatadogMonitorResourceData(e)), DatadogMonitorResourceMonitorsClientDiagnostics, Pipeline, "MockableDatadogSubscriptionResource.GetDatadogMonitorResources", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => DatadogMonitorMonitorsRestClient.CreateListRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DatadogMonitorMonitorsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DatadogMonitorResource(Client, DatadogMonitorData.DeserializeDatadogMonitorData(e)), DatadogMonitorMonitorsClientDiagnostics, Pipeline, "MockableDatadogSubscriptionResource.GetDatadogMonitors", "value", "nextLink", cancellationToken); } /// @@ -211,7 +215,7 @@ public virtual AsyncPageable GetDatadogMonitorResourcesA /// /// /// Default Api Version - /// 2021-03-01 + /// 2025-06-11 /// /// /// Resource @@ -221,11 +225,147 @@ public virtual AsyncPageable GetDatadogMonitorResourcesA /// /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDatadogMonitorResources(CancellationToken cancellationToken = default) + public virtual Pageable GetDatadogMonitors(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => DatadogMonitorResourceMonitorsRestClient.CreateListRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DatadogMonitorResourceMonitorsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DatadogMonitorResource(Client, DatadogMonitorResourceData.DeserializeDatadogMonitorResourceData(e)), DatadogMonitorResourceMonitorsClientDiagnostics, Pipeline, "MockableDatadogSubscriptionResource.GetDatadogMonitorResources", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => DatadogMonitorMonitorsRestClient.CreateListRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DatadogMonitorMonitorsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DatadogMonitorResource(Client, DatadogMonitorData.DeserializeDatadogMonitorData(e)), DatadogMonitorMonitorsClientDiagnostics, Pipeline, "MockableDatadogSubscriptionResource.GetDatadogMonitors", "value", "nextLink", cancellationToken); + } + + /// + /// Informs if the current subscription is being already monitored for selected Datadog organization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Datadog/subscriptionStatuses + /// + /// + /// Operation Id + /// CreationSupported_List + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// + /// Datadog Organization Id. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSubscriptionStatusesAsync(string datadogOrganizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(datadogOrganizationId, nameof(datadogOrganizationId)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreationSupportedRestClient.CreateListRequest(Id.SubscriptionId, datadogOrganizationId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreationSupportedRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, datadogOrganizationId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DatadogSubscriptionStatusResult.DeserializeDatadogSubscriptionStatusResult(e), CreationSupportedClientDiagnostics, Pipeline, "MockableDatadogSubscriptionResource.GetSubscriptionStatuses", "value", "nextLink", cancellationToken); + } + + /// + /// Informs if the current subscription is being already monitored for selected Datadog organization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Datadog/subscriptionStatuses + /// + /// + /// Operation Id + /// CreationSupported_List + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// + /// Datadog Organization Id. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSubscriptionStatuses(string datadogOrganizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(datadogOrganizationId, nameof(datadogOrganizationId)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreationSupportedRestClient.CreateListRequest(Id.SubscriptionId, datadogOrganizationId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreationSupportedRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, datadogOrganizationId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DatadogSubscriptionStatusResult.DeserializeDatadogSubscriptionStatusResult(e), CreationSupportedClientDiagnostics, Pipeline, "MockableDatadogSubscriptionResource.GetSubscriptionStatuses", "value", "nextLink", cancellationToken); + } + + /// + /// Informs if the current subscription is being already monitored for selected Datadog organization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Datadog/subscriptionStatuses/default + /// + /// + /// Operation Id + /// CreationSupported_Get + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// + /// Datadog Organization Id. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetSubscriptionStatusAsync(string datadogOrganizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(datadogOrganizationId, nameof(datadogOrganizationId)); + + using var scope = CreationSupportedClientDiagnostics.CreateScope("MockableDatadogSubscriptionResource.GetSubscriptionStatus"); + scope.Start(); + try + { + var response = await CreationSupportedRestClient.GetAsync(Id.SubscriptionId, datadogOrganizationId, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Informs if the current subscription is being already monitored for selected Datadog organization. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Datadog/subscriptionStatuses/default + /// + /// + /// Operation Id + /// CreationSupported_Get + /// + /// + /// Default Api Version + /// 2025-06-11 + /// + /// + /// + /// Datadog Organization Id. + /// The cancellation token to use. + /// is null. + public virtual Response GetSubscriptionStatus(string datadogOrganizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(datadogOrganizationId, nameof(datadogOrganizationId)); + + using var scope = CreationSupportedClientDiagnostics.CreateScope("MockableDatadogSubscriptionResource.GetSubscriptionStatus"); + scope.Start(); + try + { + var response = CreationSupportedRestClient.Get(Id.SubscriptionId, datadogOrganizationId, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/LongRunningOperation/DatadogMonitorResourceOperationSource.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/LongRunningOperation/DatadogMonitorOperationSource.cs similarity index 64% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/LongRunningOperation/DatadogMonitorResourceOperationSource.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/LongRunningOperation/DatadogMonitorOperationSource.cs index 58627677813a..518b8a5e62f0 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/LongRunningOperation/DatadogMonitorResourceOperationSource.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/LongRunningOperation/DatadogMonitorOperationSource.cs @@ -12,24 +12,24 @@ namespace Azure.ResourceManager.Datadog { - internal class DatadogMonitorResourceOperationSource : IOperationSource + internal class DatadogMonitorOperationSource : IOperationSource { private readonly ArmClient _client; - internal DatadogMonitorResourceOperationSource(ArmClient client) + internal DatadogMonitorOperationSource(ArmClient client) { _client = client; } DatadogMonitorResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDatadogContext.Default); + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDatadogContext.Default); return new DatadogMonitorResource(_client, data); } async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDatadogContext.Default); + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDatadogContext.Default); return await Task.FromResult(new DatadogMonitorResource(_client, data)).ConfigureAwait(false); } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/LongRunningOperation/DatadogMonitoredSubscriptionOperationSource.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/LongRunningOperation/DatadogMonitoredSubscriptionOperationSource.cs new file mode 100644 index 000000000000..63bd640797a9 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/LongRunningOperation/DatadogMonitoredSubscriptionOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.Datadog +{ + internal class DatadogMonitoredSubscriptionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DatadogMonitoredSubscriptionOperationSource(ArmClient client) + { + _client = client; + } + + DatadogMonitoredSubscriptionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDatadogContext.Default); + return new DatadogMonitoredSubscriptionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDatadogContext.Default); + return await Task.FromResult(new DatadogMonitoredSubscriptionResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/LongRunningOperation/DatadogSingleSignOnResourceOperationSource.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/LongRunningOperation/DatadogSingleSignOnOperationSource.cs similarity index 72% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/LongRunningOperation/DatadogSingleSignOnResourceOperationSource.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/LongRunningOperation/DatadogSingleSignOnOperationSource.cs index dd6bb2f19f7b..29c98049d495 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/LongRunningOperation/DatadogSingleSignOnResourceOperationSource.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/LongRunningOperation/DatadogSingleSignOnOperationSource.cs @@ -12,24 +12,24 @@ namespace Azure.ResourceManager.Datadog { - internal class DatadogSingleSignOnResourceOperationSource : IOperationSource + internal class DatadogSingleSignOnOperationSource : IOperationSource { private readonly ArmClient _client; - internal DatadogSingleSignOnResourceOperationSource(ArmClient client) + internal DatadogSingleSignOnOperationSource(ArmClient client) { _client = client; } DatadogSingleSignOnResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDatadogContext.Default); + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDatadogContext.Default); return new DatadogSingleSignOnResource(_client, data); } async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDatadogContext.Default); + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerDatadogContext.Default); return await Task.FromResult(new DatadogSingleSignOnResource(_client, data)).ConfigureAwait(false); } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/AzureResourceManagerDatadogContext.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/AzureResourceManagerDatadogContext.cs index 88ca5dbcf00b..04377fa510e7 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/AzureResourceManagerDatadogContext.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/AzureResourceManagerDatadogContext.cs @@ -8,7 +8,6 @@ using System.ClientModel.Primitives; using Azure.ResourceManager.Datadog.Models; using Azure.ResourceManager.Models; -using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Datadog { @@ -16,44 +15,57 @@ namespace Azure.ResourceManager.Datadog /// Context class which will be filled in by the System.ClientModel.SourceGeneration. /// For more information see 'https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/System.ClientModel/src/docs/ModelReaderWriterContext.md' /// + [ModelReaderWriterBuildable(typeof(CreateResourceSupportedResponseList))] + [ModelReaderWriterBuildable(typeof(DatadogAgreement))] [ModelReaderWriterBuildable(typeof(DatadogAgreementProperties))] [ModelReaderWriterBuildable(typeof(DatadogAgreementResourceListResponse))] - [ModelReaderWriterBuildable(typeof(DatadogAgreementResourceProperties))] [ModelReaderWriterBuildable(typeof(DatadogApiKey))] [ModelReaderWriterBuildable(typeof(DatadogApiKeyListResponse))] + [ModelReaderWriterBuildable(typeof(DatadogBillingInfoResult))] [ModelReaderWriterBuildable(typeof(DatadogHost))] [ModelReaderWriterBuildable(typeof(DatadogHostListResponse))] [ModelReaderWriterBuildable(typeof(DatadogHostMetadata))] [ModelReaderWriterBuildable(typeof(DatadogInstallMethod))] + [ModelReaderWriterBuildable(typeof(DatadogLinkedResourceResult))] [ModelReaderWriterBuildable(typeof(DatadogLogsAgent))] + [ModelReaderWriterBuildable(typeof(DatadogMonitorAgentRules))] + [ModelReaderWriterBuildable(typeof(DatadogMonitorData))] + [ModelReaderWriterBuildable(typeof(DatadogMonitoredResourceResult))] + [ModelReaderWriterBuildable(typeof(DatadogMonitoredSubscriptionData))] + [ModelReaderWriterBuildable(typeof(DatadogMonitoredSubscriptionItem))] + [ModelReaderWriterBuildable(typeof(DatadogMonitoredSubscriptionResource))] + [ModelReaderWriterBuildable(typeof(DatadogMonitorFilteringTag))] + [ModelReaderWriterBuildable(typeof(DatadogMonitorLogRules))] + [ModelReaderWriterBuildable(typeof(DatadogMonitorMetricRules))] + [ModelReaderWriterBuildable(typeof(DatadogMonitorPatch))] + [ModelReaderWriterBuildable(typeof(DatadogMonitorProperties))] [ModelReaderWriterBuildable(typeof(DatadogMonitorResource))] - [ModelReaderWriterBuildable(typeof(DatadogMonitorResourceData))] [ModelReaderWriterBuildable(typeof(DatadogMonitorResourceListResponse))] - [ModelReaderWriterBuildable(typeof(DatadogMonitorResourcePatch))] + [ModelReaderWriterBuildable(typeof(DatadogMonitorResourcePatchProperties))] [ModelReaderWriterBuildable(typeof(DatadogOrganizationProperties))] [ModelReaderWriterBuildable(typeof(DatadogSetPasswordLink))] + [ModelReaderWriterBuildable(typeof(DatadogSingleSignOnData))] [ModelReaderWriterBuildable(typeof(DatadogSingleSignOnProperties))] [ModelReaderWriterBuildable(typeof(DatadogSingleSignOnResource))] - [ModelReaderWriterBuildable(typeof(DatadogSingleSignOnResourceData))] [ModelReaderWriterBuildable(typeof(DatadogSingleSignOnResourceListResponse))] - [ModelReaderWriterBuildable(typeof(FilteringTag))] + [ModelReaderWriterBuildable(typeof(DatadogSku))] + [ModelReaderWriterBuildable(typeof(DatadogSubscriptionProperties))] + [ModelReaderWriterBuildable(typeof(DatadogSubscriptionStatusProperties))] + [ModelReaderWriterBuildable(typeof(DatadogSubscriptionStatusResult))] + [ModelReaderWriterBuildable(typeof(DatadogUserInfo))] + [ModelReaderWriterBuildable(typeof(DataMonitoringTagRuleData))] + [ModelReaderWriterBuildable(typeof(DataMonitoringTagRuleResource))] [ModelReaderWriterBuildable(typeof(LinkedResourceListResponse))] - [ModelReaderWriterBuildable(typeof(LogRules))] [ModelReaderWriterBuildable(typeof(ManagedServiceIdentity))] - [ModelReaderWriterBuildable(typeof(MetricRules))] - [ModelReaderWriterBuildable(typeof(MonitoredResourceContent))] + [ModelReaderWriterBuildable(typeof(MarketplaceSaaSInfo))] [ModelReaderWriterBuildable(typeof(MonitoredResourceListResponse))] - [ModelReaderWriterBuildable(typeof(MonitoringTagRuleData))] - [ModelReaderWriterBuildable(typeof(MonitoringTagRuleResource))] + [ModelReaderWriterBuildable(typeof(MonitoredSubscriptionPropertiesList))] + [ModelReaderWriterBuildable(typeof(MonitoringTagRuleProperties))] [ModelReaderWriterBuildable(typeof(MonitoringTagRulesListResponse))] - [ModelReaderWriterBuildable(typeof(MonitoringTagRulesProperties))] - [ModelReaderWriterBuildable(typeof(MonitorProperties))] - [ModelReaderWriterBuildable(typeof(MonitorUpdateProperties))] - [ModelReaderWriterBuildable(typeof(ResourceSku))] + [ModelReaderWriterBuildable(typeof(PartnerBillingEntity))] [ModelReaderWriterBuildable(typeof(ResponseError))] - [ModelReaderWriterBuildable(typeof(SubResource))] + [ModelReaderWriterBuildable(typeof(ResubscribeOrganizationContent))] [ModelReaderWriterBuildable(typeof(SystemData))] - [ModelReaderWriterBuildable(typeof(UserInfo))] public partial class AzureResourceManagerDatadogContext : ModelReaderWriterContext { } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/CreateResourceSupportedResponseList.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/CreateResourceSupportedResponseList.Serialization.cs new file mode 100644 index 000000000000..5c9e10366c2e --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/CreateResourceSupportedResponseList.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Datadog.Models +{ + internal partial class CreateResourceSupportedResponseList : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateResourceSupportedResponseList)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CreateResourceSupportedResponseList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateResourceSupportedResponseList)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCreateResourceSupportedResponseList(document.RootElement, options); + } + + internal static CreateResourceSupportedResponseList DeserializeCreateResourceSupportedResponseList(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DatadogSubscriptionStatusResult.DeserializeDatadogSubscriptionStatusResult(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CreateResourceSupportedResponseList(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); + default: + throw new FormatException($"The model {nameof(CreateResourceSupportedResponseList)} does not support writing '{options.Format}' format."); + } + } + + CreateResourceSupportedResponseList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCreateResourceSupportedResponseList(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CreateResourceSupportedResponseList)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/CreateResourceSupportedResponseList.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/CreateResourceSupportedResponseList.cs new file mode 100644 index 000000000000..3422fe9c241a --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/CreateResourceSupportedResponseList.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.Datadog.Models +{ + /// Paged collection of CreateResourceSupportedResponse items. + internal partial class CreateResourceSupportedResponseList + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The CreateResourceSupportedResponse items on this page. + /// is null. + internal CreateResourceSupportedResponseList(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The CreateResourceSupportedResponse items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal CreateResourceSupportedResponseList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CreateResourceSupportedResponseList() + { + } + + /// The CreateResourceSupportedResponse items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreementResourceProperties.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreement.Serialization.cs similarity index 70% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreementResourceProperties.Serialization.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreement.Serialization.cs index 4b000dcc1bda..d2e6dcae966f 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreementResourceProperties.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreement.Serialization.cs @@ -15,11 +15,11 @@ namespace Azure.ResourceManager.Datadog.Models { - public partial class DatadogAgreementResourceProperties : IUtf8JsonSerializable, IJsonModel + public partial class DatadogAgreement : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -30,10 +30,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, /// The client options for reading and writing models. protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(DatadogAgreementResourceProperties)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(DatadogAgreement)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); @@ -44,19 +44,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } } - DatadogAgreementResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DatadogAgreement IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(DatadogAgreementResourceProperties)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(DatadogAgreement)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDatadogAgreementResourceProperties(document.RootElement, options); + return DeserializeDatadogAgreement(document.RootElement, options); } - internal static DatadogAgreementResourceProperties DeserializeDatadogAgreementResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) + internal static DatadogAgreement DeserializeDatadogAgreement(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -112,7 +112,7 @@ internal static DatadogAgreementResourceProperties DeserializeDatadogAgreementRe } } serializedAdditionalRawData = rawDataDictionary; - return new DatadogAgreementResourceProperties( + return new DatadogAgreement( id, name, type, @@ -121,35 +121,35 @@ internal static DatadogAgreementResourceProperties DeserializeDatadogAgreementRe serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); default: - throw new FormatException($"The model {nameof(DatadogAgreementResourceProperties)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogAgreement)} does not support writing '{options.Format}' format."); } } - DatadogAgreementResourceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DatadogAgreement IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeDatadogAgreementResourceProperties(document.RootElement, options); + return DeserializeDatadogAgreement(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DatadogAgreementResourceProperties)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogAgreement)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreementResourceProperties.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreement.cs similarity index 81% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreementResourceProperties.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreement.cs index 7b4c8f9c6843..be525c3839f9 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreementResourceProperties.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreement.cs @@ -12,8 +12,8 @@ namespace Azure.ResourceManager.Datadog.Models { - /// The DatadogAgreementResourceProperties. - public partial class DatadogAgreementResourceProperties : ResourceData + /// The DatadogAgreement. + public partial class DatadogAgreement : ResourceData { /// /// Keeps track of any properties unknown to the library. @@ -47,19 +47,19 @@ public partial class DatadogAgreementResourceProperties : ResourceData /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public DatadogAgreementResourceProperties() + /// Initializes a new instance of . + public DatadogAgreement() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// Represents the properties of the resource. /// Keeps track of any properties unknown to the library. - internal DatadogAgreementResourceProperties(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DatadogAgreementProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal DatadogAgreement(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DatadogAgreementProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Properties = properties; _serializedAdditionalRawData = serializedAdditionalRawData; diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreementProperties.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreementProperties.Serialization.cs index d74d60914bd3..cb69c7699065 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreementProperties.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreementProperties.Serialization.cs @@ -69,10 +69,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("signature"u8); writer.WriteStringValue(Signature); } - if (Optional.IsDefined(Accepted)) + if (Optional.IsDefined(IsAccepted)) { writer.WritePropertyName("accepted"u8); - writer.WriteBooleanValue(Accepted.Value); + writer.WriteBooleanValue(IsAccepted.Value); } if (options.Format != "W" && _serializedAdditionalRawData != null) { diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreementProperties.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreementProperties.cs index ab9036e044d8..b6ba3aea9fad 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreementProperties.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreementProperties.cs @@ -58,9 +58,9 @@ public DatadogAgreementProperties() /// 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. + /// If any version of the terms have been accepted, otherwise false. /// Keeps track of any properties unknown to the library. - internal DatadogAgreementProperties(string publisher, string product, string plan, string licenseTextLink, string privacyPolicyLink, DateTimeOffset? retrieveDatetime, string signature, bool? accepted, IDictionary serializedAdditionalRawData) + internal DatadogAgreementProperties(string publisher, string product, string plan, string licenseTextLink, string privacyPolicyLink, DateTimeOffset? retrieveDatetime, string signature, bool? isAccepted, IDictionary serializedAdditionalRawData) { Publisher = publisher; Product = product; @@ -69,7 +69,7 @@ internal DatadogAgreementProperties(string publisher, string product, string pla PrivacyPolicyLink = privacyPolicyLink; RetrieveDatetime = retrieveDatetime; Signature = signature; - Accepted = accepted; + IsAccepted = isAccepted; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -88,6 +88,6 @@ internal DatadogAgreementProperties(string publisher, string product, string pla /// Terms signature. public string Signature { get; set; } /// If any version of the terms have been accepted, otherwise false. - public bool? Accepted { get; set; } + public bool? IsAccepted { get; set; } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreementResourceListResponse.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreementResourceListResponse.Serialization.cs index 05cbc961adcb..8b4539b52f24 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreementResourceListResponse.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreementResourceListResponse.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DatadogAgreementResourceListResponse)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -86,29 +83,29 @@ internal static DatadogAgreementResourceListResponse DeserializeDatadogAgreement { return null; } - IReadOnlyList value = default; - string nextLink = default; + IReadOnlyList value = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(DatadogAgreementResourceProperties.DeserializeDatadogAgreementResourceProperties(item, options)); + array.Add(DatadogAgreement.DeserializeDatadogAgreement(item, options)); } value = array; continue; } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static DatadogAgreementResourceListResponse DeserializeDatadogAgreement } } serializedAdditionalRawData = rawDataDictionary; - return new DatadogAgreementResourceListResponse(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new DatadogAgreementResourceListResponse(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreementResourceListResponse.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreementResourceListResponse.cs index 30f7fc575245..ef8b511b59b6 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreementResourceListResponse.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogAgreementResourceListResponse.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Datadog.Models { @@ -46,25 +47,34 @@ internal partial class DatadogAgreementResourceListResponse private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal DatadogAgreementResourceListResponse() + /// The DatadogAgreementResource items on this page. + /// is null. + internal DatadogAgreementResourceListResponse(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// Results of a list operation. - /// Link to the next set of results, if any. + /// The DatadogAgreementResource items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal DatadogAgreementResourceListResponse(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal DatadogAgreementResourceListResponse(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Results of a list operation. - public IReadOnlyList Value { get; } - /// Link to the next set of results, if any. - public string NextLink { get; } + /// Initializes a new instance of for deserialization. + internal DatadogAgreementResourceListResponse() + { + } + + /// The DatadogAgreementResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogApiKeyListResponse.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogApiKeyListResponse.Serialization.cs index 0367deb65681..ccd83e8c0a44 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogApiKeyListResponse.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogApiKeyListResponse.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DatadogApiKeyListResponse)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static DatadogApiKeyListResponse DeserializeDatadogApiKeyListResponse(J return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static DatadogApiKeyListResponse DeserializeDatadogApiKeyListResponse(J } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static DatadogApiKeyListResponse DeserializeDatadogApiKeyListResponse(J } } serializedAdditionalRawData = rawDataDictionary; - return new DatadogApiKeyListResponse(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new DatadogApiKeyListResponse(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogApiKeyListResponse.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogApiKeyListResponse.cs index f4e28af97451..a066ca0ba094 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogApiKeyListResponse.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogApiKeyListResponse.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Datadog.Models { @@ -46,25 +47,34 @@ internal partial class DatadogApiKeyListResponse private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal DatadogApiKeyListResponse() + /// The DatadogApiKey items on this page. + /// is null. + internal DatadogApiKeyListResponse(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// Results of a list operation. - /// Link to the next set of results, if any. + /// The DatadogApiKey items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal DatadogApiKeyListResponse(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal DatadogApiKeyListResponse(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Results of a list operation. + /// Initializes a new instance of for deserialization. + internal DatadogApiKeyListResponse() + { + } + + /// The DatadogApiKey items on this page. public IReadOnlyList Value { get; } - /// Link to the next set of results, if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogBillingInfoResult.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogBillingInfoResult.Serialization.cs new file mode 100644 index 000000000000..42997513f081 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogBillingInfoResult.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Datadog.Models +{ + public partial class DatadogBillingInfoResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatadogBillingInfoResult)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(MarketplaceSaasInfo)) + { + writer.WritePropertyName("marketplaceSaasInfo"u8); + writer.WriteObjectValue(MarketplaceSaasInfo, options); + } + if (Optional.IsDefined(PartnerBillingEntity)) + { + writer.WritePropertyName("partnerBillingEntity"u8); + writer.WriteObjectValue(PartnerBillingEntity, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DatadogBillingInfoResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatadogBillingInfoResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatadogBillingInfoResult(document.RootElement, options); + } + + internal static DatadogBillingInfoResult DeserializeDatadogBillingInfoResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MarketplaceSaaSInfo marketplaceSaasInfo = default; + PartnerBillingEntity partnerBillingEntity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("marketplaceSaasInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + marketplaceSaasInfo = MarketplaceSaaSInfo.DeserializeMarketplaceSaaSInfo(property.Value, options); + continue; + } + if (property.NameEquals("partnerBillingEntity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + partnerBillingEntity = PartnerBillingEntity.DeserializePartnerBillingEntity(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatadogBillingInfoResult(marketplaceSaasInfo, partnerBillingEntity, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); + default: + throw new FormatException($"The model {nameof(DatadogBillingInfoResult)} does not support writing '{options.Format}' format."); + } + } + + DatadogBillingInfoResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDatadogBillingInfoResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatadogBillingInfoResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogBillingInfoResult.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogBillingInfoResult.cs new file mode 100644 index 000000000000..7cc739146519 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogBillingInfoResult.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Datadog.Models +{ + /// Marketplace Subscription and Organization details to which resource gets billed into. + public partial class DatadogBillingInfoResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DatadogBillingInfoResult() + { + } + + /// Initializes a new instance of . + /// Marketplace Subscription details. + /// Partner Billing Entity details: Organization Info. + /// Keeps track of any properties unknown to the library. + internal DatadogBillingInfoResult(MarketplaceSaaSInfo marketplaceSaasInfo, PartnerBillingEntity partnerBillingEntity, IDictionary serializedAdditionalRawData) + { + MarketplaceSaasInfo = marketplaceSaasInfo; + PartnerBillingEntity = partnerBillingEntity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Marketplace Subscription details. + public MarketplaceSaaSInfo MarketplaceSaasInfo { get; } + /// Partner Billing Entity details: Organization Info. + public PartnerBillingEntity PartnerBillingEntity { get; } + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogHost.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogHost.cs index 0cccb61c9801..54c08039d974 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogHost.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogHost.cs @@ -54,7 +54,7 @@ internal DatadogHost() /// Initializes a new instance of . /// The name of the host. - /// The aliases for the host. + /// The aliases for the host installed via the Datadog agent. /// The Datadog integrations reporting metrics for the host. /// /// Keeps track of any properties unknown to the library. @@ -69,7 +69,7 @@ internal DatadogHost(string name, IReadOnlyList aliases, IReadOnlyList The name of the host. public string Name { get; } - /// The aliases for the host. + /// The aliases for the host installed via the Datadog agent. public IReadOnlyList Aliases { get; } /// The Datadog integrations reporting metrics for the host. public IReadOnlyList Apps { get; } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogHostListResponse.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogHostListResponse.Serialization.cs index 2f74f398c31b..c25b978865d0 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogHostListResponse.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogHostListResponse.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DatadogHostListResponse)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static DatadogHostListResponse DeserializeDatadogHostListResponse(JsonE return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static DatadogHostListResponse DeserializeDatadogHostListResponse(JsonE } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static DatadogHostListResponse DeserializeDatadogHostListResponse(JsonE } } serializedAdditionalRawData = rawDataDictionary; - return new DatadogHostListResponse(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new DatadogHostListResponse(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogHostListResponse.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogHostListResponse.cs index b068a79729a9..c4de4766bf59 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogHostListResponse.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogHostListResponse.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Datadog.Models { @@ -46,25 +47,34 @@ internal partial class DatadogHostListResponse private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal DatadogHostListResponse() + /// The DatadogHost items on this page. + /// is null. + internal DatadogHostListResponse(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// Results of a list operation. - /// Link to the next set of results, if any. + /// The DatadogHost items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal DatadogHostListResponse(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal DatadogHostListResponse(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Results of a list operation. + /// Initializes a new instance of for deserialization. + internal DatadogHostListResponse() + { + } + + /// The DatadogHost items on this page. public IReadOnlyList Value { get; } - /// Link to the next set of results, if any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogLiftrResourceCategory.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogLiftrResourceCategory.cs new file mode 100644 index 000000000000..b2eea470e801 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogLiftrResourceCategory.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Datadog.Models +{ + /// The DatadogLiftrResourceCategory. + public readonly partial struct DatadogLiftrResourceCategory : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DatadogLiftrResourceCategory(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnknownValue = "Unknown"; + private const string MonitorLogsValue = "MonitorLogs"; + + /// Unknown. + public static DatadogLiftrResourceCategory Unknown { get; } = new DatadogLiftrResourceCategory(UnknownValue); + /// MonitorLogs. + public static DatadogLiftrResourceCategory MonitorLogs { get; } = new DatadogLiftrResourceCategory(MonitorLogsValue); + /// Determines if two values are the same. + public static bool operator ==(DatadogLiftrResourceCategory left, DatadogLiftrResourceCategory right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DatadogLiftrResourceCategory left, DatadogLiftrResourceCategory right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DatadogLiftrResourceCategory(string value) => new DatadogLiftrResourceCategory(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DatadogLiftrResourceCategory other && Equals(other); + /// + public bool Equals(DatadogLiftrResourceCategory other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogLinkedResourceResult.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogLinkedResourceResult.Serialization.cs new file mode 100644 index 000000000000..a0a52755a914 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogLinkedResourceResult.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Datadog.Models +{ + public partial class DatadogLinkedResourceResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatadogLinkedResourceResult)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DatadogLinkedResourceResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatadogLinkedResourceResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatadogLinkedResourceResult(document.RootElement, options); + } + + internal static DatadogLinkedResourceResult DeserializeDatadogLinkedResourceResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + AzureLocation? location = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("location"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatadogLinkedResourceResult(id, location, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); + default: + throw new FormatException($"The model {nameof(DatadogLinkedResourceResult)} does not support writing '{options.Format}' format."); + } + } + + DatadogLinkedResourceResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDatadogLinkedResourceResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatadogLinkedResourceResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogLinkedResourceResult.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogLinkedResourceResult.cs new file mode 100644 index 000000000000..8fc4d01b6f81 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogLinkedResourceResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Datadog.Models +{ + /// The definition of a linked resource. + public partial class DatadogLinkedResourceResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DatadogLinkedResourceResult() + { + } + + /// Initializes a new instance of . + /// The ARM id of the linked resource. + /// The location of the linked resource. + /// Keeps track of any properties unknown to the library. + internal DatadogLinkedResourceResult(ResourceIdentifier id, AzureLocation? location, IDictionary serializedAdditionalRawData) + { + Id = id; + Location = location; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The ARM id of the linked resource. + public ResourceIdentifier Id { get; } + /// The location of the linked resource. + public AzureLocation? Location { get; } + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorAgentRules.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorAgentRules.Serialization.cs new file mode 100644 index 000000000000..b6bdc9f8367d --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorAgentRules.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Datadog.Models +{ + public partial class DatadogMonitorAgentRules : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatadogMonitorAgentRules)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsAgentMonitoringEnabled)) + { + writer.WritePropertyName("enableAgentMonitoring"u8); + writer.WriteBooleanValue(IsAgentMonitoringEnabled.Value); + } + if (Optional.IsCollectionDefined(FilteringTags)) + { + writer.WritePropertyName("filteringTags"u8); + writer.WriteStartArray(); + foreach (var item in FilteringTags) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DatadogMonitorAgentRules IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatadogMonitorAgentRules)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatadogMonitorAgentRules(document.RootElement, options); + } + + internal static DatadogMonitorAgentRules DeserializeDatadogMonitorAgentRules(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? enableAgentMonitoring = default; + IList filteringTags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enableAgentMonitoring"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableAgentMonitoring = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("filteringTags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DatadogMonitorFilteringTag.DeserializeDatadogMonitorFilteringTag(item, options)); + } + filteringTags = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatadogMonitorAgentRules(enableAgentMonitoring, filteringTags ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); + default: + throw new FormatException($"The model {nameof(DatadogMonitorAgentRules)} does not support writing '{options.Format}' format."); + } + } + + DatadogMonitorAgentRules IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDatadogMonitorAgentRules(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatadogMonitorAgentRules)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorAgentRules.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorAgentRules.cs new file mode 100644 index 000000000000..b039e7ce8e95 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorAgentRules.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Datadog.Models +{ + /// Set of rules for managing agents for the Monitor resource. + public partial class DatadogMonitorAgentRules + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DatadogMonitorAgentRules() + { + FilteringTags = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Flag specifying if agent monitoring should be enabled for the Monitor resource. + /// 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. + /// Keeps track of any properties unknown to the library. + internal DatadogMonitorAgentRules(bool? isAgentMonitoringEnabled, IList filteringTags, IDictionary serializedAdditionalRawData) + { + IsAgentMonitoringEnabled = isAgentMonitoringEnabled; + FilteringTags = filteringTags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Flag specifying if agent monitoring should be enabled for the Monitor resource. + public bool? IsAgentMonitoringEnabled { get; set; } + /// 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 IList FilteringTags { get; } + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/FilteringTag.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorFilteringTag.Serialization.cs similarity index 66% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/FilteringTag.Serialization.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorFilteringTag.Serialization.cs index e03b567e783b..f1c4ea865895 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/FilteringTag.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorFilteringTag.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.Datadog.Models { - public partial class FilteringTag : IUtf8JsonSerializable, IJsonModel + public partial class DatadogMonitorFilteringTag : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(FilteringTag)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorFilteringTag)} does not support writing '{format}' format."); } if (Optional.IsDefined(Name)) @@ -66,19 +66,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - FilteringTag IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DatadogMonitorFilteringTag IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(FilteringTag)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorFilteringTag)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeFilteringTag(document.RootElement, options); + return DeserializeDatadogMonitorFilteringTag(document.RootElement, options); } - internal static FilteringTag DeserializeFilteringTag(JsonElement element, ModelReaderWriterOptions options = null) + internal static DatadogMonitorFilteringTag DeserializeDatadogMonitorFilteringTag(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -88,7 +88,7 @@ internal static FilteringTag DeserializeFilteringTag(JsonElement element, ModelR } string name = default; string value = default; - TagAction? action = default; + DatadogMonitorTagAction? action = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -109,7 +109,7 @@ internal static FilteringTag DeserializeFilteringTag(JsonElement element, ModelR { continue; } - action = new TagAction(property.Value.GetString()); + action = new DatadogMonitorTagAction(property.Value.GetString()); continue; } if (options.Format != "W") @@ -118,38 +118,38 @@ internal static FilteringTag DeserializeFilteringTag(JsonElement element, ModelR } } serializedAdditionalRawData = rawDataDictionary; - return new FilteringTag(name, value, action, serializedAdditionalRawData); + return new DatadogMonitorFilteringTag(name, value, action, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); default: - throw new FormatException($"The model {nameof(FilteringTag)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorFilteringTag)} does not support writing '{options.Format}' format."); } } - FilteringTag IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DatadogMonitorFilteringTag IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeFilteringTag(document.RootElement, options); + return DeserializeDatadogMonitorFilteringTag(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(FilteringTag)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorFilteringTag)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/FilteringTag.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorFilteringTag.cs similarity index 83% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/FilteringTag.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorFilteringTag.cs index 6fd210b7259e..8c8f4d1bc315 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/FilteringTag.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorFilteringTag.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.Datadog.Models { /// The definition of a filtering tag. Filtering tags are used for capturing resources and include/exclude them from being monitored. - public partial class FilteringTag + public partial class DatadogMonitorFilteringTag { /// /// Keeps track of any properties unknown to the library. @@ -45,17 +45,17 @@ public partial class FilteringTag /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public FilteringTag() + /// Initializes a new instance of . + public DatadogMonitorFilteringTag() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The name (also known as the key) of the tag. /// The value of the tag. /// Valid actions for a filtering tag. Exclusion takes priority over inclusion. /// Keeps track of any properties unknown to the library. - internal FilteringTag(string name, string value, TagAction? action, IDictionary serializedAdditionalRawData) + internal DatadogMonitorFilteringTag(string name, string value, DatadogMonitorTagAction? action, IDictionary serializedAdditionalRawData) { Name = name; Value = value; @@ -68,6 +68,6 @@ internal FilteringTag(string name, string value, TagAction? action, IDictionary< /// The value of the tag. public string Value { get; set; } /// Valid actions for a filtering tag. Exclusion takes priority over inclusion. - public TagAction? Action { get; set; } + public DatadogMonitorTagAction? Action { get; set; } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/LogRules.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorLogRules.Serialization.cs similarity index 66% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/LogRules.Serialization.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorLogRules.Serialization.cs index da30d3c49b31..d9ddaab1d8ce 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/LogRules.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorLogRules.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.Datadog.Models { - public partial class LogRules : IUtf8JsonSerializable, IJsonModel + public partial class DatadogMonitorLogRules : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,26 +28,26 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(LogRules)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorLogRules)} does not support writing '{format}' format."); } - if (Optional.IsDefined(SendAadLogs)) + if (Optional.IsDefined(IsAadLogsSent)) { writer.WritePropertyName("sendAadLogs"u8); - writer.WriteBooleanValue(SendAadLogs.Value); + writer.WriteBooleanValue(IsAadLogsSent.Value); } - if (Optional.IsDefined(SendSubscriptionLogs)) + if (Optional.IsDefined(IsSubscriptionLogsSent)) { writer.WritePropertyName("sendSubscriptionLogs"u8); - writer.WriteBooleanValue(SendSubscriptionLogs.Value); + writer.WriteBooleanValue(IsSubscriptionLogsSent.Value); } - if (Optional.IsDefined(SendResourceLogs)) + if (Optional.IsDefined(IsResourceLogsSent)) { writer.WritePropertyName("sendResourceLogs"u8); - writer.WriteBooleanValue(SendResourceLogs.Value); + writer.WriteBooleanValue(IsResourceLogsSent.Value); } if (Optional.IsCollectionDefined(FilteringTags)) { @@ -76,19 +76,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - LogRules IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DatadogMonitorLogRules IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(LogRules)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorLogRules)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeLogRules(document.RootElement, options); + return DeserializeDatadogMonitorLogRules(document.RootElement, options); } - internal static LogRules DeserializeLogRules(JsonElement element, ModelReaderWriterOptions options = null) + internal static DatadogMonitorLogRules DeserializeDatadogMonitorLogRules(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -99,7 +99,7 @@ internal static LogRules DeserializeLogRules(JsonElement element, ModelReaderWri bool? sendAadLogs = default; bool? sendSubscriptionLogs = default; bool? sendResourceLogs = default; - IList filteringTags = default; + IList filteringTags = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -137,10 +137,10 @@ internal static LogRules DeserializeLogRules(JsonElement element, ModelReaderWri { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(FilteringTag.DeserializeFilteringTag(item, options)); + array.Add(DatadogMonitorFilteringTag.DeserializeDatadogMonitorFilteringTag(item, options)); } filteringTags = array; continue; @@ -151,38 +151,38 @@ internal static LogRules DeserializeLogRules(JsonElement element, ModelReaderWri } } serializedAdditionalRawData = rawDataDictionary; - return new LogRules(sendAadLogs, sendSubscriptionLogs, sendResourceLogs, filteringTags ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new DatadogMonitorLogRules(sendAadLogs, sendSubscriptionLogs, sendResourceLogs, filteringTags ?? new ChangeTrackingList(), serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); default: - throw new FormatException($"The model {nameof(LogRules)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorLogRules)} does not support writing '{options.Format}' format."); } } - LogRules IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DatadogMonitorLogRules IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeLogRules(document.RootElement, options); + return DeserializeDatadogMonitorLogRules(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(LogRules)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorLogRules)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/LogRules.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorLogRules.cs similarity index 69% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/LogRules.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorLogRules.cs index e1ef9bc516d7..9e5bb795e22b 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/LogRules.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorLogRules.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.Datadog.Models { /// Set of rules for sending logs for the Monitor resource. - public partial class LogRules + public partial class DatadogMonitorLogRules { /// /// Keeps track of any properties unknown to the library. @@ -45,34 +45,34 @@ public partial class LogRules /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public LogRules() + /// Initializes a new instance of . + public DatadogMonitorLogRules() { - FilteringTags = new ChangeTrackingList(); + FilteringTags = new ChangeTrackingList(); } - /// Initializes a new instance of . - /// 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. + /// Initializes a new instance of . + /// 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. /// Keeps track of any properties unknown to the library. - internal LogRules(bool? sendAadLogs, bool? sendSubscriptionLogs, bool? sendResourceLogs, IList filteringTags, IDictionary serializedAdditionalRawData) + internal DatadogMonitorLogRules(bool? isAadLogsSent, bool? isSubscriptionLogsSent, bool? isResourceLogsSent, IList filteringTags, IDictionary serializedAdditionalRawData) { - SendAadLogs = sendAadLogs; - SendSubscriptionLogs = sendSubscriptionLogs; - SendResourceLogs = sendResourceLogs; + IsAadLogsSent = isAadLogsSent; + IsSubscriptionLogsSent = isSubscriptionLogsSent; + IsResourceLogsSent = isResourceLogsSent; FilteringTags = filteringTags; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Flag specifying if AAD logs should be sent for the Monitor resource. - public bool? SendAadLogs { get; set; } + public bool? IsAadLogsSent { get; set; } /// Flag specifying if Azure subscription logs should be sent for the Monitor resource. - public bool? SendSubscriptionLogs { get; set; } + public bool? IsSubscriptionLogsSent { get; set; } /// Flag specifying if Azure resource logs should be sent for the Monitor resource. - public bool? SendResourceLogs { get; set; } + public bool? IsResourceLogsSent { get; set; } /// 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 IList FilteringTags { get; } + public IList FilteringTags { get; } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MetricRules.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorMetricRules.Serialization.cs similarity index 63% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MetricRules.Serialization.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorMetricRules.Serialization.cs index 62849380314e..67c26be6236c 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MetricRules.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorMetricRules.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.Datadog.Models { - internal partial class MetricRules : IUtf8JsonSerializable, IJsonModel + internal partial class DatadogMonitorMetricRules : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(MetricRules)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorMetricRules)} does not support writing '{format}' format."); } if (Optional.IsCollectionDefined(FilteringTags)) @@ -61,19 +61,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - MetricRules IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DatadogMonitorMetricRules IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(MetricRules)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorMetricRules)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMetricRules(document.RootElement, options); + return DeserializeDatadogMonitorMetricRules(document.RootElement, options); } - internal static MetricRules DeserializeMetricRules(JsonElement element, ModelReaderWriterOptions options = null) + internal static DatadogMonitorMetricRules DeserializeDatadogMonitorMetricRules(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -81,7 +81,7 @@ internal static MetricRules DeserializeMetricRules(JsonElement element, ModelRea { return null; } - IList filteringTags = default; + IList filteringTags = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -92,10 +92,10 @@ internal static MetricRules DeserializeMetricRules(JsonElement element, ModelRea { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(FilteringTag.DeserializeFilteringTag(item, options)); + array.Add(DatadogMonitorFilteringTag.DeserializeDatadogMonitorFilteringTag(item, options)); } filteringTags = array; continue; @@ -106,38 +106,38 @@ internal static MetricRules DeserializeMetricRules(JsonElement element, ModelRea } } serializedAdditionalRawData = rawDataDictionary; - return new MetricRules(filteringTags ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new DatadogMonitorMetricRules(filteringTags ?? new ChangeTrackingList(), serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); default: - throw new FormatException($"The model {nameof(MetricRules)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorMetricRules)} does not support writing '{options.Format}' format."); } } - MetricRules IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DatadogMonitorMetricRules IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMetricRules(document.RootElement, options); + return DeserializeDatadogMonitorMetricRules(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(MetricRules)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorMetricRules)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MetricRules.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorMetricRules.cs similarity index 81% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MetricRules.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorMetricRules.cs index 7e8358bcd77a..65044a77664f 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MetricRules.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorMetricRules.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.Datadog.Models { /// Set of rules for sending metrics for the Monitor resource. - internal partial class MetricRules + internal partial class DatadogMonitorMetricRules { /// /// Keeps track of any properties unknown to the library. @@ -45,22 +45,22 @@ internal partial class MetricRules /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public MetricRules() + /// Initializes a new instance of . + public DatadogMonitorMetricRules() { - FilteringTags = new ChangeTrackingList(); + FilteringTags = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// 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. /// Keeps track of any properties unknown to the library. - internal MetricRules(IList filteringTags, IDictionary serializedAdditionalRawData) + internal DatadogMonitorMetricRules(IList filteringTags, IDictionary serializedAdditionalRawData) { FilteringTags = filteringTags; _serializedAdditionalRawData = serializedAdditionalRawData; } /// 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 IList FilteringTags { get; } + public IList FilteringTags { get; } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorResourcePatch.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorPatch.Serialization.cs similarity index 69% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorResourcePatch.Serialization.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorPatch.Serialization.cs index 35a2a163b429..89ceeaf89619 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorResourcePatch.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorPatch.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.Datadog.Models { - public partial class DatadogMonitorResourcePatch : IUtf8JsonSerializable, IJsonModel + public partial class DatadogMonitorPatch : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(DatadogMonitorResourcePatch)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorPatch)} does not support writing '{format}' format."); } if (Optional.IsDefined(Properties)) @@ -72,19 +72,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DatadogMonitorResourcePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DatadogMonitorPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(DatadogMonitorResourcePatch)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorPatch)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDatadogMonitorResourcePatch(document.RootElement, options); + return DeserializeDatadogMonitorPatch(document.RootElement, options); } - internal static DatadogMonitorResourcePatch DeserializeDatadogMonitorResourcePatch(JsonElement element, ModelReaderWriterOptions options = null) + internal static DatadogMonitorPatch DeserializeDatadogMonitorPatch(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -92,9 +92,9 @@ internal static DatadogMonitorResourcePatch DeserializeDatadogMonitorResourcePat { return null; } - MonitorUpdateProperties properties = default; + DatadogMonitorResourcePatchProperties properties = default; IDictionary tags = default; - ResourceSku sku = default; + DatadogSku sku = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -105,7 +105,7 @@ internal static DatadogMonitorResourcePatch DeserializeDatadogMonitorResourcePat { continue; } - properties = MonitorUpdateProperties.DeserializeMonitorUpdateProperties(property.Value, options); + properties = DatadogMonitorResourcePatchProperties.DeserializeDatadogMonitorResourcePatchProperties(property.Value, options); continue; } if (property.NameEquals("tags"u8)) @@ -128,7 +128,7 @@ internal static DatadogMonitorResourcePatch DeserializeDatadogMonitorResourcePat { continue; } - sku = ResourceSku.DeserializeResourceSku(property.Value, options); + sku = DatadogSku.DeserializeDatadogSku(property.Value, options); continue; } if (options.Format != "W") @@ -137,38 +137,38 @@ internal static DatadogMonitorResourcePatch DeserializeDatadogMonitorResourcePat } } serializedAdditionalRawData = rawDataDictionary; - return new DatadogMonitorResourcePatch(properties, tags ?? new ChangeTrackingDictionary(), sku, serializedAdditionalRawData); + return new DatadogMonitorPatch(properties, tags ?? new ChangeTrackingDictionary(), sku, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); default: - throw new FormatException($"The model {nameof(DatadogMonitorResourcePatch)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorPatch)} does not support writing '{options.Format}' format."); } } - DatadogMonitorResourcePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DatadogMonitorPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeDatadogMonitorResourcePatch(document.RootElement, options); + return DeserializeDatadogMonitorPatch(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DatadogMonitorResourcePatch)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorPatch)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorResourcePatch.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorPatch.cs similarity index 73% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorResourcePatch.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorPatch.cs index 5a47319dd0b0..a19da2c87d5b 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorResourcePatch.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorPatch.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.Datadog.Models { /// The parameters for a PATCH request to a monitor resource. - public partial class DatadogMonitorResourcePatch + public partial class DatadogMonitorPatch { /// /// Keeps track of any properties unknown to the library. @@ -45,18 +45,18 @@ public partial class DatadogMonitorResourcePatch /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public DatadogMonitorResourcePatch() + /// Initializes a new instance of . + public DatadogMonitorPatch() { Tags = new ChangeTrackingDictionary(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The set of properties that can be update in a PATCH request to a monitor resource. /// The new tags of the monitor resource. /// /// Keeps track of any properties unknown to the library. - internal DatadogMonitorResourcePatch(MonitorUpdateProperties properties, IDictionary tags, ResourceSku sku, IDictionary serializedAdditionalRawData) + internal DatadogMonitorPatch(DatadogMonitorResourcePatchProperties properties, IDictionary tags, DatadogSku sku, IDictionary serializedAdditionalRawData) { Properties = properties; Tags = tags; @@ -65,28 +65,16 @@ internal DatadogMonitorResourcePatch(MonitorUpdateProperties properties, IDictio } /// The set of properties that can be update in a PATCH request to a monitor resource. - internal MonitorUpdateProperties Properties { get; set; } - /// Flag specifying if the resource monitoring is enabled or disabled. - public MonitoringStatus? MonitorUpdateMonitoringStatus - { - get => Properties is null ? default : Properties.MonitoringStatus; - set - { - if (Properties is null) - Properties = new MonitorUpdateProperties(); - Properties.MonitoringStatus = value; - } - } - + public DatadogMonitorResourcePatchProperties Properties { get; set; } /// The new tags of the monitor resource. public IDictionary Tags { get; } /// Gets or sets the sku. - internal ResourceSku Sku { get; set; } - /// Name of the SKU. + internal DatadogSku Sku { get; set; } + /// Name of the SKU in {PlanId} format. For Terraform, the only allowed value is 'Linked'. public string SkuName { get => Sku is null ? default : Sku.Name; - set => Sku = new ResourceSku(value); + set => Sku = new DatadogSku(value); } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitorProperties.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorProperties.Serialization.cs similarity index 74% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitorProperties.Serialization.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorProperties.Serialization.cs index 6859543d90e3..0f84bbbc4ef6 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitorProperties.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorProperties.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.Datadog.Models { - public partial class MonitorProperties : IUtf8JsonSerializable, IJsonModel + public partial class DatadogMonitorProperties : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(MonitorProperties)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorProperties)} does not support writing '{format}' format."); } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) @@ -86,19 +86,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - MonitorProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DatadogMonitorProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(MonitorProperties)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorProperties)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMonitorProperties(document.RootElement, options); + return DeserializeDatadogMonitorProperties(document.RootElement, options); } - internal static MonitorProperties DeserializeMonitorProperties(JsonElement element, ModelReaderWriterOptions options = null) + internal static DatadogMonitorProperties DeserializeDatadogMonitorProperties(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -106,12 +106,12 @@ internal static MonitorProperties DeserializeMonitorProperties(JsonElement eleme { return null; } - ProvisioningState? provisioningState = default; - MonitoringStatus? monitoringStatus = default; + DatadogProvisioningState? provisioningState = default; + DatadogMonitoringStatus? monitoringStatus = default; MarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = default; DatadogOrganizationProperties datadogOrganizationProperties = default; - UserInfo userInfo = default; - LiftrResourceCategory? liftrResourceCategory = default; + DatadogUserInfo userInfo = default; + DatadogLiftrResourceCategory? liftrResourceCategory = default; int? liftrResourcePreference = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -123,7 +123,7 @@ internal static MonitorProperties DeserializeMonitorProperties(JsonElement eleme { continue; } - provisioningState = new ProvisioningState(property.Value.GetString()); + provisioningState = new DatadogProvisioningState(property.Value.GetString()); continue; } if (property.NameEquals("monitoringStatus"u8)) @@ -132,7 +132,7 @@ internal static MonitorProperties DeserializeMonitorProperties(JsonElement eleme { continue; } - monitoringStatus = new MonitoringStatus(property.Value.GetString()); + monitoringStatus = new DatadogMonitoringStatus(property.Value.GetString()); continue; } if (property.NameEquals("marketplaceSubscriptionStatus"u8)) @@ -159,7 +159,7 @@ internal static MonitorProperties DeserializeMonitorProperties(JsonElement eleme { continue; } - userInfo = UserInfo.DeserializeUserInfo(property.Value, options); + userInfo = DatadogUserInfo.DeserializeDatadogUserInfo(property.Value, options); continue; } if (property.NameEquals("liftrResourceCategory"u8)) @@ -168,7 +168,7 @@ internal static MonitorProperties DeserializeMonitorProperties(JsonElement eleme { continue; } - liftrResourceCategory = new LiftrResourceCategory(property.Value.GetString()); + liftrResourceCategory = new DatadogLiftrResourceCategory(property.Value.GetString()); continue; } if (property.NameEquals("liftrResourcePreference"u8)) @@ -186,7 +186,7 @@ internal static MonitorProperties DeserializeMonitorProperties(JsonElement eleme } } serializedAdditionalRawData = rawDataDictionary; - return new MonitorProperties( + return new DatadogMonitorProperties( provisioningState, monitoringStatus, marketplaceSubscriptionStatus, @@ -197,35 +197,35 @@ internal static MonitorProperties DeserializeMonitorProperties(JsonElement eleme serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); default: - throw new FormatException($"The model {nameof(MonitorProperties)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorProperties)} does not support writing '{options.Format}' format."); } } - MonitorProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DatadogMonitorProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMonitorProperties(document.RootElement, options); + return DeserializeDatadogMonitorProperties(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(MonitorProperties)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorProperties)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitorProperties.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorProperties.cs similarity index 68% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitorProperties.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorProperties.cs index b603c7d912fe..4fbe4c815b6e 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitorProperties.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorProperties.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.Datadog.Models { /// Properties specific to the monitor resource. - public partial class MonitorProperties + public partial class DatadogMonitorProperties { /// /// Keeps track of any properties unknown to the library. @@ -45,21 +45,21 @@ public partial class MonitorProperties /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public MonitorProperties() + /// Initializes a new instance of . + public DatadogMonitorProperties() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// /// Flag specifying if the resource monitoring is enabled or disabled. /// Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state. - /// Datadog organization properties. - /// User info. + /// Specify the Datadog organization name. In the case of linking to existing organizations, Id, ApiKey, and Applicationkey is required as well. + /// Includes name, email and optionally, phone number. User Information can't be null. /// /// The priority of the resource. /// Keeps track of any properties unknown to the library. - internal MonitorProperties(ProvisioningState? provisioningState, MonitoringStatus? monitoringStatus, MarketplaceSubscriptionStatus? marketplaceSubscriptionStatus, DatadogOrganizationProperties datadogOrganizationProperties, UserInfo userInfo, LiftrResourceCategory? liftrResourceCategory, int? liftrResourcePreference, IDictionary serializedAdditionalRawData) + internal DatadogMonitorProperties(DatadogProvisioningState? provisioningState, DatadogMonitoringStatus? monitoringStatus, MarketplaceSubscriptionStatus? marketplaceSubscriptionStatus, DatadogOrganizationProperties datadogOrganizationProperties, DatadogUserInfo userInfo, DatadogLiftrResourceCategory? liftrResourceCategory, int? liftrResourcePreference, IDictionary serializedAdditionalRawData) { ProvisioningState = provisioningState; MonitoringStatus = monitoringStatus; @@ -72,17 +72,17 @@ internal MonitorProperties(ProvisioningState? provisioningState, MonitoringStatu } /// Gets the provisioning state. - public ProvisioningState? ProvisioningState { get; } + public DatadogProvisioningState? ProvisioningState { get; } /// Flag specifying if the resource monitoring is enabled or disabled. - public MonitoringStatus? MonitoringStatus { get; set; } + public DatadogMonitoringStatus? MonitoringStatus { get; set; } /// Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state. public MarketplaceSubscriptionStatus? MarketplaceSubscriptionStatus { get; } - /// Datadog organization properties. + /// Specify the Datadog organization name. In the case of linking to existing organizations, Id, ApiKey, and Applicationkey is required as well. public DatadogOrganizationProperties DatadogOrganizationProperties { get; set; } - /// User info. - public UserInfo UserInfo { get; set; } + /// Includes name, email and optionally, phone number. User Information can't be null. + public DatadogUserInfo UserInfo { get; set; } /// Gets the liftr resource category. - public LiftrResourceCategory? LiftrResourceCategory { get; } + public DatadogLiftrResourceCategory? LiftrResourceCategory { get; } /// The priority of the resource. public int? LiftrResourcePreference { get; } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorResourceListResponse.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorResourceListResponse.Serialization.cs index d09a0aed512b..a3e0723f16e8 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorResourceListResponse.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorResourceListResponse.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DatadogMonitorResourceListResponse)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -86,29 +83,29 @@ internal static DatadogMonitorResourceListResponse DeserializeDatadogMonitorReso { return null; } - IReadOnlyList value = default; - string nextLink = default; + IReadOnlyList value = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(DatadogMonitorResourceData.DeserializeDatadogMonitorResourceData(item, options)); + array.Add(DatadogMonitorData.DeserializeDatadogMonitorData(item, options)); } value = array; continue; } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static DatadogMonitorResourceListResponse DeserializeDatadogMonitorReso } } serializedAdditionalRawData = rawDataDictionary; - return new DatadogMonitorResourceListResponse(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new DatadogMonitorResourceListResponse(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorResourceListResponse.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorResourceListResponse.cs index 853af5c64878..c2d58d74181c 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorResourceListResponse.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorResourceListResponse.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Datadog.Models { @@ -46,25 +47,34 @@ internal partial class DatadogMonitorResourceListResponse private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal DatadogMonitorResourceListResponse() + /// The DatadogMonitorResource items on this page. + /// is null. + internal DatadogMonitorResourceListResponse(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// Results of a list operation. - /// Link to the next set of results, if any. + /// The DatadogMonitorResource items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal DatadogMonitorResourceListResponse(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal DatadogMonitorResourceListResponse(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Results of a list operation. - public IReadOnlyList Value { get; } - /// Link to the next set of results, if any. - public string NextLink { get; } + /// Initializes a new instance of for deserialization. + internal DatadogMonitorResourceListResponse() + { + } + + /// The DatadogMonitorResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringTagRulesProperties.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorResourcePatchProperties.Serialization.cs similarity index 53% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringTagRulesProperties.Serialization.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorResourcePatchProperties.Serialization.cs index a27605356936..ef0435a3abe9 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringTagRulesProperties.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorResourcePatchProperties.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.Datadog.Models { - public partial class MonitoringTagRulesProperties : IUtf8JsonSerializable, IJsonModel + public partial class DatadogMonitorResourcePatchProperties : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,26 +28,26 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(MonitoringTagRulesProperties)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorResourcePatchProperties)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + if (Optional.IsDefined(MonitoringStatus)) { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); + writer.WritePropertyName("monitoringStatus"u8); + writer.WriteStringValue(MonitoringStatus.Value.ToString()); } - if (Optional.IsDefined(LogRules)) + if (Optional.IsDefined(IsCspm)) { - writer.WritePropertyName("logRules"u8); - writer.WriteObjectValue(LogRules, options); + writer.WritePropertyName("cspm"u8); + writer.WriteBooleanValue(IsCspm.Value); } - if (Optional.IsDefined(MetricRules)) + if (Optional.IsDefined(IsResourceCollection)) { - writer.WritePropertyName("metricRules"u8); - writer.WriteObjectValue(MetricRules, options); + writer.WritePropertyName("resourceCollection"u8); + writer.WriteBooleanValue(IsResourceCollection.Value); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -66,19 +66,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - MonitoringTagRulesProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DatadogMonitorResourcePatchProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(MonitoringTagRulesProperties)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorResourcePatchProperties)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMonitoringTagRulesProperties(document.RootElement, options); + return DeserializeDatadogMonitorResourcePatchProperties(document.RootElement, options); } - internal static MonitoringTagRulesProperties DeserializeMonitoringTagRulesProperties(JsonElement element, ModelReaderWriterOptions options = null) + internal static DatadogMonitorResourcePatchProperties DeserializeDatadogMonitorResourcePatchProperties(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -86,38 +86,38 @@ internal static MonitoringTagRulesProperties DeserializeMonitoringTagRulesProper { return null; } - ProvisioningState? provisioningState = default; - LogRules logRules = default; - MetricRules metricRules = default; + DatadogMonitoringStatus? monitoringStatus = default; + bool? cspm = default; + bool? resourceCollection = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("provisioningState"u8)) + if (property.NameEquals("monitoringStatus"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - provisioningState = new ProvisioningState(property.Value.GetString()); + monitoringStatus = new DatadogMonitoringStatus(property.Value.GetString()); continue; } - if (property.NameEquals("logRules"u8)) + if (property.NameEquals("cspm"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - logRules = LogRules.DeserializeLogRules(property.Value, options); + cspm = property.Value.GetBoolean(); continue; } - if (property.NameEquals("metricRules"u8)) + if (property.NameEquals("resourceCollection"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - metricRules = MetricRules.DeserializeMetricRules(property.Value, options); + resourceCollection = property.Value.GetBoolean(); continue; } if (options.Format != "W") @@ -126,38 +126,38 @@ internal static MonitoringTagRulesProperties DeserializeMonitoringTagRulesProper } } serializedAdditionalRawData = rawDataDictionary; - return new MonitoringTagRulesProperties(provisioningState, logRules, metricRules, serializedAdditionalRawData); + return new DatadogMonitorResourcePatchProperties(monitoringStatus, cspm, resourceCollection, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); default: - throw new FormatException($"The model {nameof(MonitoringTagRulesProperties)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorResourcePatchProperties)} does not support writing '{options.Format}' format."); } } - MonitoringTagRulesProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DatadogMonitorResourcePatchProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMonitoringTagRulesProperties(document.RootElement, options); + return DeserializeDatadogMonitorResourcePatchProperties(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(MonitoringTagRulesProperties)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitorResourcePatchProperties)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorResourcePatchProperties.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorResourcePatchProperties.cs new file mode 100644 index 000000000000..0cff5052ef8f --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorResourcePatchProperties.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Datadog.Models +{ + /// The set of properties that can be update in a PATCH request to a monitor resource. + public partial class DatadogMonitorResourcePatchProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DatadogMonitorResourcePatchProperties() + { + } + + /// Initializes a new instance of . + /// Flag specifying if the resource monitoring is enabled or disabled. + /// The new cloud security posture management value of the monitor resource. This collects configuration information for all resources in a subscription and track conformance to industry benchmarks. + /// The new resource collection value of the monitor resource. This collects configuration information for all resources in a subscription. + /// Keeps track of any properties unknown to the library. + internal DatadogMonitorResourcePatchProperties(DatadogMonitoringStatus? monitoringStatus, bool? isCspm, bool? isResourceCollection, IDictionary serializedAdditionalRawData) + { + MonitoringStatus = monitoringStatus; + IsCspm = isCspm; + IsResourceCollection = isResourceCollection; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Flag specifying if the resource monitoring is enabled or disabled. + public DatadogMonitoringStatus? MonitoringStatus { get; set; } + /// The new cloud security posture management value of the monitor resource. This collects configuration information for all resources in a subscription and track conformance to industry benchmarks. + public bool? IsCspm { get; set; } + /// The new resource collection value of the monitor resource. This collects configuration information for all resources in a subscription. + public bool? IsResourceCollection { get; set; } + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorStatus.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorStatus.cs new file mode 100644 index 000000000000..89bca48600a8 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorStatus.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Datadog.Models +{ + /// The state of monitoring. + public readonly partial struct DatadogMonitorStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DatadogMonitorStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InProgressValue = "InProgress"; + private const string ActiveValue = "Active"; + private const string FailedValue = "Failed"; + private const string DeletingValue = "Deleting"; + + /// InProgress. + public static DatadogMonitorStatus InProgress { get; } = new DatadogMonitorStatus(InProgressValue); + /// Active. + public static DatadogMonitorStatus Active { get; } = new DatadogMonitorStatus(ActiveValue); + /// Failed. + public static DatadogMonitorStatus Failed { get; } = new DatadogMonitorStatus(FailedValue); + /// Deleting. + public static DatadogMonitorStatus Deleting { get; } = new DatadogMonitorStatus(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(DatadogMonitorStatus left, DatadogMonitorStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DatadogMonitorStatus left, DatadogMonitorStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DatadogMonitorStatus(string value) => new DatadogMonitorStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DatadogMonitorStatus other && Equals(other); + /// + public bool Equals(DatadogMonitorStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorTagAction.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorTagAction.cs new file mode 100644 index 000000000000..f51e7c812613 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitorTagAction.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Datadog.Models +{ + /// Valid actions for a filtering tag. Exclusion takes priority over inclusion. + public readonly partial struct DatadogMonitorTagAction : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DatadogMonitorTagAction(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string IncludeValue = "Include"; + private const string ExcludeValue = "Exclude"; + + /// Include. + public static DatadogMonitorTagAction Include { get; } = new DatadogMonitorTagAction(IncludeValue); + /// Exclude. + public static DatadogMonitorTagAction Exclude { get; } = new DatadogMonitorTagAction(ExcludeValue); + /// Determines if two values are the same. + public static bool operator ==(DatadogMonitorTagAction left, DatadogMonitorTagAction right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DatadogMonitorTagAction left, DatadogMonitorTagAction right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DatadogMonitorTagAction(string value) => new DatadogMonitorTagAction(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DatadogMonitorTagAction other && Equals(other); + /// + public bool Equals(DatadogMonitorTagAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoredResourceContent.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitoredResourceResult.Serialization.cs similarity index 68% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoredResourceContent.Serialization.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitoredResourceResult.Serialization.cs index 7d6e43bc3e41..e362e61a9d9d 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoredResourceContent.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitoredResourceResult.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.Datadog.Models { - public partial class MonitoredResourceContent : IUtf8JsonSerializable, IJsonModel + public partial class DatadogMonitoredResourceResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(MonitoredResourceContent)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitoredResourceResult)} does not support writing '{format}' format."); } if (Optional.IsDefined(Id)) @@ -39,20 +39,20 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); } - if (Optional.IsDefined(SendingMetrics)) + if (Optional.IsDefined(IsSendingMetricsEnabled)) { writer.WritePropertyName("sendingMetrics"u8); - writer.WriteBooleanValue(SendingMetrics.Value); + writer.WriteBooleanValue(IsSendingMetricsEnabled.Value); } if (Optional.IsDefined(ReasonForMetricsStatus)) { writer.WritePropertyName("reasonForMetricsStatus"u8); writer.WriteStringValue(ReasonForMetricsStatus); } - if (Optional.IsDefined(SendingLogs)) + if (Optional.IsDefined(IsSendingLogsEnabled)) { writer.WritePropertyName("sendingLogs"u8); - writer.WriteBooleanValue(SendingLogs.Value); + writer.WriteBooleanValue(IsSendingLogsEnabled.Value); } if (Optional.IsDefined(ReasonForLogsStatus)) { @@ -76,19 +76,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - MonitoredResourceContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DatadogMonitoredResourceResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(MonitoredResourceContent)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitoredResourceResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMonitoredResourceContent(document.RootElement, options); + return DeserializeDatadogMonitoredResourceResult(document.RootElement, options); } - internal static MonitoredResourceContent DeserializeMonitoredResourceContent(JsonElement element, ModelReaderWriterOptions options = null) + internal static DatadogMonitoredResourceResult DeserializeDatadogMonitoredResourceResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -96,7 +96,7 @@ internal static MonitoredResourceContent DeserializeMonitoredResourceContent(Jso { return null; } - string id = default; + ResourceIdentifier id = default; bool? sendingMetrics = default; string reasonForMetricsStatus = default; bool? sendingLogs = default; @@ -107,7 +107,11 @@ internal static MonitoredResourceContent DeserializeMonitoredResourceContent(Jso { if (property.NameEquals("id"u8)) { - id = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("sendingMetrics"u8)) @@ -144,7 +148,7 @@ internal static MonitoredResourceContent DeserializeMonitoredResourceContent(Jso } } serializedAdditionalRawData = rawDataDictionary; - return new MonitoredResourceContent( + return new DatadogMonitoredResourceResult( id, sendingMetrics, reasonForMetricsStatus, @@ -153,35 +157,35 @@ internal static MonitoredResourceContent DeserializeMonitoredResourceContent(Jso serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); default: - throw new FormatException($"The model {nameof(MonitoredResourceContent)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitoredResourceResult)} does not support writing '{options.Format}' format."); } } - MonitoredResourceContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DatadogMonitoredResourceResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMonitoredResourceContent(document.RootElement, options); + return DeserializeDatadogMonitoredResourceResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(MonitoredResourceContent)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogMonitoredResourceResult)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoredResourceContent.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitoredResourceResult.cs similarity index 73% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoredResourceContent.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitoredResourceResult.cs index 98961166f7d5..ddb51ff9acc6 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoredResourceContent.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitoredResourceResult.cs @@ -7,11 +7,12 @@ using System; using System.Collections.Generic; +using Azure.Core; namespace Azure.ResourceManager.Datadog.Models { /// The properties of a resource currently being monitored by the Datadog monitor resource. - public partial class MonitoredResourceContent + public partial class DatadogMonitoredResourceResult { /// /// Keeps track of any properties unknown to the library. @@ -45,36 +46,36 @@ public partial class MonitoredResourceContent /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - internal MonitoredResourceContent() + /// Initializes a new instance of . + internal DatadogMonitoredResourceResult() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The ARM id of the resource. - /// Flag indicating if resource is sending metrics to Datadog. + /// 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. + /// Flag indicating if resource is sending logs to Datadog. /// Reason for why the resource is sending logs (or why it is not sending). /// Keeps track of any properties unknown to the library. - internal MonitoredResourceContent(string id, bool? sendingMetrics, string reasonForMetricsStatus, bool? sendingLogs, string reasonForLogsStatus, IDictionary serializedAdditionalRawData) + internal DatadogMonitoredResourceResult(ResourceIdentifier id, bool? isSendingMetricsEnabled, string reasonForMetricsStatus, bool? isSendingLogsEnabled, string reasonForLogsStatus, IDictionary serializedAdditionalRawData) { Id = id; - SendingMetrics = sendingMetrics; + IsSendingMetricsEnabled = isSendingMetricsEnabled; ReasonForMetricsStatus = reasonForMetricsStatus; - SendingLogs = sendingLogs; + IsSendingLogsEnabled = isSendingLogsEnabled; ReasonForLogsStatus = reasonForLogsStatus; _serializedAdditionalRawData = serializedAdditionalRawData; } /// The ARM id of the resource. - public string Id { get; } + public ResourceIdentifier Id { get; } /// Flag indicating if resource is sending metrics to Datadog. - public bool? SendingMetrics { get; } + public bool? IsSendingMetricsEnabled { get; } /// Reason for why the resource is sending metrics (or why it is not sending). public string ReasonForMetricsStatus { get; } /// Flag indicating if resource is sending logs to Datadog. - public bool? SendingLogs { get; } + public bool? IsSendingLogsEnabled { get; } /// Reason for why the resource is sending logs (or why it is not sending). public string ReasonForLogsStatus { get; } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitoredSubscriptionItem.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitoredSubscriptionItem.Serialization.cs new file mode 100644 index 000000000000..6caee521dacb --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitoredSubscriptionItem.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Datadog.Models +{ + public partial class DatadogMonitoredSubscriptionItem : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatadogMonitoredSubscriptionItem)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SubscriptionId)) + { + writer.WritePropertyName("subscriptionId"u8); + writer.WriteStringValue(SubscriptionId); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + writer.WriteStringValue(Error); + } + if (Optional.IsDefined(TagRules)) + { + writer.WritePropertyName("tagRules"u8); + writer.WriteObjectValue(TagRules, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DatadogMonitoredSubscriptionItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatadogMonitoredSubscriptionItem)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatadogMonitoredSubscriptionItem(document.RootElement, options); + } + + internal static DatadogMonitoredSubscriptionItem DeserializeDatadogMonitoredSubscriptionItem(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string subscriptionId = default; + DatadogMonitorStatus? status = default; + string error = default; + MonitoringTagRuleProperties tagRules = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subscriptionId"u8)) + { + subscriptionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new DatadogMonitorStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("error"u8)) + { + error = property.Value.GetString(); + continue; + } + if (property.NameEquals("tagRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tagRules = MonitoringTagRuleProperties.DeserializeMonitoringTagRuleProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatadogMonitoredSubscriptionItem(subscriptionId, status, error, tagRules, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); + default: + throw new FormatException($"The model {nameof(DatadogMonitoredSubscriptionItem)} does not support writing '{options.Format}' format."); + } + } + + DatadogMonitoredSubscriptionItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDatadogMonitoredSubscriptionItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatadogMonitoredSubscriptionItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitoredSubscriptionItem.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitoredSubscriptionItem.cs new file mode 100644 index 000000000000..447eb5c20ea7 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitoredSubscriptionItem.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Datadog.Models +{ + /// The list of subscriptions and it's monitoring status by current Datadog monitor. + public partial class DatadogMonitoredSubscriptionItem + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DatadogMonitoredSubscriptionItem() + { + } + + /// Initializes a new instance of . + /// The subscriptionId to be monitored. + /// The state of monitoring. + /// The reason of not monitoring the subscription. + /// Definition of the properties for a TagRules resource. + /// Keeps track of any properties unknown to the library. + internal DatadogMonitoredSubscriptionItem(string subscriptionId, DatadogMonitorStatus? status, string error, MonitoringTagRuleProperties tagRules, IDictionary serializedAdditionalRawData) + { + SubscriptionId = subscriptionId; + Status = status; + Error = error; + TagRules = tagRules; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The subscriptionId to be monitored. + public string SubscriptionId { get; set; } + /// The state of monitoring. + public DatadogMonitorStatus? Status { get; set; } + /// The reason of not monitoring the subscription. + public string Error { get; set; } + /// Definition of the properties for a TagRules resource. + public MonitoringTagRuleProperties TagRules { get; set; } + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitoringStatus.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitoringStatus.cs new file mode 100644 index 000000000000..1fe164b2ccbf --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogMonitoringStatus.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Datadog.Models +{ + /// Flag specifying if the resource monitoring is enabled or disabled. + public readonly partial struct DatadogMonitoringStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DatadogMonitoringStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Enabled. + public static DatadogMonitoringStatus Enabled { get; } = new DatadogMonitoringStatus(EnabledValue); + /// Disabled. + public static DatadogMonitoringStatus Disabled { get; } = new DatadogMonitoringStatus(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(DatadogMonitoringStatus left, DatadogMonitoringStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DatadogMonitoringStatus left, DatadogMonitoringStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DatadogMonitoringStatus(string value) => new DatadogMonitoringStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DatadogMonitoringStatus other && Equals(other); + /// + public bool Equals(DatadogMonitoringStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogOperation.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogOperation.cs new file mode 100644 index 000000000000..cc62d073d650 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogOperation.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Datadog.Models +{ + /// The operation for the patch on the resource. + public readonly partial struct DatadogOperation : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DatadogOperation(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AddBeginValue = "AddBegin"; + private const string AddCompleteValue = "AddComplete"; + private const string DeleteBeginValue = "DeleteBegin"; + private const string DeleteCompleteValue = "DeleteComplete"; + private const string ActiveValue = "Active"; + + /// AddBegin. + public static DatadogOperation AddBegin { get; } = new DatadogOperation(AddBeginValue); + /// AddComplete. + public static DatadogOperation AddComplete { get; } = new DatadogOperation(AddCompleteValue); + /// DeleteBegin. + public static DatadogOperation DeleteBegin { get; } = new DatadogOperation(DeleteBeginValue); + /// DeleteComplete. + public static DatadogOperation DeleteComplete { get; } = new DatadogOperation(DeleteCompleteValue); + /// Active. + public static DatadogOperation Active { get; } = new DatadogOperation(ActiveValue); + /// Determines if two values are the same. + public static bool operator ==(DatadogOperation left, DatadogOperation right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DatadogOperation left, DatadogOperation right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DatadogOperation(string value) => new DatadogOperation(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DatadogOperation other && Equals(other); + /// + public bool Equals(DatadogOperation other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogOrganizationProperties.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogOrganizationProperties.Serialization.cs index 233ae8e790cb..df3d93deca0f 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogOrganizationProperties.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogOrganizationProperties.Serialization.cs @@ -34,12 +34,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DatadogOrganizationProperties)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsDefined(Name)) + if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } - if (options.Format != "W" && Optional.IsDefined(Id)) + if (Optional.IsDefined(Id)) { writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); @@ -74,6 +74,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("enterpriseAppId"u8); writer.WriteStringValue(EnterpriseAppId); } + if (Optional.IsDefined(IsCspm)) + { + writer.WritePropertyName("cspm"u8); + writer.WriteBooleanValue(IsCspm.Value); + } + if (Optional.IsDefined(IsResourceCollection)) + { + writer.WritePropertyName("resourceCollection"u8); + writer.WriteBooleanValue(IsResourceCollection.Value); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -119,6 +129,8 @@ internal static DatadogOrganizationProperties DeserializeDatadogOrganizationProp string apiKey = default; string applicationKey = default; string enterpriseAppId = default; + bool? cspm = default; + bool? resourceCollection = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -167,6 +179,24 @@ internal static DatadogOrganizationProperties DeserializeDatadogOrganizationProp enterpriseAppId = property.Value.GetString(); continue; } + if (property.NameEquals("cspm"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cspm = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("resourceCollection"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceCollection = property.Value.GetBoolean(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -182,6 +212,8 @@ internal static DatadogOrganizationProperties DeserializeDatadogOrganizationProp apiKey, applicationKey, enterpriseAppId, + cspm, + resourceCollection, serializedAdditionalRawData); } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogOrganizationProperties.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogOrganizationProperties.cs index d40c9a0d7918..8be017ff9aa9 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogOrganizationProperties.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogOrganizationProperties.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Datadog.Models { - /// Datadog organization properties. + /// Specify the Datadog organization name. In the case of linking to existing organizations, Id, ApiKey, and Applicationkey is required as well. public partial class DatadogOrganizationProperties { /// @@ -53,14 +53,16 @@ public DatadogOrganizationProperties() /// Initializes a new instance of . /// Name of the Datadog organization. /// Id of the Datadog organization. - /// The auth code used to linking to an existing 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 redirect uri for linking. + /// The redirect URI for linking. /// Api key associated to the Datadog organization. /// Application key associated to the Datadog organization. /// The Id of the Enterprise App used for Single sign on. + /// The configuration which describes the state of cloud security posture management. This collects configuration information for all resources in a subscription and track conformance to industry benchmarks. + /// The configuration which describes the state of resource collection. This collects configuration information for all resources in a subscription. /// Keeps track of any properties unknown to the library. - internal DatadogOrganizationProperties(string name, string id, string linkingAuthCode, string linkingClientId, Uri redirectUri, string apiKey, string applicationKey, string enterpriseAppId, IDictionary serializedAdditionalRawData) + internal DatadogOrganizationProperties(string name, string id, string linkingAuthCode, string linkingClientId, Uri redirectUri, string apiKey, string applicationKey, string enterpriseAppId, bool? isCspm, bool? isResourceCollection, IDictionary serializedAdditionalRawData) { Name = name; Id = id; @@ -70,18 +72,20 @@ internal DatadogOrganizationProperties(string name, string id, string linkingAut ApiKey = apiKey; ApplicationKey = applicationKey; EnterpriseAppId = enterpriseAppId; + IsCspm = isCspm; + IsResourceCollection = isResourceCollection; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Name of the Datadog organization. - public string Name { get; } + public string Name { get; set; } /// Id of the Datadog organization. - public string Id { get; } - /// The auth code used to linking to an existing datadog organization. + public string Id { get; set; } + /// The auth code used to linking to an existing Datadog organization. public string LinkingAuthCode { get; set; } /// The client_id from an existing in exchange for an auth token to link organization. public string LinkingClientId { get; set; } - /// The redirect uri for linking. + /// The redirect URI for linking. public Uri RedirectUri { get; set; } /// Api key associated to the Datadog organization. public string ApiKey { get; set; } @@ -89,5 +93,9 @@ internal DatadogOrganizationProperties(string name, string id, string linkingAut public string ApplicationKey { get; set; } /// The Id of the Enterprise App used for Single sign on. public string EnterpriseAppId { get; set; } + /// The configuration which describes the state of cloud security posture management. This collects configuration information for all resources in a subscription and track conformance to industry benchmarks. + public bool? IsCspm { get; set; } + /// The configuration which describes the state of resource collection. This collects configuration information for all resources in a subscription. + public bool? IsResourceCollection { get; set; } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogProvisioningState.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogProvisioningState.cs new file mode 100644 index 000000000000..a8fb3a35290b --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogProvisioningState.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Datadog.Models +{ + /// The DatadogProvisioningState. + public readonly partial struct DatadogProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DatadogProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AcceptedValue = "Accepted"; + private const string CreatingValue = "Creating"; + private const string UpdatingValue = "Updating"; + private const string DeletingValue = "Deleting"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + private const string DeletedValue = "Deleted"; + private const string NotSpecifiedValue = "NotSpecified"; + + /// Accepted. + public static DatadogProvisioningState Accepted { get; } = new DatadogProvisioningState(AcceptedValue); + /// Creating. + public static DatadogProvisioningState Creating { get; } = new DatadogProvisioningState(CreatingValue); + /// Updating. + public static DatadogProvisioningState Updating { get; } = new DatadogProvisioningState(UpdatingValue); + /// Deleting. + public static DatadogProvisioningState Deleting { get; } = new DatadogProvisioningState(DeletingValue); + /// Succeeded. + public static DatadogProvisioningState Succeeded { get; } = new DatadogProvisioningState(SucceededValue); + /// Failed. + public static DatadogProvisioningState Failed { get; } = new DatadogProvisioningState(FailedValue); + /// Canceled. + public static DatadogProvisioningState Canceled { get; } = new DatadogProvisioningState(CanceledValue); + /// Deleted. + public static DatadogProvisioningState Deleted { get; } = new DatadogProvisioningState(DeletedValue); + /// NotSpecified. + public static DatadogProvisioningState NotSpecified { get; } = new DatadogProvisioningState(NotSpecifiedValue); + /// Determines if two values are the same. + public static bool operator ==(DatadogProvisioningState left, DatadogProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DatadogProvisioningState left, DatadogProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DatadogProvisioningState(string value) => new DatadogProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DatadogProvisioningState other && Equals(other); + /// + public bool Equals(DatadogProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSingleSignOnProperties.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSingleSignOnProperties.Serialization.cs index b95b6180edbc..3fda15350639 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSingleSignOnProperties.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSingleSignOnProperties.Serialization.cs @@ -91,8 +91,8 @@ internal static DatadogSingleSignOnProperties DeserializeDatadogSingleSignOnProp { return null; } - ProvisioningState? provisioningState = default; - SingleSignOnState? singleSignOnState = default; + DatadogProvisioningState? provisioningState = default; + DatadogSingleSignOnState? singleSignOnState = default; string enterpriseAppId = default; Uri singleSignOnUrl = default; IDictionary serializedAdditionalRawData = default; @@ -105,7 +105,7 @@ internal static DatadogSingleSignOnProperties DeserializeDatadogSingleSignOnProp { continue; } - provisioningState = new ProvisioningState(property.Value.GetString()); + provisioningState = new DatadogProvisioningState(property.Value.GetString()); continue; } if (property.NameEquals("singleSignOnState"u8)) @@ -114,7 +114,7 @@ internal static DatadogSingleSignOnProperties DeserializeDatadogSingleSignOnProp { continue; } - singleSignOnState = new SingleSignOnState(property.Value.GetString()); + singleSignOnState = new DatadogSingleSignOnState(property.Value.GetString()); continue; } if (property.NameEquals("enterpriseAppId"u8)) diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSingleSignOnProperties.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSingleSignOnProperties.cs index 819bbf32ffe1..72ff798c51e4 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSingleSignOnProperties.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSingleSignOnProperties.cs @@ -56,7 +56,7 @@ public DatadogSingleSignOnProperties() /// The Id of the Enterprise App used for Single sign-on. /// The login URL specific to this Datadog Organization. /// Keeps track of any properties unknown to the library. - internal DatadogSingleSignOnProperties(ProvisioningState? provisioningState, SingleSignOnState? singleSignOnState, string enterpriseAppId, Uri singleSignOnUri, IDictionary serializedAdditionalRawData) + internal DatadogSingleSignOnProperties(DatadogProvisioningState? provisioningState, DatadogSingleSignOnState? singleSignOnState, string enterpriseAppId, Uri singleSignOnUri, IDictionary serializedAdditionalRawData) { ProvisioningState = provisioningState; SingleSignOnState = singleSignOnState; @@ -66,9 +66,9 @@ internal DatadogSingleSignOnProperties(ProvisioningState? provisioningState, Sin } /// Gets the provisioning state. - public ProvisioningState? ProvisioningState { get; } + public DatadogProvisioningState? ProvisioningState { get; } /// Various states of the SSO resource. - public SingleSignOnState? SingleSignOnState { get; set; } + public DatadogSingleSignOnState? SingleSignOnState { get; set; } /// The Id of the Enterprise App used for Single sign-on. public string EnterpriseAppId { get; set; } /// The login URL specific to this Datadog Organization. diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSingleSignOnResourceListResponse.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSingleSignOnResourceListResponse.Serialization.cs index 69bde882264a..ac252b91814b 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSingleSignOnResourceListResponse.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSingleSignOnResourceListResponse.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DatadogSingleSignOnResourceListResponse)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -86,29 +83,29 @@ internal static DatadogSingleSignOnResourceListResponse DeserializeDatadogSingle { return null; } - IReadOnlyList value = default; - string nextLink = default; + IReadOnlyList value = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(DatadogSingleSignOnResourceData.DeserializeDatadogSingleSignOnResourceData(item, options)); + array.Add(DatadogSingleSignOnData.DeserializeDatadogSingleSignOnData(item, options)); } value = array; continue; } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static DatadogSingleSignOnResourceListResponse DeserializeDatadogSingle } } serializedAdditionalRawData = rawDataDictionary; - return new DatadogSingleSignOnResourceListResponse(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new DatadogSingleSignOnResourceListResponse(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSingleSignOnResourceListResponse.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSingleSignOnResourceListResponse.cs index 8e3e182df560..6eb22f39b289 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSingleSignOnResourceListResponse.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSingleSignOnResourceListResponse.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Datadog.Models { @@ -46,25 +47,34 @@ internal partial class DatadogSingleSignOnResourceListResponse private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal DatadogSingleSignOnResourceListResponse() + /// The DatadogSingleSignOnResource items on this page. + /// is null. + internal DatadogSingleSignOnResourceListResponse(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// Results of a list operation. - /// Link to the next set of results, if any. + /// The DatadogSingleSignOnResource items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal DatadogSingleSignOnResourceListResponse(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal DatadogSingleSignOnResourceListResponse(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Results of a list operation. - public IReadOnlyList Value { get; } - /// Link to the next set of results, if any. - public string NextLink { get; } + /// Initializes a new instance of for deserialization. + internal DatadogSingleSignOnResourceListResponse() + { + } + + /// The DatadogSingleSignOnResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSingleSignOnState.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSingleSignOnState.cs new file mode 100644 index 000000000000..bc7dc95ba640 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSingleSignOnState.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Datadog.Models +{ + /// Various states of the SSO resource. + public readonly partial struct DatadogSingleSignOnState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DatadogSingleSignOnState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InitialValue = "Initial"; + private const string EnableValue = "Enable"; + private const string DisableValue = "Disable"; + private const string ExistingValue = "Existing"; + + /// Initial. + public static DatadogSingleSignOnState Initial { get; } = new DatadogSingleSignOnState(InitialValue); + /// Enable. + public static DatadogSingleSignOnState Enable { get; } = new DatadogSingleSignOnState(EnableValue); + /// Disable. + public static DatadogSingleSignOnState Disable { get; } = new DatadogSingleSignOnState(DisableValue); + /// Existing. + public static DatadogSingleSignOnState Existing { get; } = new DatadogSingleSignOnState(ExistingValue); + /// Determines if two values are the same. + public static bool operator ==(DatadogSingleSignOnState left, DatadogSingleSignOnState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DatadogSingleSignOnState left, DatadogSingleSignOnState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DatadogSingleSignOnState(string value) => new DatadogSingleSignOnState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DatadogSingleSignOnState other && Equals(other); + /// + public bool Equals(DatadogSingleSignOnState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/ResourceSku.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSku.Serialization.cs similarity index 67% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/ResourceSku.Serialization.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSku.Serialization.cs index 04f2a36ac3e1..234e6e578ece 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/ResourceSku.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSku.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.Datadog.Models { - internal partial class ResourceSku : IUtf8JsonSerializable, IJsonModel + internal partial class DatadogSku : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ResourceSku)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(DatadogSku)} does not support writing '{format}' format."); } writer.WritePropertyName("name"u8); @@ -53,19 +53,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - ResourceSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DatadogSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ResourceSku)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(DatadogSku)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeResourceSku(document.RootElement, options); + return DeserializeDatadogSku(document.RootElement, options); } - internal static ResourceSku DeserializeResourceSku(JsonElement element, ModelReaderWriterOptions options = null) + internal static DatadogSku DeserializeDatadogSku(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -89,38 +89,38 @@ internal static ResourceSku DeserializeResourceSku(JsonElement element, ModelRea } } serializedAdditionalRawData = rawDataDictionary; - return new ResourceSku(name, serializedAdditionalRawData); + return new DatadogSku(name, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); default: - throw new FormatException($"The model {nameof(ResourceSku)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogSku)} does not support writing '{options.Format}' format."); } } - ResourceSku IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DatadogSku IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeResourceSku(document.RootElement, options); + return DeserializeDatadogSku(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ResourceSku)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogSku)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/ResourceSku.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSku.cs similarity index 69% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/ResourceSku.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSku.cs index 90e7a9f06b17..e59ca5c30e0c 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/ResourceSku.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSku.cs @@ -10,8 +10,8 @@ namespace Azure.ResourceManager.Datadog.Models { - /// The ResourceSku. - internal partial class ResourceSku + /// The DatadogSku. + internal partial class DatadogSku { /// /// Keeps track of any properties unknown to the library. @@ -45,31 +45,31 @@ internal partial class ResourceSku /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// Name of the SKU. + /// Initializes a new instance of . + /// Name of the SKU in {PlanId} format. For Terraform, the only allowed value is 'Linked'. /// is null. - public ResourceSku(string name) + public DatadogSku(string name) { Argument.AssertNotNull(name, nameof(name)); Name = name; } - /// Initializes a new instance of . - /// Name of the SKU. + /// Initializes a new instance of . + /// Name of the SKU in {PlanId} format. For Terraform, the only allowed value is 'Linked'. /// Keeps track of any properties unknown to the library. - internal ResourceSku(string name, IDictionary serializedAdditionalRawData) + internal DatadogSku(string name, IDictionary serializedAdditionalRawData) { Name = name; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal ResourceSku() + /// Initializes a new instance of for deserialization. + internal DatadogSku() { } - /// Name of the SKU. + /// Name of the SKU in {PlanId} format. For Terraform, the only allowed value is 'Linked'. public string Name { get; set; } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSubscriptionProperties.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSubscriptionProperties.Serialization.cs new file mode 100644 index 000000000000..8d43f3f15f0a --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSubscriptionProperties.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Datadog.Models +{ + public partial class DatadogSubscriptionProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatadogSubscriptionProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Operation)) + { + writer.WritePropertyName("operation"u8); + writer.WriteStringValue(Operation.Value.ToString()); + } + if (Optional.IsCollectionDefined(MonitoredSubscriptionList)) + { + writer.WritePropertyName("monitoredSubscriptionList"u8); + writer.WriteStartArray(); + foreach (var item in MonitoredSubscriptionList) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DatadogSubscriptionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatadogSubscriptionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatadogSubscriptionProperties(document.RootElement, options); + } + + internal static DatadogSubscriptionProperties DeserializeDatadogSubscriptionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DatadogOperation? operation = default; + IList monitoredSubscriptionList = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("operation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + operation = new DatadogOperation(property.Value.GetString()); + continue; + } + if (property.NameEquals("monitoredSubscriptionList"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DatadogMonitoredSubscriptionItem.DeserializeDatadogMonitoredSubscriptionItem(item, options)); + } + monitoredSubscriptionList = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatadogSubscriptionProperties(operation, monitoredSubscriptionList ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); + default: + throw new FormatException($"The model {nameof(DatadogSubscriptionProperties)} does not support writing '{options.Format}' format."); + } + } + + DatadogSubscriptionProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDatadogSubscriptionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatadogSubscriptionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSubscriptionProperties.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSubscriptionProperties.cs new file mode 100644 index 000000000000..e02f97e69c59 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSubscriptionProperties.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Datadog.Models +{ + /// The request to update subscriptions needed to be monitored by the Datadog monitor resource. + public partial class DatadogSubscriptionProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DatadogSubscriptionProperties() + { + MonitoredSubscriptionList = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The operation for the patch on the resource. + /// List of subscriptions and the state of the monitoring. + /// Keeps track of any properties unknown to the library. + internal DatadogSubscriptionProperties(DatadogOperation? operation, IList monitoredSubscriptionList, IDictionary serializedAdditionalRawData) + { + Operation = operation; + MonitoredSubscriptionList = monitoredSubscriptionList; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The operation for the patch on the resource. + public DatadogOperation? Operation { get; set; } + /// List of subscriptions and the state of the monitoring. + public IList MonitoredSubscriptionList { get; } + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSubscriptionStatusProperties.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSubscriptionStatusProperties.Serialization.cs new file mode 100644 index 000000000000..571ff57c18e2 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSubscriptionStatusProperties.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Datadog.Models +{ + public partial class DatadogSubscriptionStatusProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatadogSubscriptionStatusProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && Optional.IsDefined(IsCreationSupported)) + { + writer.WritePropertyName("creationSupported"u8); + writer.WriteBooleanValue(IsCreationSupported.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DatadogSubscriptionStatusProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatadogSubscriptionStatusProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatadogSubscriptionStatusProperties(document.RootElement, options); + } + + internal static DatadogSubscriptionStatusProperties DeserializeDatadogSubscriptionStatusProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + bool? creationSupported = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("creationSupported"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + creationSupported = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatadogSubscriptionStatusProperties(name, creationSupported, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); + default: + throw new FormatException($"The model {nameof(DatadogSubscriptionStatusProperties)} does not support writing '{options.Format}' format."); + } + } + + DatadogSubscriptionStatusProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDatadogSubscriptionStatusProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatadogSubscriptionStatusProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSubscriptionStatusProperties.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSubscriptionStatusProperties.cs new file mode 100644 index 000000000000..f7be92ee7002 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSubscriptionStatusProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Datadog.Models +{ + /// Datadog resource can be created or not properties. + public partial class DatadogSubscriptionStatusProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DatadogSubscriptionStatusProperties() + { + } + + /// Initializes a new instance of . + /// The ARM id of the subscription. + /// Indicates if selected subscription supports Datadog resource creation, if not it is already being monitored for the selected organization via multi subscription feature. + /// Keeps track of any properties unknown to the library. + internal DatadogSubscriptionStatusProperties(string name, bool? isCreationSupported, IDictionary serializedAdditionalRawData) + { + Name = name; + IsCreationSupported = isCreationSupported; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The ARM id of the subscription. + public string Name { get; } + /// Indicates if selected subscription supports Datadog resource creation, if not it is already being monitored for the selected organization via multi subscription feature. + public bool? IsCreationSupported { get; } + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitorUpdateProperties.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSubscriptionStatusResult.Serialization.cs similarity index 57% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitorUpdateProperties.Serialization.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSubscriptionStatusResult.Serialization.cs index 784d4b2790a5..1b323603c7ce 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitorUpdateProperties.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSubscriptionStatusResult.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.Datadog.Models { - internal partial class MonitorUpdateProperties : IUtf8JsonSerializable, IJsonModel + public partial class DatadogSubscriptionStatusResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,16 +28,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(MonitorUpdateProperties)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(DatadogSubscriptionStatusResult)} does not support writing '{format}' format."); } - if (Optional.IsDefined(MonitoringStatus)) + if (Optional.IsDefined(Properties)) { - writer.WritePropertyName("monitoringStatus"u8); - writer.WriteStringValue(MonitoringStatus.Value.ToString()); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -56,19 +56,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - MonitorUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DatadogSubscriptionStatusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(MonitorUpdateProperties)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(DatadogSubscriptionStatusResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMonitorUpdateProperties(document.RootElement, options); + return DeserializeDatadogSubscriptionStatusResult(document.RootElement, options); } - internal static MonitorUpdateProperties DeserializeMonitorUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + internal static DatadogSubscriptionStatusResult DeserializeDatadogSubscriptionStatusResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -76,18 +76,18 @@ internal static MonitorUpdateProperties DeserializeMonitorUpdateProperties(JsonE { return null; } - MonitoringStatus? monitoringStatus = default; + DatadogSubscriptionStatusProperties properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("monitoringStatus"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - monitoringStatus = new MonitoringStatus(property.Value.GetString()); + properties = DatadogSubscriptionStatusProperties.DeserializeDatadogSubscriptionStatusProperties(property.Value, options); continue; } if (options.Format != "W") @@ -96,38 +96,38 @@ internal static MonitorUpdateProperties DeserializeMonitorUpdateProperties(JsonE } } serializedAdditionalRawData = rawDataDictionary; - return new MonitorUpdateProperties(monitoringStatus, serializedAdditionalRawData); + return new DatadogSubscriptionStatusResult(properties, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); default: - throw new FormatException($"The model {nameof(MonitorUpdateProperties)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogSubscriptionStatusResult)} does not support writing '{options.Format}' format."); } } - MonitorUpdateProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DatadogSubscriptionStatusResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMonitorUpdateProperties(document.RootElement, options); + return DeserializeDatadogSubscriptionStatusResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(MonitorUpdateProperties)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogSubscriptionStatusResult)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitorUpdateProperties.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSubscriptionStatusResult.cs similarity index 67% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitorUpdateProperties.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSubscriptionStatusResult.cs index 054c8335a0ba..1abe0d9fb8af 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitorUpdateProperties.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogSubscriptionStatusResult.cs @@ -10,8 +10,8 @@ namespace Azure.ResourceManager.Datadog.Models { - /// The set of properties that can be update in a PATCH request to a monitor resource. - internal partial class MonitorUpdateProperties + /// Datadog resource can be created or not. + public partial class DatadogSubscriptionStatusResult { /// /// Keeps track of any properties unknown to the library. @@ -45,21 +45,21 @@ internal partial class MonitorUpdateProperties /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public MonitorUpdateProperties() + /// Initializes a new instance of . + internal DatadogSubscriptionStatusResult() { } - /// Initializes a new instance of . - /// Flag specifying if the resource monitoring is enabled or disabled. + /// Initializes a new instance of . + /// Represents the properties of the resource. /// Keeps track of any properties unknown to the library. - internal MonitorUpdateProperties(MonitoringStatus? monitoringStatus, IDictionary serializedAdditionalRawData) + internal DatadogSubscriptionStatusResult(DatadogSubscriptionStatusProperties properties, IDictionary serializedAdditionalRawData) { - MonitoringStatus = monitoringStatus; + Properties = properties; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Flag specifying if the resource monitoring is enabled or disabled. - public MonitoringStatus? MonitoringStatus { get; set; } + /// Represents the properties of the resource. + public DatadogSubscriptionStatusProperties Properties { get; } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/UserInfo.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogUserInfo.Serialization.cs similarity index 70% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/UserInfo.Serialization.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogUserInfo.Serialization.cs index 6e6ae7466e40..fdaa1ccf0fff 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/UserInfo.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogUserInfo.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.Datadog.Models { - public partial class UserInfo : IUtf8JsonSerializable, IJsonModel + public partial class DatadogUserInfo : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(UserInfo)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(DatadogUserInfo)} does not support writing '{format}' format."); } if (Optional.IsDefined(Name)) @@ -66,19 +66,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - UserInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + DatadogUserInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(UserInfo)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(DatadogUserInfo)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeUserInfo(document.RootElement, options); + return DeserializeDatadogUserInfo(document.RootElement, options); } - internal static UserInfo DeserializeUserInfo(JsonElement element, ModelReaderWriterOptions options = null) + internal static DatadogUserInfo DeserializeDatadogUserInfo(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -114,38 +114,38 @@ internal static UserInfo DeserializeUserInfo(JsonElement element, ModelReaderWri } } serializedAdditionalRawData = rawDataDictionary; - return new UserInfo(name, emailAddress, phoneNumber, serializedAdditionalRawData); + return new DatadogUserInfo(name, emailAddress, phoneNumber, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); default: - throw new FormatException($"The model {nameof(UserInfo)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogUserInfo)} does not support writing '{options.Format}' format."); } } - UserInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + DatadogUserInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUserInfo(document.RootElement, options); + return DeserializeDatadogUserInfo(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(UserInfo)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DatadogUserInfo)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/UserInfo.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogUserInfo.cs similarity index 83% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/UserInfo.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogUserInfo.cs index 7132b36b2fda..1878ab6ea4bb 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/UserInfo.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/DatadogUserInfo.cs @@ -10,8 +10,8 @@ namespace Azure.ResourceManager.Datadog.Models { - /// User info. - public partial class UserInfo + /// Includes name, email and optionally, phone number. User Information can't be null. + public partial class DatadogUserInfo { /// /// Keeps track of any properties unknown to the library. @@ -45,17 +45,17 @@ public partial class UserInfo /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public UserInfo() + /// Initializes a new instance of . + public DatadogUserInfo() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// 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. /// Keeps track of any properties unknown to the library. - internal UserInfo(string name, string emailAddress, string phoneNumber, IDictionary serializedAdditionalRawData) + internal DatadogUserInfo(string name, string emailAddress, string phoneNumber, IDictionary serializedAdditionalRawData) { Name = name; EmailAddress = emailAddress; diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/LiftrResourceCategory.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/LiftrResourceCategory.cs deleted file mode 100644 index 789f50f2e975..000000000000 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/LiftrResourceCategory.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.Datadog.Models -{ - /// The LiftrResourceCategory. - public readonly partial struct LiftrResourceCategory : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public LiftrResourceCategory(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UnknownValue = "Unknown"; - private const string MonitorLogsValue = "MonitorLogs"; - - /// Unknown. - public static LiftrResourceCategory Unknown { get; } = new LiftrResourceCategory(UnknownValue); - /// MonitorLogs. - public static LiftrResourceCategory MonitorLogs { get; } = new LiftrResourceCategory(MonitorLogsValue); - /// Determines if two values are the same. - public static bool operator ==(LiftrResourceCategory left, LiftrResourceCategory right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(LiftrResourceCategory left, LiftrResourceCategory right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator LiftrResourceCategory(string value) => new LiftrResourceCategory(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is LiftrResourceCategory other && Equals(other); - /// - public bool Equals(LiftrResourceCategory other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/LinkedResourceListResponse.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/LinkedResourceListResponse.Serialization.cs index a0b93b29c316..3fafab13746d 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/LinkedResourceListResponse.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/LinkedResourceListResponse.Serialization.cs @@ -8,10 +8,8 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; -using System.Text; using System.Text.Json; using Azure.Core; -using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Datadog.Models { @@ -36,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(LinkedResourceListResponse)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - ((IJsonModel)item).Write(writer, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -88,29 +83,29 @@ internal static LinkedResourceListResponse DeserializeLinkedResourceListResponse { return null; } - IReadOnlyList value = default; - string nextLink = default; + IReadOnlyList value = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(item.GetRawText())), options, AzureResourceManagerDatadogContext.Default)); + array.Add(DatadogLinkedResourceResult.DeserializeDatadogLinkedResourceResult(item, options)); } value = array; continue; } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -119,7 +114,7 @@ internal static LinkedResourceListResponse DeserializeLinkedResourceListResponse } } serializedAdditionalRawData = rawDataDictionary; - return new LinkedResourceListResponse(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new LinkedResourceListResponse(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/LinkedResourceListResponse.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/LinkedResourceListResponse.cs index 4d407bebdd50..63c5e66643f0 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/LinkedResourceListResponse.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/LinkedResourceListResponse.cs @@ -7,7 +7,7 @@ using System; using System.Collections.Generic; -using Azure.ResourceManager.Resources.Models; +using System.Linq; namespace Azure.ResourceManager.Datadog.Models { @@ -47,25 +47,34 @@ internal partial class LinkedResourceListResponse private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal LinkedResourceListResponse() + /// The LinkedResource items on this page. + /// is null. + internal LinkedResourceListResponse(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// Results of a list operation. - /// Link to the next set of results, if any. + /// The LinkedResource items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal LinkedResourceListResponse(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal LinkedResourceListResponse(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Results of a list operation. - public IReadOnlyList Value { get; } - /// Link to the next set of results, if any. - public string NextLink { get; } + /// Initializes a new instance of for deserialization. + internal LinkedResourceListResponse() + { + } + + /// The LinkedResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MarketplaceSaaSInfo.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MarketplaceSaaSInfo.Serialization.cs new file mode 100644 index 000000000000..194ebea8a868 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MarketplaceSaaSInfo.Serialization.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Datadog.Models +{ + public partial class MarketplaceSaaSInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MarketplaceSaaSInfo)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(MarketplaceSubscriptionId)) + { + writer.WritePropertyName("marketplaceSubscriptionId"u8); + writer.WriteStringValue(MarketplaceSubscriptionId); + } + if (Optional.IsDefined(MarketplaceName)) + { + writer.WritePropertyName("marketplaceName"u8); + writer.WriteStringValue(MarketplaceName); + } + if (Optional.IsDefined(MarketplaceStatus)) + { + writer.WritePropertyName("marketplaceStatus"u8); + writer.WriteStringValue(MarketplaceStatus); + } + if (Optional.IsDefined(BilledAzureSubscriptionId)) + { + writer.WritePropertyName("billedAzureSubscriptionId"u8); + writer.WriteStringValue(BilledAzureSubscriptionId); + } + if (Optional.IsDefined(IsSubscribed)) + { + writer.WritePropertyName("subscribed"u8); + writer.WriteBooleanValue(IsSubscribed.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MarketplaceSaaSInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MarketplaceSaaSInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMarketplaceSaaSInfo(document.RootElement, options); + } + + internal static MarketplaceSaaSInfo DeserializeMarketplaceSaaSInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string marketplaceSubscriptionId = default; + string marketplaceName = default; + string marketplaceStatus = default; + string billedAzureSubscriptionId = default; + bool? subscribed = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("marketplaceSubscriptionId"u8)) + { + marketplaceSubscriptionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("marketplaceName"u8)) + { + marketplaceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("marketplaceStatus"u8)) + { + marketplaceStatus = property.Value.GetString(); + continue; + } + if (property.NameEquals("billedAzureSubscriptionId"u8)) + { + billedAzureSubscriptionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("subscribed"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subscribed = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MarketplaceSaaSInfo( + marketplaceSubscriptionId, + marketplaceName, + marketplaceStatus, + billedAzureSubscriptionId, + subscribed, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); + default: + throw new FormatException($"The model {nameof(MarketplaceSaaSInfo)} does not support writing '{options.Format}' format."); + } + } + + MarketplaceSaaSInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMarketplaceSaaSInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MarketplaceSaaSInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MarketplaceSaaSInfo.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MarketplaceSaaSInfo.cs new file mode 100644 index 000000000000..0124b7d6d0ef --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MarketplaceSaaSInfo.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Datadog.Models +{ + /// Marketplace SAAS Info of the resource. + public partial class MarketplaceSaaSInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal MarketplaceSaaSInfo() + { + } + + /// Initializes a new instance of . + /// Marketplace Subscription Id. This is a GUID-formatted string. + /// Marketplace Subscription Details: SAAS Name. + /// Marketplace Subscription Details: SaaS Subscription Status. + /// The Azure Subscription ID to which the Marketplace Subscription belongs and gets billed into. + /// Flag specifying if the Marketplace status is subscribed or not. + /// Keeps track of any properties unknown to the library. + internal MarketplaceSaaSInfo(string marketplaceSubscriptionId, string marketplaceName, string marketplaceStatus, string billedAzureSubscriptionId, bool? isSubscribed, IDictionary serializedAdditionalRawData) + { + MarketplaceSubscriptionId = marketplaceSubscriptionId; + MarketplaceName = marketplaceName; + MarketplaceStatus = marketplaceStatus; + BilledAzureSubscriptionId = billedAzureSubscriptionId; + IsSubscribed = isSubscribed; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Marketplace Subscription Id. This is a GUID-formatted string. + public string MarketplaceSubscriptionId { get; } + /// Marketplace Subscription Details: SAAS Name. + public string MarketplaceName { get; } + /// Marketplace Subscription Details: SaaS Subscription Status. + public string MarketplaceStatus { get; } + /// The Azure Subscription ID to which the Marketplace Subscription belongs and gets billed into. + public string BilledAzureSubscriptionId { get; } + /// Flag specifying if the Marketplace status is subscribed or not. + public bool? IsSubscribed { get; } + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoredResourceListResponse.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoredResourceListResponse.Serialization.cs index c5b057b7f369..760f569d8c6a 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoredResourceListResponse.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoredResourceListResponse.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MonitoredResourceListResponse)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -86,29 +83,29 @@ internal static MonitoredResourceListResponse DeserializeMonitoredResourceListRe { return null; } - IReadOnlyList value = default; - string nextLink = default; + IReadOnlyList value = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MonitoredResourceContent.DeserializeMonitoredResourceContent(item, options)); + array.Add(DatadogMonitoredResourceResult.DeserializeDatadogMonitoredResourceResult(item, options)); } value = array; continue; } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static MonitoredResourceListResponse DeserializeMonitoredResourceListRe } } serializedAdditionalRawData = rawDataDictionary; - return new MonitoredResourceListResponse(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new MonitoredResourceListResponse(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoredResourceListResponse.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoredResourceListResponse.cs index 0f5c53205a96..3e324129050e 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoredResourceListResponse.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoredResourceListResponse.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Datadog.Models { @@ -46,25 +47,34 @@ internal partial class MonitoredResourceListResponse private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal MonitoredResourceListResponse() + /// The MonitoredResource items on this page. + /// is null. + internal MonitoredResourceListResponse(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// Results of a list operation. - /// Link to the next set of results, if any. + /// The MonitoredResource items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal MonitoredResourceListResponse(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal MonitoredResourceListResponse(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Results of a list operation. - public IReadOnlyList Value { get; } - /// Link to the next set of results, if any. - public string NextLink { get; } + /// Initializes a new instance of for deserialization. + internal MonitoredResourceListResponse() + { + } + + /// The MonitoredResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoredSubscriptionPropertiesList.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoredSubscriptionPropertiesList.Serialization.cs new file mode 100644 index 000000000000..83d1877e9739 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoredSubscriptionPropertiesList.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Datadog.Models +{ + internal partial class MonitoredSubscriptionPropertiesList : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MonitoredSubscriptionPropertiesList)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MonitoredSubscriptionPropertiesList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MonitoredSubscriptionPropertiesList)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMonitoredSubscriptionPropertiesList(document.RootElement, options); + } + + internal static MonitoredSubscriptionPropertiesList DeserializeMonitoredSubscriptionPropertiesList(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DatadogMonitoredSubscriptionData.DeserializeDatadogMonitoredSubscriptionData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MonitoredSubscriptionPropertiesList(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); + default: + throw new FormatException($"The model {nameof(MonitoredSubscriptionPropertiesList)} does not support writing '{options.Format}' format."); + } + } + + MonitoredSubscriptionPropertiesList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMonitoredSubscriptionPropertiesList(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MonitoredSubscriptionPropertiesList)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoredSubscriptionPropertiesList.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoredSubscriptionPropertiesList.cs new file mode 100644 index 000000000000..b94b309a3d74 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoredSubscriptionPropertiesList.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.Datadog.Models +{ + /// Paged collection of MonitoredSubscriptionProperties items. + internal partial class MonitoredSubscriptionPropertiesList + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The MonitoredSubscriptionProperties items on this page. + /// is null. + internal MonitoredSubscriptionPropertiesList(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The MonitoredSubscriptionProperties items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal MonitoredSubscriptionPropertiesList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal MonitoredSubscriptionPropertiesList() + { + } + + /// The MonitoredSubscriptionProperties items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringStatus.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringStatus.cs deleted file mode 100644 index dedab46e857d..000000000000 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringStatus.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.Datadog.Models -{ - /// Flag specifying if the resource monitoring is enabled or disabled. - public readonly partial struct MonitoringStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public MonitoringStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string EnabledValue = "Enabled"; - private const string DisabledValue = "Disabled"; - - /// Enabled. - public static MonitoringStatus Enabled { get; } = new MonitoringStatus(EnabledValue); - /// Disabled. - public static MonitoringStatus Disabled { get; } = new MonitoringStatus(DisabledValue); - /// Determines if two values are the same. - public static bool operator ==(MonitoringStatus left, MonitoringStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MonitoringStatus left, MonitoringStatus right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator MonitoringStatus(string value) => new MonitoringStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MonitoringStatus other && Equals(other); - /// - public bool Equals(MonitoringStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringTagRuleProperties.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringTagRuleProperties.Serialization.cs new file mode 100644 index 000000000000..f76561fed76d --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringTagRuleProperties.Serialization.cs @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Datadog.Models +{ + public partial class MonitoringTagRuleProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MonitoringTagRuleProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(LogRules)) + { + writer.WritePropertyName("logRules"u8); + writer.WriteObjectValue(LogRules, options); + } + if (Optional.IsDefined(MetricRules)) + { + writer.WritePropertyName("metricRules"u8); + writer.WriteObjectValue(MetricRules, options); + } + if (Optional.IsDefined(AgentRules)) + { + writer.WritePropertyName("agentRules"u8); + writer.WriteObjectValue(AgentRules, options); + } + if (Optional.IsDefined(IsAutomutingEnabled)) + { + writer.WritePropertyName("automuting"u8); + writer.WriteBooleanValue(IsAutomutingEnabled.Value); + } + if (Optional.IsDefined(IsCustomMetricsEnabled)) + { + writer.WritePropertyName("customMetrics"u8); + writer.WriteBooleanValue(IsCustomMetricsEnabled.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MonitoringTagRuleProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MonitoringTagRuleProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMonitoringTagRuleProperties(document.RootElement, options); + } + + internal static MonitoringTagRuleProperties DeserializeMonitoringTagRuleProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DatadogProvisioningState? provisioningState = default; + DatadogMonitorLogRules logRules = default; + DatadogMonitorMetricRules metricRules = default; + DatadogMonitorAgentRules agentRules = default; + bool? automuting = default; + bool? customMetrics = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DatadogProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("logRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + logRules = DatadogMonitorLogRules.DeserializeDatadogMonitorLogRules(property.Value, options); + continue; + } + if (property.NameEquals("metricRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + metricRules = DatadogMonitorMetricRules.DeserializeDatadogMonitorMetricRules(property.Value, options); + continue; + } + if (property.NameEquals("agentRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + agentRules = DatadogMonitorAgentRules.DeserializeDatadogMonitorAgentRules(property.Value, options); + continue; + } + if (property.NameEquals("automuting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + automuting = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("customMetrics"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customMetrics = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MonitoringTagRuleProperties( + provisioningState, + logRules, + metricRules, + agentRules, + automuting, + customMetrics, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); + default: + throw new FormatException($"The model {nameof(MonitoringTagRuleProperties)} does not support writing '{options.Format}' format."); + } + } + + MonitoringTagRuleProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMonitoringTagRuleProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MonitoringTagRuleProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringTagRulesProperties.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringTagRuleProperties.cs similarity index 64% rename from sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringTagRulesProperties.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringTagRuleProperties.cs index 81d7c5749048..3164cc86c51c 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringTagRulesProperties.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringTagRuleProperties.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.Datadog.Models { /// Definition of the properties for a TagRules resource. - public partial class MonitoringTagRulesProperties + public partial class MonitoringTagRuleProperties { /// /// Keeps track of any properties unknown to the library. @@ -45,39 +45,52 @@ public partial class MonitoringTagRulesProperties /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public MonitoringTagRulesProperties() + /// Initializes a new instance of . + public MonitoringTagRuleProperties() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// /// Set of rules for sending logs for the Monitor resource. /// Set of rules for sending metrics for the Monitor resource. + /// Set of rules for managing agents for the Monitor resource. + /// Configuration to enable/disable auto-muting flag. + /// Configuration to enable/disable custom metrics. If enabled, custom metrics from app insights will be sent. /// Keeps track of any properties unknown to the library. - internal MonitoringTagRulesProperties(ProvisioningState? provisioningState, LogRules logRules, MetricRules metricRules, IDictionary serializedAdditionalRawData) + internal MonitoringTagRuleProperties(DatadogProvisioningState? provisioningState, DatadogMonitorLogRules logRules, DatadogMonitorMetricRules metricRules, DatadogMonitorAgentRules agentRules, bool? isAutomutingEnabled, bool? isCustomMetricsEnabled, IDictionary serializedAdditionalRawData) { ProvisioningState = provisioningState; LogRules = logRules; MetricRules = metricRules; + AgentRules = agentRules; + IsAutomutingEnabled = isAutomutingEnabled; + IsCustomMetricsEnabled = isCustomMetricsEnabled; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Gets the provisioning state. - public ProvisioningState? ProvisioningState { get; } + public DatadogProvisioningState? ProvisioningState { get; } /// Set of rules for sending logs for the Monitor resource. - public LogRules LogRules { get; set; } + public DatadogMonitorLogRules LogRules { get; set; } /// Set of rules for sending metrics for the Monitor resource. - internal MetricRules MetricRules { get; set; } + internal DatadogMonitorMetricRules MetricRules { get; set; } /// 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 IList MetricRulesFilteringTags + public IList MetricRulesFilteringTags { get { if (MetricRules is null) - MetricRules = new MetricRules(); + MetricRules = new DatadogMonitorMetricRules(); return MetricRules.FilteringTags; } } + + /// Set of rules for managing agents for the Monitor resource. + public DatadogMonitorAgentRules AgentRules { get; set; } + /// Configuration to enable/disable auto-muting flag. + public bool? IsAutomutingEnabled { get; set; } + /// Configuration to enable/disable custom metrics. If enabled, custom metrics from app insights will be sent. + public bool? IsCustomMetricsEnabled { get; set; } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringTagRulesListResponse.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringTagRulesListResponse.Serialization.cs index e0ab8eb13872..5c111e516d0d 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringTagRulesListResponse.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringTagRulesListResponse.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MonitoringTagRulesListResponse)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -86,29 +83,29 @@ internal static MonitoringTagRulesListResponse DeserializeMonitoringTagRulesList { return null; } - IReadOnlyList value = default; - string nextLink = default; + IReadOnlyList value = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(MonitoringTagRuleData.DeserializeMonitoringTagRuleData(item, options)); + array.Add(DataMonitoringTagRuleData.DeserializeDataMonitoringTagRuleData(item, options)); } value = array; continue; } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static MonitoringTagRulesListResponse DeserializeMonitoringTagRulesList } } serializedAdditionalRawData = rawDataDictionary; - return new MonitoringTagRulesListResponse(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new MonitoringTagRulesListResponse(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringTagRulesListResponse.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringTagRulesListResponse.cs index 993e4c3fb014..89afa426c079 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringTagRulesListResponse.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/MonitoringTagRulesListResponse.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.Datadog.Models { @@ -46,25 +47,34 @@ internal partial class MonitoringTagRulesListResponse private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal MonitoringTagRulesListResponse() + /// The MonitoringTagRules items on this page. + /// is null. + internal MonitoringTagRulesListResponse(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// Results of a list operation. - /// Link to the next set of results, if any. + /// The MonitoringTagRules items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal MonitoringTagRulesListResponse(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal MonitoringTagRulesListResponse(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Results of a list operation. - public IReadOnlyList Value { get; } - /// Link to the next set of results, if any. - public string NextLink { get; } + /// Initializes a new instance of for deserialization. + internal MonitoringTagRulesListResponse() + { + } + + /// The MonitoringTagRules items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/PartnerBillingEntity.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/PartnerBillingEntity.Serialization.cs new file mode 100644 index 000000000000..a2c0a50ad0ce --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/PartnerBillingEntity.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Datadog.Models +{ + public partial class PartnerBillingEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerBillingEntity)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(PartnerEntityUri)) + { + writer.WritePropertyName("partnerEntityUri"u8); + writer.WriteStringValue(PartnerEntityUri.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PartnerBillingEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerBillingEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePartnerBillingEntity(document.RootElement, options); + } + + internal static PartnerBillingEntity DeserializePartnerBillingEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string name = default; + Uri partnerEntityUri = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("partnerEntityUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + partnerEntityUri = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PartnerBillingEntity(id, name, partnerEntityUri, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); + default: + throw new FormatException($"The model {nameof(PartnerBillingEntity)} does not support writing '{options.Format}' format."); + } + } + + PartnerBillingEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePartnerBillingEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PartnerBillingEntity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/PartnerBillingEntity.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/PartnerBillingEntity.cs new file mode 100644 index 000000000000..9d217d91f1f2 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/PartnerBillingEntity.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Datadog.Models +{ + /// Partner Billing details associated with the resource. + public partial class PartnerBillingEntity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal PartnerBillingEntity() + { + } + + /// Initializes a new instance of . + /// The Datadog Organization Id. + /// The Datadog Organization Name. + /// Link to the datadog organization page. + /// Keeps track of any properties unknown to the library. + internal PartnerBillingEntity(string id, string name, Uri partnerEntityUri, IDictionary serializedAdditionalRawData) + { + Id = id; + Name = name; + PartnerEntityUri = partnerEntityUri; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The Datadog Organization Id. + public string Id { get; } + /// The Datadog Organization Name. + public string Name { get; } + /// Link to the datadog organization page. + public Uri PartnerEntityUri { get; } + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/ProvisioningState.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/ProvisioningState.cs deleted file mode 100644 index e4d4ce61c78d..000000000000 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/ProvisioningState.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.Datadog.Models -{ - /// The ProvisioningState. - public readonly partial struct ProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AcceptedValue = "Accepted"; - private const string CreatingValue = "Creating"; - private const string UpdatingValue = "Updating"; - private const string DeletingValue = "Deleting"; - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - private const string CanceledValue = "Canceled"; - private const string DeletedValue = "Deleted"; - private const string NotSpecifiedValue = "NotSpecified"; - - /// Accepted. - public static ProvisioningState Accepted { get; } = new ProvisioningState(AcceptedValue); - /// Creating. - public static ProvisioningState Creating { get; } = new ProvisioningState(CreatingValue); - /// Updating. - public static ProvisioningState Updating { get; } = new ProvisioningState(UpdatingValue); - /// Deleting. - public static ProvisioningState Deleting { get; } = new ProvisioningState(DeletingValue); - /// Succeeded. - public static ProvisioningState Succeeded { get; } = new ProvisioningState(SucceededValue); - /// Failed. - public static ProvisioningState Failed { get; } = new ProvisioningState(FailedValue); - /// Canceled. - public static ProvisioningState Canceled { get; } = new ProvisioningState(CanceledValue); - /// Deleted. - public static ProvisioningState Deleted { get; } = new ProvisioningState(DeletedValue); - /// NotSpecified. - public static ProvisioningState NotSpecified { get; } = new ProvisioningState(NotSpecifiedValue); - /// Determines if two values are the same. - public static bool operator ==(ProvisioningState left, ProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ProvisioningState left, ProvisioningState right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ProvisioningState(string value) => new ProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ProvisioningState other && Equals(other); - /// - public bool Equals(ProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/ResubscribeOrganizationContent.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/ResubscribeOrganizationContent.Serialization.cs new file mode 100644 index 000000000000..dfcd8663a538 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/ResubscribeOrganizationContent.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Datadog.Models +{ + public partial class ResubscribeOrganizationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResubscribeOrganizationContent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } + if (Optional.IsDefined(AzureSubscriptionId)) + { + writer.WritePropertyName("azureSubscriptionId"u8); + writer.WriteStringValue(AzureSubscriptionId); + } + if (Optional.IsDefined(ResourceGroup)) + { + writer.WritePropertyName("resourceGroup"u8); + writer.WriteStringValue(ResourceGroup); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ResubscribeOrganizationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResubscribeOrganizationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResubscribeOrganizationContent(document.RootElement, options); + } + + internal static ResubscribeOrganizationContent DeserializeResubscribeOrganizationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DatadogSku sku = default; + string azureSubscriptionId = default; + string resourceGroup = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = DatadogSku.DeserializeDatadogSku(property.Value, options); + continue; + } + if (property.NameEquals("azureSubscriptionId"u8)) + { + azureSubscriptionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGroup"u8)) + { + resourceGroup = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResubscribeOrganizationContent(sku, azureSubscriptionId, resourceGroup, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerDatadogContext.Default); + default: + throw new FormatException($"The model {nameof(ResubscribeOrganizationContent)} does not support writing '{options.Format}' format."); + } + } + + ResubscribeOrganizationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeResubscribeOrganizationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResubscribeOrganizationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/ResubscribeOrganizationContent.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/ResubscribeOrganizationContent.cs new file mode 100644 index 000000000000..36b4bc24d196 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/ResubscribeOrganizationContent.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Datadog.Models +{ + /// Resubscribe Properties. + public partial class ResubscribeOrganizationContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ResubscribeOrganizationContent() + { + } + + /// Initializes a new instance of . + /// + /// Newly selected Azure Subscription Id in which the new Marketplace subscription will be created for Resubscribe. + /// Newly selected Azure resource group in which the new Marketplace subscription will be created for Resubscribe. + /// Keeps track of any properties unknown to the library. + internal ResubscribeOrganizationContent(DatadogSku sku, string azureSubscriptionId, string resourceGroup, IDictionary serializedAdditionalRawData) + { + Sku = sku; + AzureSubscriptionId = azureSubscriptionId; + ResourceGroup = resourceGroup; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the sku. + internal DatadogSku Sku { get; set; } + /// Name of the SKU in {PlanId} format. For Terraform, the only allowed value is 'Linked'. + public string SkuName + { + get => Sku is null ? default : Sku.Name; + set => Sku = new DatadogSku(value); + } + + /// Newly selected Azure Subscription Id in which the new Marketplace subscription will be created for Resubscribe. + public string AzureSubscriptionId { get; set; } + /// Newly selected Azure resource group in which the new Marketplace subscription will be created for Resubscribe. + public string ResourceGroup { get; set; } + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/SingleSignOnState.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/SingleSignOnState.cs deleted file mode 100644 index 3cbd2f14a6fd..000000000000 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/SingleSignOnState.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.Datadog.Models -{ - /// Various states of the SSO resource. - public readonly partial struct SingleSignOnState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SingleSignOnState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InitialValue = "Initial"; - private const string EnableValue = "Enable"; - private const string DisableValue = "Disable"; - private const string ExistingValue = "Existing"; - - /// Initial. - public static SingleSignOnState Initial { get; } = new SingleSignOnState(InitialValue); - /// Enable. - public static SingleSignOnState Enable { get; } = new SingleSignOnState(EnableValue); - /// Disable. - public static SingleSignOnState Disable { get; } = new SingleSignOnState(DisableValue); - /// Existing. - public static SingleSignOnState Existing { get; } = new SingleSignOnState(ExistingValue); - /// Determines if two values are the same. - public static bool operator ==(SingleSignOnState left, SingleSignOnState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SingleSignOnState left, SingleSignOnState right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator SingleSignOnState(string value) => new SingleSignOnState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SingleSignOnState other && Equals(other); - /// - public bool Equals(SingleSignOnState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/TagAction.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/TagAction.cs deleted file mode 100644 index e2a990030566..000000000000 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/Models/TagAction.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.Datadog.Models -{ - /// Valid actions for a filtering tag. Exclusion takes priority over inclusion. - public readonly partial struct TagAction : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public TagAction(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string IncludeValue = "Include"; - private const string ExcludeValue = "Exclude"; - - /// Include. - public static TagAction Include { get; } = new TagAction(IncludeValue); - /// Exclude. - public static TagAction Exclude { get; } = new TagAction(ExcludeValue); - /// Determines if two values are the same. - public static bool operator ==(TagAction left, TagAction right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(TagAction left, TagAction right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator TagAction(string value) => new TagAction(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is TagAction other && Equals(other); - /// - public bool Equals(TagAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/MonitoringTagRuleResource.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/MonitoringTagRuleResource.Serialization.cs deleted file mode 100644 index 0802fe4adb19..000000000000 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/MonitoringTagRuleResource.Serialization.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.Datadog -{ - public partial class MonitoringTagRuleResource : IJsonModel - { - private static MonitoringTagRuleData s_dataDeserializationInstance; - private static MonitoringTagRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - MonitoringTagRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDatadogContext.Default); - - MonitoringTagRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDatadogContext.Default); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); - } -} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/BillingInfoRestOperations.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/BillingInfoRestOperations.cs new file mode 100644 index 000000000000..157dc8cbb9e2 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/BillingInfoRestOperations.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Datadog.Models; + +namespace Azure.ResourceManager.Datadog +{ + internal partial class BillingInfoRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of BillingInfoRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public BillingInfoRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-06-11"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string monitorName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/getBillingInfo", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string monitorName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/getBillingInfo", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get marketplace and organization info mapped to the given monitor. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, monitorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DatadogBillingInfoResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DatadogBillingInfoResult.DeserializeDatadogBillingInfoResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get marketplace and organization info mapped to the given monitor. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, monitorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DatadogBillingInfoResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DatadogBillingInfoResult.DeserializeDatadogBillingInfoResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/CreationSupportedRestOperations.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/CreationSupportedRestOperations.cs new file mode 100644 index 000000000000..4815c26f815f --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/CreationSupportedRestOperations.cs @@ -0,0 +1,287 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Datadog.Models; + +namespace Azure.ResourceManager.Datadog +{ + internal partial class CreationSupportedRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of CreationSupportedRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public CreationSupportedRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-06-11"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string datadogOrganizationId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Datadog/subscriptionStatuses", false); + uri.AppendQuery("api-version", _apiVersion, true); + uri.AppendQuery("datadogOrganizationId", datadogOrganizationId, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string datadogOrganizationId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Datadog/subscriptionStatuses", false); + uri.AppendQuery("api-version", _apiVersion, true); + uri.AppendQuery("datadogOrganizationId", datadogOrganizationId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Informs if the current subscription is being already monitored for selected Datadog organization. + /// The ID of the target subscription. + /// Datadog Organization Id. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string datadogOrganizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(datadogOrganizationId, nameof(datadogOrganizationId)); + + using var message = CreateListRequest(subscriptionId, datadogOrganizationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CreateResourceSupportedResponseList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CreateResourceSupportedResponseList.DeserializeCreateResourceSupportedResponseList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Informs if the current subscription is being already monitored for selected Datadog organization. + /// The ID of the target subscription. + /// Datadog Organization Id. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string datadogOrganizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(datadogOrganizationId, nameof(datadogOrganizationId)); + + using var message = CreateListRequest(subscriptionId, datadogOrganizationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CreateResourceSupportedResponseList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CreateResourceSupportedResponseList.DeserializeCreateResourceSupportedResponseList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string datadogOrganizationId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Datadog/subscriptionStatuses/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + uri.AppendQuery("datadogOrganizationId", datadogOrganizationId, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string datadogOrganizationId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Datadog/subscriptionStatuses/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + uri.AppendQuery("datadogOrganizationId", datadogOrganizationId, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Informs if the current subscription is being already monitored for selected Datadog organization. + /// The ID of the target subscription. + /// Datadog Organization Id. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string datadogOrganizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(datadogOrganizationId, nameof(datadogOrganizationId)); + + using var message = CreateGetRequest(subscriptionId, datadogOrganizationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DatadogSubscriptionStatusResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DatadogSubscriptionStatusResult.DeserializeDatadogSubscriptionStatusResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Informs if the current subscription is being already monitored for selected Datadog organization. + /// The ID of the target subscription. + /// Datadog Organization Id. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string datadogOrganizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(datadogOrganizationId, nameof(datadogOrganizationId)); + + using var message = CreateGetRequest(subscriptionId, datadogOrganizationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DatadogSubscriptionStatusResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DatadogSubscriptionStatusResult.DeserializeDatadogSubscriptionStatusResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string datadogOrganizationId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string datadogOrganizationId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Informs if the current subscription is being already monitored for selected Datadog organization. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// Datadog Organization Id. + /// The cancellation token to use. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string datadogOrganizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(datadogOrganizationId, nameof(datadogOrganizationId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, datadogOrganizationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CreateResourceSupportedResponseList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CreateResourceSupportedResponseList.DeserializeCreateResourceSupportedResponseList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Informs if the current subscription is being already monitored for selected Datadog organization. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// Datadog Organization Id. + /// The cancellation token to use. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string datadogOrganizationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(datadogOrganizationId, nameof(datadogOrganizationId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, datadogOrganizationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CreateResourceSupportedResponseList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CreateResourceSupportedResponseList.DeserializeCreateResourceSupportedResponseList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/MarketplaceAgreementsRestOperations.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/MarketplaceAgreementsRestOperations.cs index 6cccd0d1de2f..109a9ef26b09 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/MarketplaceAgreementsRestOperations.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/MarketplaceAgreementsRestOperations.cs @@ -32,7 +32,7 @@ public MarketplaceAgreementsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-03-01"; + _apiVersion = apiVersion ?? "2025-06-11"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -114,7 +114,7 @@ public Response List(string subscriptionId } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, DatadogAgreementResourceProperties body) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, DatadogAgreement body) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -125,7 +125,7 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, DatadogAgreementResourceProperties body) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, DatadogAgreement body) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -151,11 +151,11 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, DatadogA /// Create Datadog marketplace agreement in the subscription. /// The ID of the target subscription. - /// The to use. + /// The request body. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, DatadogAgreementResourceProperties body = null, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string subscriptionId, DatadogAgreement body = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -165,9 +165,9 @@ public async Task> CreateOrUpdateAs { case 200: { - DatadogAgreementResourceProperties value = default; + DatadogAgreement value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DatadogAgreementResourceProperties.DeserializeDatadogAgreementResourceProperties(document.RootElement); + value = DatadogAgreement.DeserializeDatadogAgreement(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -177,11 +177,11 @@ public async Task> CreateOrUpdateAs /// Create Datadog marketplace agreement in the subscription. /// The ID of the target subscription. - /// The to use. + /// The request body. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, DatadogAgreementResourceProperties body = null, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, DatadogAgreement body = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -191,9 +191,9 @@ public Response CreateOrUpdate(string subscr { case 200: { - DatadogAgreementResourceProperties value = default; + DatadogAgreement value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DatadogAgreementResourceProperties.DeserializeDatadogAgreementResourceProperties(document.RootElement); + value = DatadogAgreement.DeserializeDatadogAgreement(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/MonitoredSubscriptionsRestOperations.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/MonitoredSubscriptionsRestOperations.cs new file mode 100644 index 000000000000..68ab5398633a --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/MonitoredSubscriptionsRestOperations.cs @@ -0,0 +1,617 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Datadog.Models; + +namespace Azure.ResourceManager.Datadog +{ + internal partial class MonitoredSubscriptionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of MonitoredSubscriptionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public MonitoredSubscriptionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-06-11"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string monitorName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/monitoredSubscriptions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string monitorName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/monitoredSubscriptions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List the subscriptions currently being monitored by the Datadog monitor resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, monitorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MonitoredSubscriptionPropertiesList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MonitoredSubscriptionPropertiesList.DeserializeMonitoredSubscriptionPropertiesList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the subscriptions currently being monitored by the Datadog monitor resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, monitorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MonitoredSubscriptionPropertiesList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MonitoredSubscriptionPropertiesList.DeserializeMonitoredSubscriptionPropertiesList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string monitorName, string configurationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/monitoredSubscriptions/", false); + uri.AppendPath(configurationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string monitorName, string configurationName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/monitoredSubscriptions/", false); + uri.AppendPath(configurationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List the subscriptions currently being monitored by the Datadog monitor resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. + /// The configuration name. Only 'default' value is supported. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, monitorName, configurationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DatadogMonitoredSubscriptionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DatadogMonitoredSubscriptionData.DeserializeDatadogMonitoredSubscriptionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DatadogMonitoredSubscriptionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the subscriptions currently being monitored by the Datadog monitor resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. + /// The configuration name. Only 'default' value is supported. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, monitorName, configurationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DatadogMonitoredSubscriptionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DatadogMonitoredSubscriptionData.DeserializeDatadogMonitoredSubscriptionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DatadogMonitoredSubscriptionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateorUpdateRequestUri(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, DatadogMonitoredSubscriptionData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/monitoredSubscriptions/", false); + uri.AppendPath(configurationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateorUpdateRequest(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, DatadogMonitoredSubscriptionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/monitoredSubscriptions/", false); + uri.AppendPath(configurationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Add the subscriptions that should be monitored by the Datadog monitor resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. + /// The configuration name. Only 'default' value is supported. + /// The to use. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateorUpdateAsync(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, DatadogMonitoredSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateorUpdateRequest(subscriptionId, resourceGroupName, monitorName, configurationName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Add the subscriptions that should be monitored by the Datadog monitor resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. + /// The configuration name. Only 'default' value is supported. + /// The to use. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateorUpdate(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, DatadogMonitoredSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateorUpdateRequest(subscriptionId, resourceGroupName, monitorName, configurationName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, DatadogMonitoredSubscriptionData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/monitoredSubscriptions/", false); + uri.AppendPath(configurationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, DatadogMonitoredSubscriptionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/monitoredSubscriptions/", false); + uri.AppendPath(configurationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the subscriptions that are being monitored by the Datadog monitor resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. + /// The configuration name. Only 'default' value is supported. + /// The to use. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, DatadogMonitoredSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, monitorName, configurationName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the subscriptions that are being monitored by the Datadog monitor resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. + /// The configuration name. Only 'default' value is supported. + /// The to use. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, DatadogMonitoredSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, monitorName, configurationName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string monitorName, string configurationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/monitoredSubscriptions/", false); + uri.AppendPath(configurationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string monitorName, string configurationName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/monitoredSubscriptions/", false); + uri.AppendPath(configurationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Updates the subscriptions that are being monitored by the Datadog monitor resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. + /// The configuration name. Only 'default' value is supported. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, monitorName, configurationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the subscriptions that are being monitored by the Datadog monitor resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. + /// The configuration name. Only 'default' value is supported. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, monitorName, configurationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List the subscriptions currently being monitored by the Datadog monitor resource. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MonitoredSubscriptionPropertiesList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MonitoredSubscriptionPropertiesList.DeserializeMonitoredSubscriptionPropertiesList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the subscriptions currently being monitored by the Datadog monitor resource. + /// The URL to the next page of results. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MonitoredSubscriptionPropertiesList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MonitoredSubscriptionPropertiesList.DeserializeMonitoredSubscriptionPropertiesList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/MonitorsRestOperations.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/MonitorsRestOperations.cs index 4812d4549679..f3d074480270 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/MonitorsRestOperations.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/MonitorsRestOperations.cs @@ -32,39 +32,31 @@ public MonitorsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-03-01"; + _apiVersion = apiVersion ?? "2025-06-11"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListApiKeysRequestUri(string subscriptionId, string resourceGroupName, string monitorName) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); - uri.AppendPath(monitorName, true); - uri.AppendPath("/listApiKeys", false); + uri.AppendPath("/providers/Microsoft.Datadog/monitors", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListApiKeysRequest(string subscriptionId, string resourceGroupName, string monitorName) + internal HttpMessage CreateListRequest(string subscriptionId) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); - uri.AppendPath(monitorName, true); - uri.AppendPath("/listApiKeys", false); + uri.AppendPath("/providers/Microsoft.Datadog/monitors", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -72,28 +64,24 @@ internal HttpMessage CreateListApiKeysRequest(string subscriptionId, string reso return message; } - /// List the api keys for a given monitor resource. + /// List all monitors under the specified subscription. /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Monitor resource name. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListApiKeysAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListApiKeysRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateListRequest(subscriptionId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - DatadogApiKeyListResponse value = default; + DatadogMonitorResourceListResponse value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DatadogApiKeyListResponse.DeserializeDatadogApiKeyListResponse(document.RootElement); + value = DatadogMonitorResourceListResponse.DeserializeDatadogMonitorResourceListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -101,28 +89,24 @@ public async Task> ListApiKeysAsync(string s } } - /// List the api keys for a given monitor resource. + /// List all monitors under the specified subscription. /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Monitor resource name. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListApiKeys(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListApiKeysRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateListRequest(subscriptionId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - DatadogApiKeyListResponse value = default; + DatadogMonitorResourceListResponse value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DatadogApiKeyListResponse.DeserializeDatadogApiKeyListResponse(document.RootElement); + value = DatadogMonitorResourceListResponse.DeserializeDatadogMonitorResourceListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -130,7 +114,7 @@ public Response ListApiKeys(string subscriptionId, st } } - internal RequestUriBuilder CreateGetDefaultKeyRequestUri(string subscriptionId, string resourceGroupName, string monitorName) + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -138,27 +122,23 @@ internal RequestUriBuilder CreateGetDefaultKeyRequestUri(string subscriptionId, uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); - uri.AppendPath(monitorName, true); - uri.AppendPath("/getDefaultKey", false); + uri.AppendPath("/providers/Microsoft.Datadog/monitors", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetDefaultKeyRequest(string subscriptionId, string resourceGroupName, string monitorName) + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); - uri.AppendPath(monitorName, true); - uri.AppendPath("/getDefaultKey", false); + uri.AppendPath("/providers/Microsoft.Datadog/monitors", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -166,28 +146,26 @@ internal HttpMessage CreateGetDefaultKeyRequest(string subscriptionId, string re return message; } - /// Get the default api key. + /// List all monitors under the specified resource group. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Monitor resource name. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetDefaultKeyAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateGetDefaultKeyRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - DatadogApiKey value = default; + DatadogMonitorResourceListResponse value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DatadogApiKey.DeserializeDatadogApiKey(document.RootElement); + value = DatadogMonitorResourceListResponse.DeserializeDatadogMonitorResourceListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -195,28 +173,26 @@ public async Task> GetDefaultKeyAsync(string subscriptio } } - /// Get the default api key. + /// List all monitors under the specified resource group. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Monitor resource name. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetDefaultKey(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateGetDefaultKeyRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - DatadogApiKey value = default; + DatadogMonitorResourceListResponse value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DatadogApiKey.DeserializeDatadogApiKey(document.RootElement); + value = DatadogMonitorResourceListResponse.DeserializeDatadogMonitorResourceListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -224,7 +200,7 @@ public Response GetDefaultKey(string subscriptionId, string resou } } - internal RequestUriBuilder CreateSetDefaultKeyRequestUri(string subscriptionId, string resourceGroupName, string monitorName, DatadogApiKey body) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string monitorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -234,16 +210,15 @@ internal RequestUriBuilder CreateSetDefaultKeyRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/setDefaultKey", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateSetDefaultKeyRequest(string subscriptionId, string resourceGroupName, string monitorName, DatadogApiKey body) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string monitorName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -252,72 +227,76 @@ internal HttpMessage CreateSetDefaultKeyRequest(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/setDefaultKey", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - if (body != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body, ModelSerializationExtensions.WireOptions); - request.Content = content; - } _userAgent.Apply(message); return message; } - /// Set the default api key. + /// Get the properties of a specific monitor resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. - /// The to use. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task SetDefaultKeyAsync(string subscriptionId, string resourceGroupName, string monitorName, DatadogApiKey body = null, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateSetDefaultKeyRequest(subscriptionId, resourceGroupName, monitorName, body); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, monitorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - return message.Response; + { + DatadogMonitorData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DatadogMonitorData.DeserializeDatadogMonitorData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DatadogMonitorData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Set the default api key. + /// Get the properties of a specific monitor resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. - /// The to use. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response SetDefaultKey(string subscriptionId, string resourceGroupName, string monitorName, DatadogApiKey body = null, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateSetDefaultKeyRequest(subscriptionId, resourceGroupName, monitorName, body); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, monitorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - return message.Response; + { + DatadogMonitorData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DatadogMonitorData.DeserializeDatadogMonitorData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DatadogMonitorData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListHostsRequestUri(string subscriptionId, string resourceGroupName, string monitorName) + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string monitorName, DatadogMonitorData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -327,16 +306,15 @@ internal RequestUriBuilder CreateListHostsRequestUri(string subscriptionId, stri uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/listHosts", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListHostsRequest(string subscriptionId, string resourceGroupName, string monitorName) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string monitorName, DatadogMonitorData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -345,73 +323,72 @@ internal HttpMessage CreateListHostsRequest(string subscriptionId, string resour uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/listHosts", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// List the hosts for a given monitor resource. + /// Create a monitor resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. + /// The to use. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListHostsAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string monitorName, DatadogMonitorData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListHostsRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, monitorName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - DatadogHostListResponse value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DatadogHostListResponse.DeserializeDatadogHostListResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// List the hosts for a given monitor resource. + /// Create a monitor resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. + /// The to use. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListHosts(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string monitorName, DatadogMonitorData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListHostsRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, monitorName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - DatadogHostListResponse value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DatadogHostListResponse.DeserializeDatadogHostListResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListLinkedResourcesRequestUri(string subscriptionId, string resourceGroupName, string monitorName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string monitorName, DatadogMonitorPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -421,16 +398,15 @@ internal RequestUriBuilder CreateListLinkedResourcesRequestUri(string subscripti uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/listLinkedResources", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListLinkedResourcesRequest(string subscriptionId, string resourceGroupName, string monitorName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string monitorName, DatadogMonitorPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -439,73 +415,72 @@ internal HttpMessage CreateListLinkedResourcesRequest(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/listLinkedResources", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// List all Azure resources associated to the same Datadog organization as the target resource. + /// Update a monitor resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. + /// The to use. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListLinkedResourcesAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string monitorName, DatadogMonitorPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateListLinkedResourcesRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, monitorName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - LinkedResourceListResponse value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = LinkedResourceListResponse.DeserializeLinkedResourceListResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// List all Azure resources associated to the same Datadog organization as the target resource. + /// Update a monitor resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. + /// The to use. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListLinkedResources(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string monitorName, DatadogMonitorPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateListLinkedResourcesRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, monitorName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - LinkedResourceListResponse value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = LinkedResourceListResponse.DeserializeLinkedResourceListResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListMonitoredResourcesRequestUri(string subscriptionId, string resourceGroupName, string monitorName) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string monitorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -515,16 +490,15 @@ internal RequestUriBuilder CreateListMonitoredResourcesRequestUri(string subscri uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/listMonitoredResources", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListMonitoredResourcesRequest(string subscriptionId, string resourceGroupName, string monitorName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string monitorName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -533,7 +507,6 @@ internal HttpMessage CreateListMonitoredResourcesRequest(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/listMonitoredResources", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -541,85 +514,87 @@ internal HttpMessage CreateListMonitoredResourcesRequest(string subscriptionId, return message; } - /// List the resources currently being monitored by the Datadog monitor resource. + /// Delete a monitor resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListMonitoredResourcesAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListMonitoredResourcesRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, monitorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MonitoredResourceListResponse value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MonitoredResourceListResponse.DeserializeMonitoredResourceListResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// List the resources currently being monitored by the Datadog monitor resource. + /// Delete a monitor resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListMonitoredResources(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListMonitoredResourcesRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, monitorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MonitoredResourceListResponse value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MonitoredResourceListResponse.DeserializeMonitoredResourceListResponse(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId) + internal RequestUriBuilder CreateGetDefaultKeyRequestUri(string subscriptionId, string resourceGroupName, string monitorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.Datadog/monitors", false); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/getDefaultKey", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId) + internal HttpMessage CreateGetDefaultKeyRequest(string subscriptionId, string resourceGroupName, string monitorName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.Datadog/monitors", false); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/getDefaultKey", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -627,24 +602,28 @@ internal HttpMessage CreateListRequest(string subscriptionId) return message; } - /// List all monitors under the specified subscription. + /// Get the default api key. /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetDefaultKeyAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListRequest(subscriptionId); + using var message = CreateGetDefaultKeyRequest(subscriptionId, resourceGroupName, monitorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - DatadogMonitorResourceListResponse value = default; + DatadogApiKey value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DatadogMonitorResourceListResponse.DeserializeDatadogMonitorResourceListResponse(document.RootElement); + value = DatadogApiKey.DeserializeDatadogApiKey(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -652,24 +631,28 @@ public async Task> ListAsync(string } } - /// List all monitors under the specified subscription. + /// Get the default api key. /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetDefaultKey(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListRequest(subscriptionId); + using var message = CreateGetDefaultKeyRequest(subscriptionId, resourceGroupName, monitorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - DatadogMonitorResourceListResponse value = default; + DatadogApiKey value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DatadogMonitorResourceListResponse.DeserializeDatadogMonitorResourceListResponse(document.RootElement); + value = DatadogApiKey.DeserializeDatadogApiKey(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -677,7 +660,7 @@ public Response List(string subscriptionId, } } - internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + internal RequestUriBuilder CreateListApiKeysRequestUri(string subscriptionId, string resourceGroupName, string monitorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -685,23 +668,27 @@ internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscripti uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Datadog/monitors", false); + uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/listApiKeys", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + internal HttpMessage CreateListApiKeysRequest(string subscriptionId, string resourceGroupName, string monitorName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Datadog/monitors", false); + uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/listApiKeys", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -709,26 +696,28 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str return message; } - /// List all monitors under the specified resource group. + /// List the api keys for a given monitor resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListApiKeysAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + using var message = CreateListApiKeysRequest(subscriptionId, resourceGroupName, monitorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - DatadogMonitorResourceListResponse value = default; + DatadogApiKeyListResponse value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DatadogMonitorResourceListResponse.DeserializeDatadogMonitorResourceListResponse(document.RootElement); + value = DatadogApiKeyListResponse.DeserializeDatadogApiKeyListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -736,26 +725,28 @@ public async Task> ListByResourceGr } } - /// List all monitors under the specified resource group. + /// List the api keys for a given monitor resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListApiKeys(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + using var message = CreateListApiKeysRequest(subscriptionId, resourceGroupName, monitorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - DatadogMonitorResourceListResponse value = default; + DatadogApiKeyListResponse value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DatadogMonitorResourceListResponse.DeserializeDatadogMonitorResourceListResponse(document.RootElement); + value = DatadogApiKeyListResponse.DeserializeDatadogApiKeyListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -763,7 +754,7 @@ public Response ListByResourceGroup(string s } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string monitorName) + internal RequestUriBuilder CreateListHostsRequestUri(string subscriptionId, string resourceGroupName, string monitorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -773,15 +764,16 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); uri.AppendPath(monitorName, true); + uri.AppendPath("/listHosts", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string monitorName) + internal HttpMessage CreateListHostsRequest(string subscriptionId, string resourceGroupName, string monitorName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -790,6 +782,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); uri.AppendPath(monitorName, true); + uri.AppendPath("/listHosts", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -797,69 +790,65 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get the properties of a specific monitor resource. + /// List the hosts for a given monitor resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public async Task> ListHostsAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateListHostsRequest(subscriptionId, resourceGroupName, monitorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - DatadogMonitorResourceData value = default; + DatadogHostListResponse value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DatadogMonitorResourceData.DeserializeDatadogMonitorResourceData(document.RootElement); + value = DatadogHostListResponse.DeserializeDatadogHostListResponse(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((DatadogMonitorResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Get the properties of a specific monitor resource. + /// List the hosts for a given monitor resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public Response ListHosts(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateListHostsRequest(subscriptionId, resourceGroupName, monitorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - DatadogMonitorResourceData value = default; + DatadogHostListResponse value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DatadogMonitorResourceData.DeserializeDatadogMonitorResourceData(document.RootElement); + value = DatadogHostListResponse.DeserializeDatadogHostListResponse(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((DatadogMonitorResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string monitorName, DatadogMonitorResourceData data) + internal RequestUriBuilder CreateListLinkedResourcesRequestUri(string subscriptionId, string resourceGroupName, string monitorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -869,15 +858,16 @@ internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); uri.AppendPath(monitorName, true); + uri.AppendPath("/listLinkedResources", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string monitorName, DatadogMonitorResourceData data) + internal HttpMessage CreateListLinkedResourcesRequest(string subscriptionId, string resourceGroupName, string monitorName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -886,72 +876,73 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); uri.AppendPath(monitorName, true); + uri.AppendPath("/listLinkedResources", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Create a monitor resource. + /// List all Azure resources associated to the same Datadog organization as the target resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. - /// The to use. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string monitorName, DatadogMonitorResourceData data, CancellationToken cancellationToken = default) + public async Task> ListLinkedResourcesAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, monitorName, data); + using var message = CreateListLinkedResourcesRequest(subscriptionId, resourceGroupName, monitorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: - return message.Response; + { + LinkedResourceListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = LinkedResourceListResponse.DeserializeLinkedResourceListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Create a monitor resource. + /// List all Azure resources associated to the same Datadog organization as the target resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. - /// The to use. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string monitorName, DatadogMonitorResourceData data, CancellationToken cancellationToken = default) + public Response ListLinkedResources(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, monitorName, data); + using var message = CreateListLinkedResourcesRequest(subscriptionId, resourceGroupName, monitorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: - return message.Response; + { + LinkedResourceListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = LinkedResourceListResponse.DeserializeLinkedResourceListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string monitorName, DatadogMonitorResourcePatch patch) + internal RequestUriBuilder CreateListMonitoredResourcesRequestUri(string subscriptionId, string resourceGroupName, string monitorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -961,15 +952,16 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); uri.AppendPath(monitorName, true); + uri.AppendPath("/listMonitoredResources", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string monitorName, DatadogMonitorResourcePatch patch) + internal HttpMessage CreateListMonitoredResourcesRequest(string subscriptionId, string resourceGroupName, string monitorName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -978,72 +970,73 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); uri.AppendPath(monitorName, true); + uri.AppendPath("/listMonitoredResources", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Update a monitor resource. + /// List the resources currently being monitored by the Datadog monitor resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. - /// The to use. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string monitorName, DatadogMonitorResourcePatch patch, CancellationToken cancellationToken = default) + public async Task> ListMonitoredResourcesAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, monitorName, patch); + using var message = CreateListMonitoredResourcesRequest(subscriptionId, resourceGroupName, monitorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: - return message.Response; + { + MonitoredResourceListResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MonitoredResourceListResponse.DeserializeMonitoredResourceListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Update a monitor resource. + /// List the resources currently being monitored by the Datadog monitor resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. - /// The to use. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string monitorName, DatadogMonitorResourcePatch patch, CancellationToken cancellationToken = default) + public Response ListMonitoredResources(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, monitorName, patch); + using var message = CreateListMonitoredResourcesRequest(subscriptionId, resourceGroupName, monitorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: - return message.Response; + { + MonitoredResourceListResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MonitoredResourceListResponse.DeserializeMonitoredResourceListResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string monitorName) + internal RequestUriBuilder CreateRefreshSetPasswordLinkRequestUri(string subscriptionId, string resourceGroupName, string monitorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1053,15 +1046,16 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); uri.AppendPath(monitorName, true); + uri.AppendPath("/refreshSetPasswordLink", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string monitorName) + internal HttpMessage CreateRefreshSetPasswordLinkRequest(string subscriptionId, string resourceGroupName, string monitorName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1070,6 +1064,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); uri.AppendPath(monitorName, true); + uri.AppendPath("/refreshSetPasswordLink", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1077,59 +1072,65 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Delete a monitor resource. + /// Refresh the set password link and return a latest one. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public async Task> RefreshSetPasswordLinkAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateRefreshSetPasswordLinkRequest(subscriptionId, resourceGroupName, monitorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + DatadogSetPasswordLink value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DatadogSetPasswordLink.DeserializeDatadogSetPasswordLink(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Delete a monitor resource. + /// Refresh the set password link and return a latest one. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public Response RefreshSetPasswordLink(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateRefreshSetPasswordLinkRequest(subscriptionId, resourceGroupName, monitorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + DatadogSetPasswordLink value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DatadogSetPasswordLink.DeserializeDatadogSetPasswordLink(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateRefreshSetPasswordLinkRequestUri(string subscriptionId, string resourceGroupName, string monitorName) + internal RequestUriBuilder CreateSetDefaultKeyRequestUri(string subscriptionId, string resourceGroupName, string monitorName, DatadogApiKey body) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1139,12 +1140,12 @@ internal RequestUriBuilder CreateRefreshSetPasswordLinkRequestUri(string subscri uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/refreshSetPasswordLink", false); + uri.AppendPath("/setDefaultKey", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateRefreshSetPasswordLinkRequest(string subscriptionId, string resourceGroupName, string monitorName) + internal HttpMessage CreateSetDefaultKeyRequest(string subscriptionId, string resourceGroupName, string monitorName, DatadogApiKey body) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1157,73 +1158,72 @@ internal HttpMessage CreateRefreshSetPasswordLinkRequest(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); uri.AppendPath(monitorName, true); - uri.AppendPath("/refreshSetPasswordLink", false); + uri.AppendPath("/setDefaultKey", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + if (body != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + } _userAgent.Apply(message); return message; } - /// Refresh the set password link and return a latest one. + /// Set the default api key. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. + /// The to use. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> RefreshSetPasswordLinkAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public async Task SetDefaultKeyAsync(string subscriptionId, string resourceGroupName, string monitorName, DatadogApiKey body = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateRefreshSetPasswordLinkRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateSetDefaultKeyRequest(subscriptionId, resourceGroupName, monitorName, body); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - DatadogSetPasswordLink value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DatadogSetPasswordLink.DeserializeDatadogSetPasswordLink(document.RootElement); - return Response.FromValue(value, message.Response); - } + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Refresh the set password link and return a latest one. + /// Set the default api key. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. + /// The to use. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response RefreshSetPasswordLink(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public Response SetDefaultKey(string subscriptionId, string resourceGroupName, string monitorName, DatadogApiKey body = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateRefreshSetPasswordLinkRequest(subscriptionId, resourceGroupName, monitorName); + using var message = CreateSetDefaultKeyRequest(subscriptionId, resourceGroupName, monitorName, body); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - DatadogSetPasswordLink value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DatadogSetPasswordLink.DeserializeDatadogSetPasswordLink(document.RootElement); - return Response.FromValue(value, message.Response); - } + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListApiKeysNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1231,7 +1231,7 @@ internal RequestUriBuilder CreateListApiKeysNextPageRequestUri(string nextLink, return uri; } - internal HttpMessage CreateListApiKeysNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1245,30 +1245,26 @@ internal HttpMessage CreateListApiKeysNextPageRequest(string nextLink, string su return message; } - /// List the api keys for a given monitor resource. + /// List all monitors under the specified subscription. /// The URL to the next page of results. /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Monitor resource name. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListApiKeysNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListApiKeysNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); + using var message = CreateListNextPageRequest(nextLink, subscriptionId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - DatadogApiKeyListResponse value = default; + DatadogMonitorResourceListResponse value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DatadogApiKeyListResponse.DeserializeDatadogApiKeyListResponse(document.RootElement); + value = DatadogMonitorResourceListResponse.DeserializeDatadogMonitorResourceListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1276,30 +1272,26 @@ public async Task> ListApiKeysNextPageAsync( } } - /// List the api keys for a given monitor resource. + /// List all monitors under the specified subscription. /// The URL to the next page of results. /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Monitor resource name. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListApiKeysNextPage(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListApiKeysNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); + using var message = CreateListNextPageRequest(nextLink, subscriptionId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - DatadogApiKeyListResponse value = default; + DatadogMonitorResourceListResponse value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DatadogApiKeyListResponse.DeserializeDatadogApiKeyListResponse(document.RootElement); + value = DatadogMonitorResourceListResponse.DeserializeDatadogMonitorResourceListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1307,7 +1299,7 @@ public Response ListApiKeysNextPage(string nextLink, } } - internal RequestUriBuilder CreateListHostsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1315,7 +1307,7 @@ internal RequestUriBuilder CreateListHostsNextPageRequestUri(string nextLink, st return uri; } - internal HttpMessage CreateListHostsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1329,30 +1321,28 @@ internal HttpMessage CreateListHostsNextPageRequest(string nextLink, string subs return message; } - /// List the hosts for a given monitor resource. + /// List all monitors under the specified resource group. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Monitor resource name. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListHostsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListHostsNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - DatadogHostListResponse value = default; + DatadogMonitorResourceListResponse value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DatadogHostListResponse.DeserializeDatadogHostListResponse(document.RootElement); + value = DatadogMonitorResourceListResponse.DeserializeDatadogMonitorResourceListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1360,30 +1350,28 @@ public async Task> ListHostsNextPageAsync(stri } } - /// List the hosts for a given monitor resource. + /// List all monitors under the specified resource group. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Monitor resource name. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListHostsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListHostsNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - DatadogHostListResponse value = default; + DatadogMonitorResourceListResponse value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DatadogHostListResponse.DeserializeDatadogHostListResponse(document.RootElement); + value = DatadogMonitorResourceListResponse.DeserializeDatadogMonitorResourceListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1391,7 +1379,7 @@ public Response ListHostsNextPage(string nextLink, stri } } - internal RequestUriBuilder CreateListLinkedResourcesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) + internal RequestUriBuilder CreateListApiKeysNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1399,7 +1387,7 @@ internal RequestUriBuilder CreateListLinkedResourcesNextPageRequestUri(string ne return uri; } - internal HttpMessage CreateListLinkedResourcesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) + internal HttpMessage CreateListApiKeysNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1413,7 +1401,7 @@ internal HttpMessage CreateListLinkedResourcesNextPageRequest(string nextLink, s return message; } - /// List all Azure resources associated to the same Datadog organization as the target resource. + /// List the api keys for a given monitor resource. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. @@ -1421,22 +1409,22 @@ internal HttpMessage CreateListLinkedResourcesNextPageRequest(string nextLink, s /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListLinkedResourcesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public async Task> ListApiKeysNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListLinkedResourcesNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); + using var message = CreateListApiKeysNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - LinkedResourceListResponse value = default; + DatadogApiKeyListResponse value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = LinkedResourceListResponse.DeserializeLinkedResourceListResponse(document.RootElement); + value = DatadogApiKeyListResponse.DeserializeDatadogApiKeyListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1444,7 +1432,7 @@ public async Task> ListLinkedResourcesNextP } } - /// List all Azure resources associated to the same Datadog organization as the target resource. + /// List the api keys for a given monitor resource. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. @@ -1452,22 +1440,22 @@ public async Task> ListLinkedResourcesNextP /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListLinkedResourcesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public Response ListApiKeysNextPage(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListLinkedResourcesNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); + using var message = CreateListApiKeysNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - LinkedResourceListResponse value = default; + DatadogApiKeyListResponse value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = LinkedResourceListResponse.DeserializeLinkedResourceListResponse(document.RootElement); + value = DatadogApiKeyListResponse.DeserializeDatadogApiKeyListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1475,7 +1463,7 @@ public Response ListLinkedResourcesNextPage(string n } } - internal RequestUriBuilder CreateListMonitoredResourcesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) + internal RequestUriBuilder CreateListHostsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1483,7 +1471,7 @@ internal RequestUriBuilder CreateListMonitoredResourcesNextPageRequestUri(string return uri; } - internal HttpMessage CreateListMonitoredResourcesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) + internal HttpMessage CreateListHostsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1497,7 +1485,7 @@ internal HttpMessage CreateListMonitoredResourcesNextPageRequest(string nextLink return message; } - /// List the resources currently being monitored by the Datadog monitor resource. + /// List the hosts for a given monitor resource. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. @@ -1505,22 +1493,22 @@ internal HttpMessage CreateListMonitoredResourcesNextPageRequest(string nextLink /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListMonitoredResourcesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public async Task> ListHostsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListMonitoredResourcesNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); + using var message = CreateListHostsNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MonitoredResourceListResponse value = default; + DatadogHostListResponse value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MonitoredResourceListResponse.DeserializeMonitoredResourceListResponse(document.RootElement); + value = DatadogHostListResponse.DeserializeDatadogHostListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1528,7 +1516,7 @@ public async Task> ListMonitoredResource } } - /// List the resources currently being monitored by the Datadog monitor resource. + /// List the hosts for a given monitor resource. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. @@ -1536,22 +1524,22 @@ public async Task> ListMonitoredResource /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListMonitoredResourcesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) + public Response ListHostsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListMonitoredResourcesNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); + using var message = CreateListHostsNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MonitoredResourceListResponse value = default; + DatadogHostListResponse value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MonitoredResourceListResponse.DeserializeMonitoredResourceListResponse(document.RootElement); + value = DatadogHostListResponse.DeserializeDatadogHostListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1559,7 +1547,7 @@ public Response ListMonitoredResourcesNextPage(st } } - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) + internal RequestUriBuilder CreateListLinkedResourcesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1567,7 +1555,7 @@ internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string return uri; } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) + internal HttpMessage CreateListLinkedResourcesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1581,26 +1569,30 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// List all monitors under the specified subscription. + /// List all Azure resources associated to the same Datadog organization as the target resource. /// The URL to the next page of results. /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListLinkedResourcesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId); + using var message = CreateListLinkedResourcesNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - DatadogMonitorResourceListResponse value = default; + LinkedResourceListResponse value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DatadogMonitorResourceListResponse.DeserializeDatadogMonitorResourceListResponse(document.RootElement); + value = LinkedResourceListResponse.DeserializeLinkedResourceListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1608,26 +1600,30 @@ public async Task> ListNextPageAsyn } } - /// List all monitors under the specified subscription. + /// List all Azure resources associated to the same Datadog organization as the target resource. /// The URL to the next page of results. /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListLinkedResourcesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId); + using var message = CreateListLinkedResourcesNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - DatadogMonitorResourceListResponse value = default; + LinkedResourceListResponse value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DatadogMonitorResourceListResponse.DeserializeDatadogMonitorResourceListResponse(document.RootElement); + value = LinkedResourceListResponse.DeserializeLinkedResourceListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1635,7 +1631,7 @@ public Response ListNextPage(string nextLink } } - internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + internal RequestUriBuilder CreateListMonitoredResourcesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1643,7 +1639,7 @@ internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string ne return uri; } - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + internal HttpMessage CreateListMonitoredResourcesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string monitorName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1657,28 +1653,30 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s return message; } - /// List all monitors under the specified resource group. + /// List the resources currently being monitored by the Datadog monitor resource. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListMonitoredResourcesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListMonitoredResourcesNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - DatadogMonitorResourceListResponse value = default; + MonitoredResourceListResponse value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DatadogMonitorResourceListResponse.DeserializeDatadogMonitorResourceListResponse(document.RootElement); + value = MonitoredResourceListResponse.DeserializeMonitoredResourceListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1686,28 +1684,30 @@ public async Task> ListByResourceGr } } - /// List all monitors under the specified resource group. + /// List the resources currently being monitored by the Datadog monitor resource. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListMonitoredResourcesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListMonitoredResourcesNextPageRequest(nextLink, subscriptionId, resourceGroupName, monitorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - DatadogMonitorResourceListResponse value = default; + MonitoredResourceListResponse value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DatadogMonitorResourceListResponse.DeserializeDatadogMonitorResourceListResponse(document.RootElement); + value = MonitoredResourceListResponse.DeserializeMonitoredResourceListResponse(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/OrganizationsRestOperations.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/OrganizationsRestOperations.cs new file mode 100644 index 000000000000..8b97d2bf325c --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/OrganizationsRestOperations.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Datadog.Models; + +namespace Azure.ResourceManager.Datadog +{ + internal partial class OrganizationsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of OrganizationsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public OrganizationsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-06-11"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateResubscribeRequestUri(string subscriptionId, string resourceGroupName, string monitorName, ResubscribeOrganizationContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/resubscribe", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateResubscribeRequest(string subscriptionId, string resourceGroupName, string monitorName, ResubscribeOrganizationContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Datadog/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/resubscribe", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Reinstate integration with your Datadog organization by choosing one of the available subscription plans. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. + /// Resubscribe Properties. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ResubscribeAsync(string subscriptionId, string resourceGroupName, string monitorName, ResubscribeOrganizationContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateResubscribeRequest(subscriptionId, resourceGroupName, monitorName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Reinstate integration with your Datadog organization by choosing one of the available subscription plans. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Monitor resource name. + /// Resubscribe Properties. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Resubscribe(string subscriptionId, string resourceGroupName, string monitorName, ResubscribeOrganizationContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + + using var message = CreateResubscribeRequest(subscriptionId, resourceGroupName, monitorName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/SingleSignOnConfigurationsRestOperations.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/SingleSignOnConfigurationsRestOperations.cs index 420fc2201a64..640a8cafb405 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/SingleSignOnConfigurationsRestOperations.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/SingleSignOnConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public SingleSignOnConfigurationsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-03-01"; + _apiVersion = apiVersion ?? "2025-06-11"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -130,7 +130,7 @@ public Response List(string subscriptio } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, DatadogSingleSignOnResourceData data) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string monitorName, string configurationName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -146,11 +146,11 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, DatadogSingleSignOnResourceData data) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string monitorName, string configurationName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -164,73 +164,77 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Configures single-sign-on for this resource. + /// Gets the datadog single sign-on resource for the given Monitor. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. /// Configuration name. - /// The to use. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, DatadogSingleSignOnResourceData data, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, monitorName, configurationName, data); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, monitorName, configurationName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: - return message.Response; + { + DatadogSingleSignOnData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DatadogSingleSignOnData.DeserializeDatadogSingleSignOnData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DatadogSingleSignOnData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Configures single-sign-on for this resource. + /// Gets the datadog single sign-on resource for the given Monitor. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. /// Configuration name. - /// The to use. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, DatadogSingleSignOnResourceData data, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, monitorName, configurationName, data); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, monitorName, configurationName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: - return message.Response; + { + DatadogSingleSignOnData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DatadogSingleSignOnData.DeserializeDatadogSingleSignOnData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DatadogSingleSignOnData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string monitorName, string configurationName) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, DatadogSingleSignOnData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -246,11 +250,11 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string monitorName, string configurationName) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, DatadogSingleSignOnData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -264,71 +268,67 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Gets the datadog single sign-on resource for the given Monitor. + /// Configures single-sign-on for this resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. /// Configuration name. + /// The to use. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, DatadogSingleSignOnData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, monitorName, configurationName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, monitorName, configurationName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - DatadogSingleSignOnResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = DatadogSingleSignOnResourceData.DeserializeDatadogSingleSignOnResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((DatadogSingleSignOnResourceData)null, message.Response); + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets the datadog single sign-on resource for the given Monitor. + /// Configures single-sign-on for this resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. /// Configuration name. + /// The to use. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string monitorName, string configurationName, DatadogSingleSignOnData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); Argument.AssertNotNullOrEmpty(configurationName, nameof(configurationName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, monitorName, configurationName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, monitorName, configurationName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - DatadogSingleSignOnResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = DatadogSingleSignOnResourceData.DeserializeDatadogSingleSignOnResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((DatadogSingleSignOnResourceData)null, message.Response); + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/TagRulesRestOperations.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/TagRulesRestOperations.cs index 8b2da67f4990..ae20578284ff 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/TagRulesRestOperations.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/RestOperations/TagRulesRestOperations.cs @@ -32,7 +32,7 @@ public TagRulesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-03-01"; + _apiVersion = apiVersion ?? "2025-06-11"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -130,7 +130,7 @@ public Response List(string subscriptionId, stri } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, MonitoringTagRuleData data) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -146,11 +146,11 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, MonitoringTagRuleData data) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -164,81 +164,77 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Create or update a tag rule set for a given monitor resource. + /// Get a tag rule set for a given monitor resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. /// Rule set name. - /// The to use. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, MonitoringTagRuleData data, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); Argument.AssertNotNullOrEmpty(ruleSetName, nameof(ruleSetName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, monitorName, ruleSetName, data); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, monitorName, ruleSetName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MonitoringTagRuleData value = default; + DataMonitoringTagRuleData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MonitoringTagRuleData.DeserializeMonitoringTagRuleData(document.RootElement); + value = DataMonitoringTagRuleData.DeserializeDataMonitoringTagRuleData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((DataMonitoringTagRuleData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Create or update a tag rule set for a given monitor resource. + /// Get a tag rule set for a given monitor resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. /// Rule set name. - /// The to use. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, MonitoringTagRuleData data, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); Argument.AssertNotNullOrEmpty(ruleSetName, nameof(ruleSetName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, monitorName, ruleSetName, data); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, monitorName, ruleSetName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MonitoringTagRuleData value = default; + DataMonitoringTagRuleData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MonitoringTagRuleData.DeserializeMonitoringTagRuleData(document.RootElement); + value = DataMonitoringTagRuleData.DeserializeDataMonitoringTagRuleData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((DataMonitoringTagRuleData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, DataMonitoringTagRuleData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -254,11 +250,11 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, DataMonitoringTagRuleData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -272,71 +268,75 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Get a tag rule set for a given monitor resource. + /// Create or update a tag rule set for a given monitor resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. /// Rule set name. + /// The to use. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, DataMonitoringTagRuleData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); Argument.AssertNotNullOrEmpty(ruleSetName, nameof(ruleSetName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, monitorName, ruleSetName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, monitorName, ruleSetName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MonitoringTagRuleData value = default; + DataMonitoringTagRuleData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MonitoringTagRuleData.DeserializeMonitoringTagRuleData(document.RootElement); + value = DataMonitoringTagRuleData.DeserializeDataMonitoringTagRuleData(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((MonitoringTagRuleData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Get a tag rule set for a given monitor resource. + /// Create or update a tag rule set for a given monitor resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Monitor resource name. /// Rule set name. + /// The to use. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string monitorName, string ruleSetName, DataMonitoringTagRuleData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); Argument.AssertNotNullOrEmpty(ruleSetName, nameof(ruleSetName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, monitorName, ruleSetName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, monitorName, ruleSetName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MonitoringTagRuleData value = default; + DataMonitoringTagRuleData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MonitoringTagRuleData.DeserializeMonitoringTagRuleData(document.RootElement); + value = DataMonitoringTagRuleData.DeserializeDataMonitoringTagRuleData(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((MonitoringTagRuleData)null, message.Response); default: throw new RequestFailedException(message.Response); } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/autorest.md b/sdk/datadog/Azure.ResourceManager.Datadog/src/autorest.md index ea66a000cbb4..0508176f9e65 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/autorest.md +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/autorest.md @@ -8,7 +8,8 @@ azure-arm: true csharp: true library-name: Datadog namespace: Azure.ResourceManager.Datadog -require: https://github.com/Azure/azure-rest-api-specs/blob/066eb8c81e14e0f3b22b6700c67693eef5f79ea9/specification/datadog/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/278d4cb813510d2963592eb2aee9c64325a80007/specification/datadog/resource-manager/readme.md +#tag: package-2025-06 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -19,6 +20,9 @@ modelerfour: flatten-payloads: false use-model-reader-writer: true +#mgmt-debug: +# show-serialized-names: true + format-by-name-rules: 'tenantId': 'uuid' 'ETag': 'etag' @@ -50,7 +54,55 @@ acronym-mapping: Etag: ETag|etag rename-mapping: - DatadogAgreementResource: DatadogAgreementResourceProperties - MonitoredResource: MonitoredResourceContent + AgentRules: DatadogMonitorAgentRules + AgentRules.enableAgentMonitoring: IsAgentMonitoringEnabled + BillingInfoResponse: DatadogBillingInfoResult + CreateResourceSupportedProperties: DatadogSubscriptionStatusProperties + CreateResourceSupportedProperties.creationSupported: IsCreationSupported + CreateResourceSupportedResponse: DatadogSubscriptionStatusResult + DatadogAgreementResource: DatadogAgreement + DatadogAgreementProperties.accepted: IsAccepted + DatadogMonitorResource: DatadogMonitor + DatadogOrganizationProperties.cspm: IsCspm + DatadogOrganizationProperties.resourceCollection: IsResourceCollection + DatadogSingleSignOnResource: DatadogSingleSignOn + FilteringTag: DatadogMonitorFilteringTag + LiftrResourceCategories: DatadogLiftrResourceCategory + LinkedResource: DatadogLinkedResourceResult + LinkedResource.id: -|arm-id + LogRules: DatadogMonitorLogRules + LogRules.sendAadLogs: IsAadLogsSent + LogRules.sendResourceLogs: IsResourceLogsSent + LogRules.sendSubscriptionLogs: IsSubscriptionLogsSent + MarketplaceSaaSInfo.subscribed: IsSubscribed + MetricRules: DatadogMonitorMetricRules + MonitoredResource: DatadogMonitoredResourceResult + MonitoredResource.id: -|arm-id + MonitoredResource.sendingLogs: IsSendingLogsEnabled + MonitoredResource.sendingMetrics: IsSendingMetricsEnabled + MonitoredSubscription: DatadogMonitoredSubscriptionItem + MonitoredSubscriptionProperties: DatadogMonitoredSubscription + MonitoringStatus: DatadogMonitoringStatus + MonitoringTagRules: DataMonitoringTagRule + MonitoringTagRulesProperties: MonitoringTagRuleProperties + MonitoringTagRulesProperties.automuting: IsAutomutingEnabled + MonitoringTagRulesProperties.customMetrics: IsCustomMetricsEnabled + MonitorProperties: DatadogMonitorProperties + MonitorUpdateProperties: DatadogMonitorResourcePatchProperties + MonitorUpdateProperties.cspm: IsCspm + MonitorUpdateProperties.resourceCollection: IsResourceCollection + Operation: DatadogOperation + ProvisioningState: DatadogProvisioningState + ResourceSku: DatadogSku + ResubscribeProperties: ResubscribeOrganizationContent + SingleSignOnStates: DatadogSingleSignOnState + Status: DatadogMonitorStatus + SubscriptionList: DatadogSubscriptionProperties + TagAction: DatadogMonitorTagAction + UserInfo: DatadogUserInfo + +override-operation-name: + CreationSupported_List: GetSubscriptionStatuses + CreationSupported_Get: GetSubscriptionStatus ``` diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_MonitoringTagRuleCollection.cs b/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DataMonitoringTagRuleCollection.cs similarity index 71% rename from sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_MonitoringTagRuleCollection.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DataMonitoringTagRuleCollection.cs index 88fdab415ea4..34ed90cdf405 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_MonitoringTagRuleCollection.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DataMonitoringTagRuleCollection.cs @@ -9,17 +9,18 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.Datadog.Models; using NUnit.Framework; namespace Azure.ResourceManager.Datadog.Samples { - public partial class Sample_MonitoringTagRuleCollection + public partial class Sample_DataMonitoringTagRuleCollection { [Test] [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_TagRulesCreateOrUpdate() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_CreateOrUpdate.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/TagRules_CreateOrUpdate.json // this example is just showing the usage of "TagRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -33,20 +34,44 @@ public async Task CreateOrUpdate_TagRulesCreateOrUpdate() string resourceGroupName = "myResourceGroup"; string monitorName = "myMonitor"; ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); - DatadogMonitorResource datadogMonitorResource = client.GetDatadogMonitorResource(datadogMonitorResourceId); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); - // get the collection of this MonitoringTagRuleResource - MonitoringTagRuleCollection collection = datadogMonitorResource.GetMonitoringTagRules(); + // get the collection of this DataMonitoringTagRuleResource + DataMonitoringTagRuleCollection collection = datadogMonitor.GetDataMonitoringTagRules(); // invoke the operation string ruleSetName = "default"; - MonitoringTagRuleData data = new MonitoringTagRuleData(); - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, ruleSetName, data); - MonitoringTagRuleResource result = lro.Value; + DataMonitoringTagRuleData data = new DataMonitoringTagRuleData + { + Properties = new MonitoringTagRuleProperties + { + LogRules = new DatadogMonitorLogRules + { + IsAadLogsSent = false, + IsSubscriptionLogsSent = true, + IsResourceLogsSent = true, + FilteringTags = {new DatadogMonitorFilteringTag +{ +Name = "Environment", +Value = "Prod", +Action = DatadogMonitorTagAction.Include, +}, new DatadogMonitorFilteringTag +{ +Name = "Environment", +Value = "Dev", +Action = DatadogMonitorTagAction.Exclude, +}}, + }, + MetricRulesFilteringTags = { }, + IsAutomutingEnabled = true, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, ruleSetName, data); + DataMonitoringTagRuleResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - MonitoringTagRuleData resourceData = result.Data; + DataMonitoringTagRuleData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -55,7 +80,7 @@ public async Task CreateOrUpdate_TagRulesCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_TagRulesGet() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_Get.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/TagRules_Get.json // this example is just showing the usage of "TagRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -69,18 +94,18 @@ public async Task Get_TagRulesGet() string resourceGroupName = "myResourceGroup"; string monitorName = "myMonitor"; ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); - DatadogMonitorResource datadogMonitorResource = client.GetDatadogMonitorResource(datadogMonitorResourceId); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); - // get the collection of this MonitoringTagRuleResource - MonitoringTagRuleCollection collection = datadogMonitorResource.GetMonitoringTagRules(); + // get the collection of this DataMonitoringTagRuleResource + DataMonitoringTagRuleCollection collection = datadogMonitor.GetDataMonitoringTagRules(); // invoke the operation string ruleSetName = "default"; - MonitoringTagRuleResource result = await collection.GetAsync(ruleSetName); + DataMonitoringTagRuleResource result = await collection.GetAsync(ruleSetName); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - MonitoringTagRuleData resourceData = result.Data; + DataMonitoringTagRuleData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -89,7 +114,7 @@ public async Task Get_TagRulesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_TagRulesList() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_List.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/TagRules_List.json // this example is just showing the usage of "TagRules_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -103,17 +128,17 @@ public async Task GetAll_TagRulesList() string resourceGroupName = "myResourceGroup"; string monitorName = "myMonitor"; ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); - DatadogMonitorResource datadogMonitorResource = client.GetDatadogMonitorResource(datadogMonitorResourceId); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); - // get the collection of this MonitoringTagRuleResource - MonitoringTagRuleCollection collection = datadogMonitorResource.GetMonitoringTagRules(); + // get the collection of this DataMonitoringTagRuleResource + DataMonitoringTagRuleCollection collection = datadogMonitor.GetDataMonitoringTagRules(); // invoke the operation and iterate over the result - await foreach (MonitoringTagRuleResource item in collection.GetAllAsync()) + await foreach (DataMonitoringTagRuleResource item in collection.GetAllAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - MonitoringTagRuleData resourceData = item.Data; + DataMonitoringTagRuleData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -125,7 +150,7 @@ public async Task GetAll_TagRulesList() [Ignore("Only validating compilation of examples")] public async Task Exists_TagRulesGet() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_Get.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/TagRules_Get.json // this example is just showing the usage of "TagRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -139,10 +164,10 @@ public async Task Exists_TagRulesGet() string resourceGroupName = "myResourceGroup"; string monitorName = "myMonitor"; ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); - DatadogMonitorResource datadogMonitorResource = client.GetDatadogMonitorResource(datadogMonitorResourceId); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); - // get the collection of this MonitoringTagRuleResource - MonitoringTagRuleCollection collection = datadogMonitorResource.GetMonitoringTagRules(); + // get the collection of this DataMonitoringTagRuleResource + DataMonitoringTagRuleCollection collection = datadogMonitor.GetDataMonitoringTagRules(); // invoke the operation string ruleSetName = "default"; @@ -155,7 +180,7 @@ public async Task Exists_TagRulesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_TagRulesGet() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_Get.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/TagRules_Get.json // this example is just showing the usage of "TagRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,15 +194,15 @@ public async Task GetIfExists_TagRulesGet() string resourceGroupName = "myResourceGroup"; string monitorName = "myMonitor"; ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); - DatadogMonitorResource datadogMonitorResource = client.GetDatadogMonitorResource(datadogMonitorResourceId); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); - // get the collection of this MonitoringTagRuleResource - MonitoringTagRuleCollection collection = datadogMonitorResource.GetMonitoringTagRules(); + // get the collection of this DataMonitoringTagRuleResource + DataMonitoringTagRuleCollection collection = datadogMonitor.GetDataMonitoringTagRules(); // invoke the operation string ruleSetName = "default"; - NullableResponse response = await collection.GetIfExistsAsync(ruleSetName); - MonitoringTagRuleResource result = response.HasValue ? response.Value : null; + NullableResponse response = await collection.GetIfExistsAsync(ruleSetName); + DataMonitoringTagRuleResource result = response.HasValue ? response.Value : null; if (result == null) { @@ -187,7 +212,7 @@ public async Task GetIfExists_TagRulesGet() { // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - MonitoringTagRuleData resourceData = result.Data; + DataMonitoringTagRuleData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_MonitoringTagRuleResource.cs b/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DataMonitoringTagRuleResource.cs similarity index 53% rename from sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_MonitoringTagRuleResource.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DataMonitoringTagRuleResource.cs index 4fd2ac3d570f..46d243c2eaa2 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_MonitoringTagRuleResource.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DataMonitoringTagRuleResource.cs @@ -9,17 +9,18 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.Datadog.Models; using NUnit.Framework; namespace Azure.ResourceManager.Datadog.Samples { - public partial class Sample_MonitoringTagRuleResource + public partial class Sample_DataMonitoringTagRuleResource { [Test] [Ignore("Only validating compilation of examples")] public async Task Get_TagRulesGet() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_Get.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/TagRules_Get.json // this example is just showing the usage of "TagRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -27,21 +28,21 @@ public async Task Get_TagRulesGet() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this MonitoringTagRuleResource created on azure - // for more information of creating MonitoringTagRuleResource, please refer to the document of MonitoringTagRuleResource + // this example assumes you already have this DataMonitoringTagRuleResource created on azure + // for more information of creating DataMonitoringTagRuleResource, please refer to the document of DataMonitoringTagRuleResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "myResourceGroup"; string monitorName = "myMonitor"; string ruleSetName = "default"; - ResourceIdentifier monitoringTagRuleResourceId = MonitoringTagRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName, ruleSetName); - MonitoringTagRuleResource monitoringTagRule = client.GetMonitoringTagRuleResource(monitoringTagRuleResourceId); + ResourceIdentifier dataMonitoringTagRuleResourceId = DataMonitoringTagRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName, ruleSetName); + DataMonitoringTagRuleResource dataMonitoringTagRule = client.GetDataMonitoringTagRuleResource(dataMonitoringTagRuleResourceId); // invoke the operation - MonitoringTagRuleResource result = await monitoringTagRule.GetAsync(); + DataMonitoringTagRuleResource result = await dataMonitoringTagRule.GetAsync(); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - MonitoringTagRuleData resourceData = result.Data; + DataMonitoringTagRuleData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -50,7 +51,7 @@ public async Task Get_TagRulesGet() [Ignore("Only validating compilation of examples")] public async Task Update_TagRulesCreateOrUpdate() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/TagRules_CreateOrUpdate.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/TagRules_CreateOrUpdate.json // this example is just showing the usage of "TagRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -58,23 +59,47 @@ public async Task Update_TagRulesCreateOrUpdate() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this MonitoringTagRuleResource created on azure - // for more information of creating MonitoringTagRuleResource, please refer to the document of MonitoringTagRuleResource + // this example assumes you already have this DataMonitoringTagRuleResource created on azure + // for more information of creating DataMonitoringTagRuleResource, please refer to the document of DataMonitoringTagRuleResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "myResourceGroup"; string monitorName = "myMonitor"; string ruleSetName = "default"; - ResourceIdentifier monitoringTagRuleResourceId = MonitoringTagRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName, ruleSetName); - MonitoringTagRuleResource monitoringTagRule = client.GetMonitoringTagRuleResource(monitoringTagRuleResourceId); + ResourceIdentifier dataMonitoringTagRuleResourceId = DataMonitoringTagRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName, ruleSetName); + DataMonitoringTagRuleResource dataMonitoringTagRule = client.GetDataMonitoringTagRuleResource(dataMonitoringTagRuleResourceId); // invoke the operation - MonitoringTagRuleData data = new MonitoringTagRuleData(); - ArmOperation lro = await monitoringTagRule.UpdateAsync(WaitUntil.Completed, data); - MonitoringTagRuleResource result = lro.Value; + DataMonitoringTagRuleData data = new DataMonitoringTagRuleData + { + Properties = new MonitoringTagRuleProperties + { + LogRules = new DatadogMonitorLogRules + { + IsAadLogsSent = false, + IsSubscriptionLogsSent = true, + IsResourceLogsSent = true, + FilteringTags = {new DatadogMonitorFilteringTag +{ +Name = "Environment", +Value = "Prod", +Action = DatadogMonitorTagAction.Include, +}, new DatadogMonitorFilteringTag +{ +Name = "Environment", +Value = "Dev", +Action = DatadogMonitorTagAction.Exclude, +}}, + }, + MetricRulesFilteringTags = { }, + IsAutomutingEnabled = true, + }, + }; + ArmOperation lro = await dataMonitoringTagRule.UpdateAsync(WaitUntil.Completed, data); + DataMonitoringTagRuleResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - MonitoringTagRuleData resourceData = result.Data; + DataMonitoringTagRuleData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogMonitorResourceCollection.cs b/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogMonitorCollection.cs similarity index 81% rename from sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogMonitorResourceCollection.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogMonitorCollection.cs index 85dc7891b709..2425e6cf7af3 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogMonitorResourceCollection.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogMonitorCollection.cs @@ -9,18 +9,19 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.Datadog.Models; using Azure.ResourceManager.Resources; using NUnit.Framework; namespace Azure.ResourceManager.Datadog.Samples { - public partial class Sample_DatadogMonitorResourceCollection + public partial class Sample_DatadogMonitorCollection { [Test] [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_MonitorsCreate() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Create.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/Monitors_Create.json // this example is just showing the usage of "Monitors_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -36,17 +37,44 @@ public async Task CreateOrUpdate_MonitorsCreate() ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); // get the collection of this DatadogMonitorResource - DatadogMonitorResourceCollection collection = resourceGroupResource.GetDatadogMonitorResources(); + DatadogMonitorCollection collection = resourceGroupResource.GetDatadogMonitors(); // invoke the operation string monitorName = "myMonitor"; - DatadogMonitorResourceData data = new DatadogMonitorResourceData(default); + DatadogMonitorData data = new DatadogMonitorData(new AzureLocation("West US")) + { + Properties = new DatadogMonitorProperties + { + MonitoringStatus = DatadogMonitoringStatus.Enabled, + DatadogOrganizationProperties = new DatadogOrganizationProperties + { + Name = "myOrg", + Id = "myOrg123", + LinkingAuthCode = "someAuthCode", + LinkingClientId = "00000000-0000-0000-0000-000000000000", + EnterpriseAppId = "00000000-0000-0000-0000-000000000000", + IsCspm = false, + IsResourceCollection = false, + }, + UserInfo = new DatadogUserInfo + { + Name = "Alice", + EmailAddress = "alice@microsoft.com", + PhoneNumber = "123-456-7890", + }, + }, + SkuName = "free_Monthly", + Tags = +{ +["Environment"] = "Dev" +}, + }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, monitorName, data); DatadogMonitorResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatadogMonitorResourceData resourceData = result.Data; + DatadogMonitorData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -55,7 +83,7 @@ public async Task CreateOrUpdate_MonitorsCreate() [Ignore("Only validating compilation of examples")] public async Task Get_MonitorsGet() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Get.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/Monitors_Get.json // this example is just showing the usage of "Monitors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -71,7 +99,7 @@ public async Task Get_MonitorsGet() ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); // get the collection of this DatadogMonitorResource - DatadogMonitorResourceCollection collection = resourceGroupResource.GetDatadogMonitorResources(); + DatadogMonitorCollection collection = resourceGroupResource.GetDatadogMonitors(); // invoke the operation string monitorName = "myMonitor"; @@ -79,7 +107,7 @@ public async Task Get_MonitorsGet() // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatadogMonitorResourceData resourceData = result.Data; + DatadogMonitorData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -88,7 +116,7 @@ public async Task Get_MonitorsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_MonitorsListByResourceGroup() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_ListByResourceGroup.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/Monitors_ListByResourceGroup.json // this example is just showing the usage of "Monitors_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -104,14 +132,14 @@ public async Task GetAll_MonitorsListByResourceGroup() ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); // get the collection of this DatadogMonitorResource - DatadogMonitorResourceCollection collection = resourceGroupResource.GetDatadogMonitorResources(); + DatadogMonitorCollection collection = resourceGroupResource.GetDatadogMonitors(); // invoke the operation and iterate over the result await foreach (DatadogMonitorResource item in collection.GetAllAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatadogMonitorResourceData resourceData = item.Data; + DatadogMonitorData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -123,7 +151,7 @@ public async Task GetAll_MonitorsListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_MonitorsGet() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Get.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/Monitors_Get.json // this example is just showing the usage of "Monitors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -139,7 +167,7 @@ public async Task Exists_MonitorsGet() ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); // get the collection of this DatadogMonitorResource - DatadogMonitorResourceCollection collection = resourceGroupResource.GetDatadogMonitorResources(); + DatadogMonitorCollection collection = resourceGroupResource.GetDatadogMonitors(); // invoke the operation string monitorName = "myMonitor"; @@ -152,7 +180,7 @@ public async Task Exists_MonitorsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_MonitorsGet() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Get.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/Monitors_Get.json // this example is just showing the usage of "Monitors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +196,7 @@ public async Task GetIfExists_MonitorsGet() ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); // get the collection of this DatadogMonitorResource - DatadogMonitorResourceCollection collection = resourceGroupResource.GetDatadogMonitorResources(); + DatadogMonitorCollection collection = resourceGroupResource.GetDatadogMonitors(); // invoke the operation string monitorName = "myMonitor"; @@ -183,7 +211,7 @@ public async Task GetIfExists_MonitorsGet() { // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatadogMonitorResourceData resourceData = result.Data; + DatadogMonitorData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogMonitorResource.cs b/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogMonitorResource.cs index 015ee8b55719..2f9f0ea26a62 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogMonitorResource.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogMonitorResource.cs @@ -10,7 +10,6 @@ using Azure.Core; using Azure.Identity; using Azure.ResourceManager.Datadog.Models; -using Azure.ResourceManager.Resources.Models; using NUnit.Framework; namespace Azure.ResourceManager.Datadog.Samples @@ -21,7 +20,7 @@ public partial class Sample_DatadogMonitorResource [Ignore("Only validating compilation of examples")] public async Task Get_MonitorsGet() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Get.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/Monitors_Get.json // this example is just showing the usage of "Monitors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -35,14 +34,14 @@ public async Task Get_MonitorsGet() string resourceGroupName = "myResourceGroup"; string monitorName = "myMonitor"; ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); - DatadogMonitorResource datadogMonitorResource = client.GetDatadogMonitorResource(datadogMonitorResourceId); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); // invoke the operation - DatadogMonitorResource result = await datadogMonitorResource.GetAsync(); + DatadogMonitorResource result = await datadogMonitor.GetAsync(); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatadogMonitorResourceData resourceData = result.Data; + DatadogMonitorData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -51,7 +50,7 @@ public async Task Get_MonitorsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_MonitorsDelete() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Delete.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/Monitors_Delete.json // this example is just showing the usage of "Monitors_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,10 +64,10 @@ public async Task Delete_MonitorsDelete() string resourceGroupName = "myResourceGroup"; string monitorName = "myMonitor"; ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); - DatadogMonitorResource datadogMonitorResource = client.GetDatadogMonitorResource(datadogMonitorResourceId); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); // invoke the operation - await datadogMonitorResource.DeleteAsync(WaitUntil.Completed); + await datadogMonitor.DeleteAsync(WaitUntil.Completed); Console.WriteLine("Succeeded"); } @@ -77,7 +76,7 @@ public async Task Delete_MonitorsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_MonitorsUpdate() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_Update.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/Monitors_Update.json // this example is just showing the usage of "Monitors_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -91,25 +90,61 @@ public async Task Update_MonitorsUpdate() string resourceGroupName = "myResourceGroup"; string monitorName = "myMonitor"; ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); - DatadogMonitorResource datadogMonitorResource = client.GetDatadogMonitorResource(datadogMonitorResourceId); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); // invoke the operation - DatadogMonitorResourcePatch patch = new DatadogMonitorResourcePatch(); - ArmOperation lro = await datadogMonitorResource.UpdateAsync(WaitUntil.Completed, patch); + DatadogMonitorPatch patch = new DatadogMonitorPatch + { + Properties = new DatadogMonitorResourcePatchProperties + { + MonitoringStatus = DatadogMonitoringStatus.Enabled, + }, + Tags = +{ +["Environment"] = "Dev" +}, + }; + ArmOperation lro = await datadogMonitor.UpdateAsync(WaitUntil.Completed, patch); DatadogMonitorResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatadogMonitorResourceData resourceData = result.Data; + DatadogMonitorData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDefaultKey_MonitorsGetDefaultKey() + { + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/ApiKeys_GetDefaultKey.json + // this example is just showing the usage of "Monitors_GetDefaultKey" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DatadogMonitorResource created on azure + // for more information of creating DatadogMonitorResource, please refer to the document of DatadogMonitorResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; + ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); + + // invoke the operation + DatadogApiKey result = await datadogMonitor.GetDefaultKeyAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task GetApiKeys_MonitorsListApiKeys() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_List.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/ApiKeys_List.json // this example is just showing the usage of "Monitors_ListApiKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,10 +158,10 @@ public async Task GetApiKeys_MonitorsListApiKeys() string resourceGroupName = "myResourceGroup"; string monitorName = "myMonitor"; ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); - DatadogMonitorResource datadogMonitorResource = client.GetDatadogMonitorResource(datadogMonitorResourceId); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); // invoke the operation and iterate over the result - await foreach (DatadogApiKey item in datadogMonitorResource.GetApiKeysAsync()) + await foreach (DatadogApiKey item in datadogMonitor.GetApiKeysAsync()) { Console.WriteLine($"Succeeded: {item}"); } @@ -136,10 +171,10 @@ public async Task GetApiKeys_MonitorsListApiKeys() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetDefaultKey_MonitorsGetDefaultKey() + public async Task GetHosts_MonitorsListHosts() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_GetDefaultKey.json - // this example is just showing the usage of "Monitors_GetDefaultKey" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/Hosts_List.json + // this example is just showing the usage of "Monitors_ListHosts" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -152,20 +187,23 @@ public async Task GetDefaultKey_MonitorsGetDefaultKey() string resourceGroupName = "myResourceGroup"; string monitorName = "myMonitor"; ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); - DatadogMonitorResource datadogMonitorResource = client.GetDatadogMonitorResource(datadogMonitorResourceId); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); - // invoke the operation - DatadogApiKey result = await datadogMonitorResource.GetDefaultKeyAsync(); + // invoke the operation and iterate over the result + await foreach (DatadogHost item in datadogMonitor.GetHostsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task SetDefaultKey_MonitorsSetDefaultKey() + public async Task GetLinkedResources_MonitorsListLinkedResources() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/ApiKeys_SetDefaultKey.json - // this example is just showing the usage of "Monitors_SetDefaultKey" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/LinkedResources_List.json + // this example is just showing the usage of "Monitors_ListLinkedResources" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -178,20 +216,23 @@ public async Task SetDefaultKey_MonitorsSetDefaultKey() string resourceGroupName = "myResourceGroup"; string monitorName = "myMonitor"; ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); - DatadogMonitorResource datadogMonitorResource = client.GetDatadogMonitorResource(datadogMonitorResourceId); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); - // invoke the operation - await datadogMonitorResource.SetDefaultKeyAsync(); + // invoke the operation and iterate over the result + await foreach (DatadogLinkedResourceResult item in datadogMonitor.GetLinkedResourcesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetHosts_MonitorsListHosts() + public async Task GetMonitoredResources_MonitorsListMonitoredResources() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Hosts_List.json - // this example is just showing the usage of "Monitors_ListHosts" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/MonitoredResources_List.json + // this example is just showing the usage of "Monitors_ListMonitoredResources" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -204,10 +245,10 @@ public async Task GetHosts_MonitorsListHosts() string resourceGroupName = "myResourceGroup"; string monitorName = "myMonitor"; ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); - DatadogMonitorResource datadogMonitorResource = client.GetDatadogMonitorResource(datadogMonitorResourceId); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); // invoke the operation and iterate over the result - await foreach (DatadogHost item in datadogMonitorResource.GetHostsAsync()) + await foreach (DatadogMonitoredResourceResult item in datadogMonitor.GetMonitoredResourcesAsync()) { Console.WriteLine($"Succeeded: {item}"); } @@ -217,10 +258,10 @@ public async Task GetHosts_MonitorsListHosts() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetLinkedResources_MonitorsListLinkedResources() + public async Task RefreshSetPasswordLink_MonitorsRefreshSetPasswordLink() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/LinkedResources_List.json - // this example is just showing the usage of "Monitors_ListLinkedResources" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/RefreshSetPassword_Get.json + // this example is just showing the usage of "Monitors_RefreshSetPasswordLink" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -233,23 +274,20 @@ public async Task GetLinkedResources_MonitorsListLinkedResources() string resourceGroupName = "myResourceGroup"; string monitorName = "myMonitor"; ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); - DatadogMonitorResource datadogMonitorResource = client.GetDatadogMonitorResource(datadogMonitorResourceId); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); - // invoke the operation and iterate over the result - await foreach (SubResource item in datadogMonitorResource.GetLinkedResourcesAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } + // invoke the operation + DatadogSetPasswordLink result = await datadogMonitor.RefreshSetPasswordLinkAsync(); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetMonitoredResources_MonitorsListMonitoredResources() + public async Task SetDefaultKey_MonitorsSetDefaultKey() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MonitoredResources_List.json - // this example is just showing the usage of "Monitors_ListMonitoredResources" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/ApiKeys_SetDefaultKey.json + // this example is just showing the usage of "Monitors_SetDefaultKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -262,23 +300,20 @@ public async Task GetMonitoredResources_MonitorsListMonitoredResources() string resourceGroupName = "myResourceGroup"; string monitorName = "myMonitor"; ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); - DatadogMonitorResource datadogMonitorResource = client.GetDatadogMonitorResource(datadogMonitorResourceId); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); - // invoke the operation and iterate over the result - await foreach (MonitoredResourceContent item in datadogMonitorResource.GetMonitoredResourcesAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } + // invoke the operation + await datadogMonitor.SetDefaultKeyAsync(); Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task RefreshSetPasswordLink_MonitorsRefreshSetPasswordLink() + public async Task GetBillingInfo_BillingInfoGet() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/RefreshSetPassword_Get.json - // this example is just showing the usage of "Monitors_RefreshSetPasswordLink" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/BillingInfo_Get.json + // this example is just showing the usage of "BillingInfo_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -291,12 +326,49 @@ public async Task RefreshSetPasswordLink_MonitorsRefreshSetPasswordLink() string resourceGroupName = "myResourceGroup"; string monitorName = "myMonitor"; ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); - DatadogMonitorResource datadogMonitorResource = client.GetDatadogMonitorResource(datadogMonitorResourceId); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); // invoke the operation - DatadogSetPasswordLink result = await datadogMonitorResource.RefreshSetPasswordLinkAsync(); + DatadogBillingInfoResult result = await datadogMonitor.GetBillingInfoAsync(); Console.WriteLine($"Succeeded: {result}"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ResubscribeOrganization_OrganizationsResubscribe() + { + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/Organizations_Resubscribe.json + // this example is just showing the usage of "Organizations_Resubscribe" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DatadogMonitorResource created on azure + // for more information of creating DatadogMonitorResource, please refer to the document of DatadogMonitorResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; + ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); + + // invoke the operation + ResubscribeOrganizationContent content = new ResubscribeOrganizationContent + { + SkuName = "planName", + AzureSubscriptionId = "subscriptionId", + ResourceGroup = "resourceGroup", + }; + ArmOperation lro = await datadogMonitor.ResubscribeOrganizationAsync(WaitUntil.Completed, content: content); + DatadogMonitorResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DatadogMonitorData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogMonitoredSubscriptionCollection.cs b/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogMonitoredSubscriptionCollection.cs new file mode 100644 index 000000000000..430ca642f82d --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogMonitoredSubscriptionCollection.cs @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Datadog.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Datadog.Samples +{ + public partial class Sample_DatadogMonitoredSubscriptionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_MonitorsAddMonitoredSubscriptions() + { + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/MonitoredSubscriptions_CreateorUpdate.json + // this example is just showing the usage of "MonitoredSubscriptions_CreateorUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DatadogMonitorResource created on azure + // for more information of creating DatadogMonitorResource, please refer to the document of DatadogMonitorResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; + ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); + + // get the collection of this DatadogMonitoredSubscriptionResource + DatadogMonitoredSubscriptionCollection collection = datadogMonitor.GetDatadogMonitoredSubscriptions(); + + // invoke the operation + string configurationName = "default"; + DatadogMonitoredSubscriptionData data = new DatadogMonitoredSubscriptionData + { + Properties = new DatadogSubscriptionProperties + { + Operation = DatadogOperation.AddBegin, + MonitoredSubscriptionList = {new DatadogMonitoredSubscriptionItem +{ +SubscriptionId = "/subscriptions/00000000-0000-0000-0000-000000000000", +Status = DatadogMonitorStatus.Active, +TagRules = new MonitoringTagRuleProperties +{ +LogRules = new DatadogMonitorLogRules +{ +IsAadLogsSent = false, +IsSubscriptionLogsSent = true, +IsResourceLogsSent = true, +FilteringTags = {new DatadogMonitorFilteringTag +{ +Name = "Environment", +Value = "Prod", +Action = DatadogMonitorTagAction.Include, +}, new DatadogMonitorFilteringTag +{ +Name = "Environment", +Value = "Dev", +Action = DatadogMonitorTagAction.Exclude, +}}, +}, +MetricRulesFilteringTags = {}, +IsAutomutingEnabled = true, +}, +}, new DatadogMonitoredSubscriptionItem +{ +SubscriptionId = "/subscriptions/00000000-0000-0000-0000-000000000001", +Status = DatadogMonitorStatus.Failed, +TagRules = new MonitoringTagRuleProperties +{ +LogRules = new DatadogMonitorLogRules +{ +IsAadLogsSent = false, +IsSubscriptionLogsSent = true, +IsResourceLogsSent = true, +FilteringTags = {new DatadogMonitorFilteringTag +{ +Name = "Environment", +Value = "Prod", +Action = DatadogMonitorTagAction.Include, +}, new DatadogMonitorFilteringTag +{ +Name = "Environment", +Value = "Dev", +Action = DatadogMonitorTagAction.Exclude, +}}, +}, +MetricRulesFilteringTags = {}, +IsAutomutingEnabled = true, +}, +}}, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, configurationName, data); + DatadogMonitoredSubscriptionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DatadogMonitoredSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_MonitorsGetMonitoredSubscriptions() + { + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/MonitoredSubscriptions_Get.json + // this example is just showing the usage of "MonitoredSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DatadogMonitorResource created on azure + // for more information of creating DatadogMonitorResource, please refer to the document of DatadogMonitorResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; + ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); + + // get the collection of this DatadogMonitoredSubscriptionResource + DatadogMonitoredSubscriptionCollection collection = datadogMonitor.GetDatadogMonitoredSubscriptions(); + + // invoke the operation + string configurationName = "default"; + DatadogMonitoredSubscriptionResource result = await collection.GetAsync(configurationName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DatadogMonitoredSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_MonitorsGetMonitoredSubscriptions() + { + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/MonitoredSubscriptions_List.json + // this example is just showing the usage of "MonitoredSubscriptions_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DatadogMonitorResource created on azure + // for more information of creating DatadogMonitorResource, please refer to the document of DatadogMonitorResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; + ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); + + // get the collection of this DatadogMonitoredSubscriptionResource + DatadogMonitoredSubscriptionCollection collection = datadogMonitor.GetDatadogMonitoredSubscriptions(); + + // invoke the operation and iterate over the result + await foreach (DatadogMonitoredSubscriptionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DatadogMonitoredSubscriptionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_MonitorsGetMonitoredSubscriptions() + { + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/MonitoredSubscriptions_Get.json + // this example is just showing the usage of "MonitoredSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DatadogMonitorResource created on azure + // for more information of creating DatadogMonitorResource, please refer to the document of DatadogMonitorResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; + ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); + + // get the collection of this DatadogMonitoredSubscriptionResource + DatadogMonitoredSubscriptionCollection collection = datadogMonitor.GetDatadogMonitoredSubscriptions(); + + // invoke the operation + string configurationName = "default"; + bool result = await collection.ExistsAsync(configurationName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_MonitorsGetMonitoredSubscriptions() + { + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/MonitoredSubscriptions_Get.json + // this example is just showing the usage of "MonitoredSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DatadogMonitorResource created on azure + // for more information of creating DatadogMonitorResource, please refer to the document of DatadogMonitorResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; + ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); + + // get the collection of this DatadogMonitoredSubscriptionResource + DatadogMonitoredSubscriptionCollection collection = datadogMonitor.GetDatadogMonitoredSubscriptions(); + + // invoke the operation + string configurationName = "default"; + NullableResponse response = await collection.GetIfExistsAsync(configurationName); + DatadogMonitoredSubscriptionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DatadogMonitoredSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogMonitoredSubscriptionResource.cs b/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogMonitoredSubscriptionResource.cs new file mode 100644 index 000000000000..6388fd1d7bc6 --- /dev/null +++ b/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogMonitoredSubscriptionResource.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Datadog.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Datadog.Samples +{ + public partial class Sample_DatadogMonitoredSubscriptionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_MonitorsGetMonitoredSubscriptions() + { + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/MonitoredSubscriptions_Get.json + // this example is just showing the usage of "MonitoredSubscriptions_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DatadogMonitoredSubscriptionResource created on azure + // for more information of creating DatadogMonitoredSubscriptionResource, please refer to the document of DatadogMonitoredSubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; + string configurationName = "default"; + ResourceIdentifier datadogMonitoredSubscriptionResourceId = DatadogMonitoredSubscriptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName, configurationName); + DatadogMonitoredSubscriptionResource datadogMonitoredSubscription = client.GetDatadogMonitoredSubscriptionResource(datadogMonitoredSubscriptionResourceId); + + // invoke the operation + DatadogMonitoredSubscriptionResource result = await datadogMonitoredSubscription.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DatadogMonitoredSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_MonitorsDeleteMonitoredSubscriptions() + { + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/MonitoredSubscriptions_Delete.json + // this example is just showing the usage of "MonitoredSubscriptions_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DatadogMonitoredSubscriptionResource created on azure + // for more information of creating DatadogMonitoredSubscriptionResource, please refer to the document of DatadogMonitoredSubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; + string configurationName = "default"; + ResourceIdentifier datadogMonitoredSubscriptionResourceId = DatadogMonitoredSubscriptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName, configurationName); + DatadogMonitoredSubscriptionResource datadogMonitoredSubscription = client.GetDatadogMonitoredSubscriptionResource(datadogMonitoredSubscriptionResourceId); + + // invoke the operation + await datadogMonitoredSubscription.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_MonitorsUpdateMonitoredSubscriptions() + { + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/MonitoredSubscriptions_Update.json + // this example is just showing the usage of "MonitoredSubscriptions_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DatadogMonitoredSubscriptionResource created on azure + // for more information of creating DatadogMonitoredSubscriptionResource, please refer to the document of DatadogMonitoredSubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string monitorName = "myMonitor"; + string configurationName = "default"; + ResourceIdentifier datadogMonitoredSubscriptionResourceId = DatadogMonitoredSubscriptionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName, configurationName); + DatadogMonitoredSubscriptionResource datadogMonitoredSubscription = client.GetDatadogMonitoredSubscriptionResource(datadogMonitoredSubscriptionResourceId); + + // invoke the operation + DatadogMonitoredSubscriptionData data = new DatadogMonitoredSubscriptionData + { + Properties = new DatadogSubscriptionProperties + { + Operation = DatadogOperation.AddComplete, + MonitoredSubscriptionList = {new DatadogMonitoredSubscriptionItem +{ +SubscriptionId = "/subscriptions/00000000-0000-0000-0000-000000000000", +Status = DatadogMonitorStatus.Active, +TagRules = new MonitoringTagRuleProperties +{ +LogRules = new DatadogMonitorLogRules +{ +IsAadLogsSent = false, +IsSubscriptionLogsSent = true, +IsResourceLogsSent = true, +FilteringTags = {new DatadogMonitorFilteringTag +{ +Name = "Environment", +Value = "Prod", +Action = DatadogMonitorTagAction.Include, +}, new DatadogMonitorFilteringTag +{ +Name = "Environment", +Value = "Dev", +Action = DatadogMonitorTagAction.Exclude, +}}, +}, +MetricRulesFilteringTags = {}, +IsAutomutingEnabled = true, +}, +}, new DatadogMonitoredSubscriptionItem +{ +SubscriptionId = "/subscriptions/00000000-0000-0000-0000-000000000001", +Status = DatadogMonitorStatus.Failed, +TagRules = new MonitoringTagRuleProperties +{ +LogRules = new DatadogMonitorLogRules +{ +IsAadLogsSent = false, +IsSubscriptionLogsSent = true, +IsResourceLogsSent = true, +FilteringTags = {new DatadogMonitorFilteringTag +{ +Name = "Environment", +Value = "Prod", +Action = DatadogMonitorTagAction.Include, +}, new DatadogMonitorFilteringTag +{ +Name = "Environment", +Value = "Dev", +Action = DatadogMonitorTagAction.Exclude, +}}, +}, +MetricRulesFilteringTags = {}, +IsAutomutingEnabled = true, +}, +}}, + }, + }; + ArmOperation lro = await datadogMonitoredSubscription.UpdateAsync(WaitUntil.Completed, data); + DatadogMonitoredSubscriptionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DatadogMonitoredSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogSingleSignOnResourceCollection.cs b/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogSingleSignOnCollection.cs similarity index 82% rename from sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogSingleSignOnResourceCollection.cs rename to sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogSingleSignOnCollection.cs index fd2ee71a0950..3ef6feb711f4 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogSingleSignOnResourceCollection.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogSingleSignOnCollection.cs @@ -9,17 +9,18 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.Datadog.Models; using NUnit.Framework; namespace Azure.ResourceManager.Datadog.Samples { - public partial class Sample_DatadogSingleSignOnResourceCollection + public partial class Sample_DatadogSingleSignOnCollection { [Test] [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SingleSignOnConfigurationsCreateOrUpdate() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_CreateOrUpdate.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/SingleSignOnConfigurations_CreateOrUpdate.json // this example is just showing the usage of "SingleSignOnConfigurations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -33,20 +34,27 @@ public async Task CreateOrUpdate_SingleSignOnConfigurationsCreateOrUpdate() string resourceGroupName = "myResourceGroup"; string monitorName = "myMonitor"; ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); - DatadogMonitorResource datadogMonitorResource = client.GetDatadogMonitorResource(datadogMonitorResourceId); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); // get the collection of this DatadogSingleSignOnResource - DatadogSingleSignOnResourceCollection collection = datadogMonitorResource.GetDatadogSingleSignOnResources(); + DatadogSingleSignOnCollection collection = datadogMonitor.GetDatadogSingleSignOns(); // invoke the operation string configurationName = "default"; - DatadogSingleSignOnResourceData data = new DatadogSingleSignOnResourceData(); + DatadogSingleSignOnData data = new DatadogSingleSignOnData + { + Properties = new DatadogSingleSignOnProperties + { + SingleSignOnState = DatadogSingleSignOnState.Enable, + EnterpriseAppId = "00000000-0000-0000-0000-000000000000", + }, + }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, configurationName, data); DatadogSingleSignOnResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatadogSingleSignOnResourceData resourceData = result.Data; + DatadogSingleSignOnData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -55,7 +63,7 @@ public async Task CreateOrUpdate_SingleSignOnConfigurationsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_SingleSignOnConfigurationsGet() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_Get.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/SingleSignOnConfigurations_Get.json // this example is just showing the usage of "SingleSignOnConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -69,10 +77,10 @@ public async Task Get_SingleSignOnConfigurationsGet() string resourceGroupName = "myResourceGroup"; string monitorName = "myMonitor"; ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); - DatadogMonitorResource datadogMonitorResource = client.GetDatadogMonitorResource(datadogMonitorResourceId); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); // get the collection of this DatadogSingleSignOnResource - DatadogSingleSignOnResourceCollection collection = datadogMonitorResource.GetDatadogSingleSignOnResources(); + DatadogSingleSignOnCollection collection = datadogMonitor.GetDatadogSingleSignOns(); // invoke the operation string configurationName = "default"; @@ -80,7 +88,7 @@ public async Task Get_SingleSignOnConfigurationsGet() // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatadogSingleSignOnResourceData resourceData = result.Data; + DatadogSingleSignOnData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -89,7 +97,7 @@ public async Task Get_SingleSignOnConfigurationsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_SingleSignOnConfigurationsList() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_List.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/SingleSignOnConfigurations_List.json // this example is just showing the usage of "SingleSignOnConfigurations_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -103,17 +111,17 @@ public async Task GetAll_SingleSignOnConfigurationsList() string resourceGroupName = "myResourceGroup"; string monitorName = "myMonitor"; ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); - DatadogMonitorResource datadogMonitorResource = client.GetDatadogMonitorResource(datadogMonitorResourceId); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); // get the collection of this DatadogSingleSignOnResource - DatadogSingleSignOnResourceCollection collection = datadogMonitorResource.GetDatadogSingleSignOnResources(); + DatadogSingleSignOnCollection collection = datadogMonitor.GetDatadogSingleSignOns(); // invoke the operation and iterate over the result await foreach (DatadogSingleSignOnResource item in collection.GetAllAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatadogSingleSignOnResourceData resourceData = item.Data; + DatadogSingleSignOnData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -125,7 +133,7 @@ public async Task GetAll_SingleSignOnConfigurationsList() [Ignore("Only validating compilation of examples")] public async Task Exists_SingleSignOnConfigurationsGet() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_Get.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/SingleSignOnConfigurations_Get.json // this example is just showing the usage of "SingleSignOnConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -139,10 +147,10 @@ public async Task Exists_SingleSignOnConfigurationsGet() string resourceGroupName = "myResourceGroup"; string monitorName = "myMonitor"; ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); - DatadogMonitorResource datadogMonitorResource = client.GetDatadogMonitorResource(datadogMonitorResourceId); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); // get the collection of this DatadogSingleSignOnResource - DatadogSingleSignOnResourceCollection collection = datadogMonitorResource.GetDatadogSingleSignOnResources(); + DatadogSingleSignOnCollection collection = datadogMonitor.GetDatadogSingleSignOns(); // invoke the operation string configurationName = "default"; @@ -155,7 +163,7 @@ public async Task Exists_SingleSignOnConfigurationsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_SingleSignOnConfigurationsGet() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_Get.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/SingleSignOnConfigurations_Get.json // this example is just showing the usage of "SingleSignOnConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,10 +177,10 @@ public async Task GetIfExists_SingleSignOnConfigurationsGet() string resourceGroupName = "myResourceGroup"; string monitorName = "myMonitor"; ResourceIdentifier datadogMonitorResourceId = DatadogMonitorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName); - DatadogMonitorResource datadogMonitorResource = client.GetDatadogMonitorResource(datadogMonitorResourceId); + DatadogMonitorResource datadogMonitor = client.GetDatadogMonitorResource(datadogMonitorResourceId); // get the collection of this DatadogSingleSignOnResource - DatadogSingleSignOnResourceCollection collection = datadogMonitorResource.GetDatadogSingleSignOnResources(); + DatadogSingleSignOnCollection collection = datadogMonitor.GetDatadogSingleSignOns(); // invoke the operation string configurationName = "default"; @@ -187,7 +195,7 @@ public async Task GetIfExists_SingleSignOnConfigurationsGet() { // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatadogSingleSignOnResourceData resourceData = result.Data; + DatadogSingleSignOnData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogSingleSignOnResource.cs b/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogSingleSignOnResource.cs index b5aa9f9d097e..574e05586410 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogSingleSignOnResource.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_DatadogSingleSignOnResource.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.Datadog.Models; using NUnit.Framework; namespace Azure.ResourceManager.Datadog.Samples @@ -19,7 +20,7 @@ public partial class Sample_DatadogSingleSignOnResource [Ignore("Only validating compilation of examples")] public async Task Get_SingleSignOnConfigurationsGet() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_Get.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/SingleSignOnConfigurations_Get.json // this example is just showing the usage of "SingleSignOnConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -34,14 +35,14 @@ public async Task Get_SingleSignOnConfigurationsGet() string monitorName = "myMonitor"; string configurationName = "default"; ResourceIdentifier datadogSingleSignOnResourceId = DatadogSingleSignOnResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName, configurationName); - DatadogSingleSignOnResource datadogSingleSignOnResource = client.GetDatadogSingleSignOnResource(datadogSingleSignOnResourceId); + DatadogSingleSignOnResource datadogSingleSignOn = client.GetDatadogSingleSignOnResource(datadogSingleSignOnResourceId); // invoke the operation - DatadogSingleSignOnResource result = await datadogSingleSignOnResource.GetAsync(); + DatadogSingleSignOnResource result = await datadogSingleSignOn.GetAsync(); // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatadogSingleSignOnResourceData resourceData = result.Data; + DatadogSingleSignOnData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -50,7 +51,7 @@ public async Task Get_SingleSignOnConfigurationsGet() [Ignore("Only validating compilation of examples")] public async Task Update_SingleSignOnConfigurationsCreateOrUpdate() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/SingleSignOnConfigurations_CreateOrUpdate.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/SingleSignOnConfigurations_CreateOrUpdate.json // this example is just showing the usage of "SingleSignOnConfigurations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,16 +66,23 @@ public async Task Update_SingleSignOnConfigurationsCreateOrUpdate() string monitorName = "myMonitor"; string configurationName = "default"; ResourceIdentifier datadogSingleSignOnResourceId = DatadogSingleSignOnResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, monitorName, configurationName); - DatadogSingleSignOnResource datadogSingleSignOnResource = client.GetDatadogSingleSignOnResource(datadogSingleSignOnResourceId); + DatadogSingleSignOnResource datadogSingleSignOn = client.GetDatadogSingleSignOnResource(datadogSingleSignOnResourceId); // invoke the operation - DatadogSingleSignOnResourceData data = new DatadogSingleSignOnResourceData(); - ArmOperation lro = await datadogSingleSignOnResource.UpdateAsync(WaitUntil.Completed, data); + DatadogSingleSignOnData data = new DatadogSingleSignOnData + { + Properties = new DatadogSingleSignOnProperties + { + SingleSignOnState = DatadogSingleSignOnState.Enable, + EnterpriseAppId = "00000000-0000-0000-0000-000000000000", + }, + }; + ArmOperation lro = await datadogSingleSignOn.UpdateAsync(WaitUntil.Completed, data); DatadogSingleSignOnResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatadogSingleSignOnResourceData resourceData = result.Data; + DatadogSingleSignOnData resourceData = result.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 3059f7e202b5..9554a7747b50 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetMarketplaceAgreements_MarketplaceAgreementsList() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MarketplaceAgreements_List.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/MarketplaceAgreements_List.json // this example is just showing the usage of "MarketplaceAgreements_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -36,7 +36,7 @@ public async Task GetMarketplaceAgreements_MarketplaceAgreementsList() SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (DatadogAgreementResourceProperties item in subscriptionResource.GetMarketplaceAgreementsAsync()) + await foreach (DatadogAgreement item in subscriptionResource.GetMarketplaceAgreementsAsync()) { Console.WriteLine($"Succeeded: {item}"); } @@ -48,7 +48,7 @@ public async Task GetMarketplaceAgreements_MarketplaceAgreementsList() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdateMarketplaceAgreement_MarketplaceAgreementsCreateOrUpdate() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/MarketplaceAgreements_Create.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/MarketplaceAgreements_Create.json // this example is just showing the usage of "MarketplaceAgreements_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,16 +63,23 @@ public async Task CreateOrUpdateMarketplaceAgreement_MarketplaceAgreementsCreate SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation - DatadogAgreementResourceProperties result = await subscriptionResource.CreateOrUpdateMarketplaceAgreementAsync(); + DatadogAgreement body = new DatadogAgreement + { + Properties = new DatadogAgreementProperties + { + IsAccepted = true, + }, + }; + DatadogAgreement result = await subscriptionResource.CreateOrUpdateMarketplaceAgreementAsync(body: body); Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetDatadogMonitorResources_MonitorsList() + public async Task GetDatadogMonitors_MonitorsList() { - // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2021-03-01/examples/Monitors_List.json + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/Monitors_List.json // this example is just showing the usage of "Monitors_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,16 +94,69 @@ public async Task GetDatadogMonitorResources_MonitorsList() SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (DatadogMonitorResource item in subscriptionResource.GetDatadogMonitorResourcesAsync()) + await foreach (DatadogMonitorResource item in subscriptionResource.GetDatadogMonitorsAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - DatadogMonitorResourceData resourceData = item.Data; + DatadogMonitorData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } Console.WriteLine("Succeeded"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSubscriptionStatuses_CreationSupportedList() + { + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/CreationSupported_List.json + // this example is just showing the usage of "CreationSupported_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + string datadogOrganizationId = "00000000-0000-0000-0000"; + await foreach (DatadogSubscriptionStatusResult item in subscriptionResource.GetSubscriptionStatusesAsync(datadogOrganizationId)) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSubscriptionStatus_CreationSupportedGet() + { + // Generated from example definition: specification/datadog/resource-manager/Microsoft.Datadog/stable/2025-06-11/examples/CreationSupported_Get.json + // this example is just showing the usage of "CreationSupported_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + string datadogOrganizationId = "00000000-0000-0000-0000"; + DatadogSubscriptionStatusResult result = await subscriptionResource.GetSubscriptionStatusAsync(datadogOrganizationId); + + Console.WriteLine($"Succeeded: {result}"); + } } }