From 45cd3bce239812ecae2c62bfb2d0d4b6c3aab78c Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 18 Dec 2024 05:19:40 +0000 Subject: [PATCH] CodeGen from PR 31548 in Azure/azure-rest-api-specs Merge 2b3a3acd005abf96ed67b9d39487b3c641cbd40e into f4acc746a68ef6503be5a95d24d208d4cb822f83 --- .../CHANGELOG.md | 35 ++- .../azure-resourcemanager-datadog/README.md | 4 +- .../azure-resourcemanager-datadog/SAMPLE.md | 84 ++++--- .../azure-resourcemanager-datadog/pom.xml | 3 +- .../datadog/MicrosoftDatadogManager.java | 18 +- .../datadog/fluent/BillingInfoesClient.java | 43 ++++ .../fluent/MicrosoftDatadogClient.java | 7 + .../datadog/fluent/OperationsClient.java | 4 +- .../models/BillingInfoResponseInner.java | 129 +++++++++++ .../fluent/models/LinkedResourceInner.java | 28 +++ .../BillingInfoResponseImpl.java | 38 ++++ .../BillingInfoesClientImpl.java | 188 ++++++++++++++++ .../implementation/BillingInfoesImpl.java | 57 +++++ .../CreationSupportedsClientImpl.java | 70 +++++- .../implementation/LinkedResourceImpl.java | 4 + .../MicrosoftDatadogClientImpl.java | 18 +- .../MonitoredSubscriptionsClientImpl.java | 70 +++++- .../implementation/OperationsClientImpl.java | 12 +- .../datadog/models/BillingInfoResponse.java | 33 +++ .../datadog/models/BillingInfoes.java | 38 ++++ .../CreateResourceSupportedResponseList.java | 28 +++ .../datadog/models/LinkedResource.java | 7 + .../datadog/models/MarketplaceSaaSInfo.java | 207 ++++++++++++++++++ .../MonitoredSubscriptionPropertiesList.java | 28 +++ .../models/MonitoringTagRulesProperties.java | 30 +++ .../datadog/models/Operations.java | 4 +- .../datadog/models/PartnerBillingEntity.java | 149 +++++++++++++ .../datadog/models/ResourceSku.java | 6 +- .../proxy-config.json | 2 +- .../generated/BillingInfoGetSamples.java | 23 ++ .../CreationSupportedGetSamples.java | 2 +- .../CreationSupportedListSamples.java | 2 +- ...tplaceAgreementsCreateOrUpdateSamples.java | 2 +- .../MarketplaceAgreementsListSamples.java | 2 +- ...redSubscriptionsCreateorUpdateSamples.java | 2 +- .../MonitoredSubscriptionsDeleteSamples.java | 2 +- .../MonitoredSubscriptionsGetSamples.java | 2 +- .../MonitoredSubscriptionsListSamples.java | 2 +- .../MonitoredSubscriptionsUpdateSamples.java | 2 +- .../generated/MonitorsCreateSamples.java | 2 +- .../generated/MonitorsDeleteSamples.java | 2 +- .../MonitorsGetByResourceGroupSamples.java | 2 +- .../MonitorsGetDefaultKeySamples.java | 2 +- .../generated/MonitorsListApiKeysSamples.java | 2 +- .../MonitorsListByResourceGroupSamples.java | 2 +- .../generated/MonitorsListHostsSamples.java | 2 +- .../MonitorsListLinkedResourcesSamples.java | 2 +- ...MonitorsListMonitoredResourcesSamples.java | 2 +- .../generated/MonitorsListSamples.java | 2 +- ...MonitorsRefreshSetPasswordLinkSamples.java | 2 +- .../MonitorsSetDefaultKeySamples.java | 2 +- .../generated/MonitorsUpdateSamples.java | 2 +- .../generated/OperationsListSamples.java | 2 +- ...OnConfigurationsCreateOrUpdateSamples.java | 2 +- .../SingleSignOnConfigurationsGetSamples.java | 2 +- ...SingleSignOnConfigurationsListSamples.java | 2 +- .../TagRulesCreateOrUpdateSamples.java | 2 +- .../datadog/generated/TagRulesGetSamples.java | 2 +- .../generated/TagRulesListSamples.java | 2 +- ...reateResourceSupportedPropertiesTests.java | 23 -- ...teResourceSupportedResponseInnerTests.java | 25 --- ...ateResourceSupportedResponseListTests.java | 28 --- ...ionSupportedsGetWithResponseMockTests.java | 36 --- .../CreationSupportedsListMockTests.java | 36 --- .../DatadogAgreementPropertiesTests.java | 48 ---- .../DatadogAgreementResourceInnerTests.java | 50 ----- ...dogAgreementResourceListResponseTests.java | 74 ------- .../generated/DatadogHostInnerTests.java | 51 ----- .../DatadogHostListResponseTests.java | 73 ------ .../generated/DatadogHostMetadataTests.java | 40 ---- .../generated/DatadogInstallMethodTests.java | 32 --- .../generated/DatadogLogsAgentTests.java | 24 -- ...gMonitorResourceUpdateParametersTests.java | 52 ----- .../DatadogSingleSignOnPropertiesTests.java | 31 --- ...DatadogSingleSignOnResourceInnerTests.java | 32 --- ...SingleSignOnResourceListResponseTests.java | 38 ---- .../datadog/generated/FilteringTagTests.java | 32 --- .../generated/IdentityPropertiesTests.java | 27 --- .../generated/LinkedResourceInnerTests.java | 25 --- .../LinkedResourceListResponseTests.java | 33 --- .../datadog/generated/LogRulesTests.java | 44 ---- ...tsCreateOrUpdateWithResponseMockTests.java | 57 ----- .../MarketplaceAgreementsListMockTests.java | 47 ---- .../datadog/generated/MetricRulesTests.java | 35 --- .../MonitorUpdatePropertiesTests.java | 29 --- .../MonitoredResourceInnerTests.java | 38 ---- .../MonitoredResourceListResponseTests.java | 59 ----- ...toredSubscriptionPropertiesInnerTests.java | 66 ------ ...itoredSubscriptionPropertiesListTests.java | 60 ----- .../generated/MonitoredSubscriptionTests.java | 68 ------ ...dSubscriptionsCreateorUpdateMockTests.java | 80 ------- ...MonitoredSubscriptionsDeleteMockTests.java | 34 --- ...SubscriptionsGetWithResponseMockTests.java | 47 ---- .../MonitoredSubscriptionsListMockTests.java | 49 ----- .../MonitoringTagRulesInnerTests.java | 61 ------ .../MonitoringTagRulesListResponseTests.java | 58 ----- .../MonitoringTagRulesPropertiesTests.java | 58 ----- .../generated/MonitorsDeleteMockTests.java | 33 --- .../generated/MonitorsListHostsMockTests.java | 46 ---- .../MonitorsListLinkedResourcesMockTests.java | 38 ---- ...nitorsListMonitoredResourcesMockTests.java | 43 ---- .../generated/OperationDisplayTests.java | 35 --- .../generated/OperationListResultTests.java | 54 ----- .../generated/OperationResultInnerTests.java | 42 ---- .../generated/OperationsListMockTests.java | 43 ---- .../datadog/generated/ResourceSkuTests.java | 24 -- ...ConfigurationsCreateOrUpdateMockTests.java | 45 ---- ...onfigurationsGetWithResponseMockTests.java | 41 ---- ...ngleSignOnConfigurationsListMockTests.java | 42 ---- .../generated/SubscriptionListTests.java | 86 -------- ...esCreateOrUpdateWithResponseMockTests.java | 68 ------ .../TagRulesGetWithResponseMockTests.java | 49 ----- .../generated/TagRulesListMockTests.java | 55 ----- .../datadog/generated/UserInfoTests.java | 31 --- 114 files changed, 1336 insertions(+), 2564 deletions(-) create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/BillingInfoesClient.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/BillingInfoResponseInner.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/BillingInfoResponseImpl.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/BillingInfoesClientImpl.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/BillingInfoesImpl.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/BillingInfoResponse.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/BillingInfoes.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MarketplaceSaaSInfo.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/PartnerBillingEntity.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/BillingInfoGetSamples.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/CreateResourceSupportedPropertiesTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/CreateResourceSupportedResponseInnerTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/CreateResourceSupportedResponseListTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/CreationSupportedsGetWithResponseMockTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/CreationSupportedsListMockTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogAgreementPropertiesTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogAgreementResourceInnerTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogAgreementResourceListResponseTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogHostInnerTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogHostListResponseTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogHostMetadataTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogInstallMethodTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogLogsAgentTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogMonitorResourceUpdateParametersTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogSingleSignOnPropertiesTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogSingleSignOnResourceInnerTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogSingleSignOnResourceListResponseTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/FilteringTagTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/IdentityPropertiesTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/LinkedResourceInnerTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/LinkedResourceListResponseTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/LogRulesTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsListMockTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MetricRulesTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitorUpdatePropertiesTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredResourceInnerTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredResourceListResponseTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionPropertiesInnerTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionPropertiesListTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsCreateorUpdateMockTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsDeleteMockTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsGetWithResponseMockTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsListMockTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoringTagRulesInnerTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoringTagRulesListResponseTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoringTagRulesPropertiesTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitorsDeleteMockTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitorsListHostsMockTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitorsListLinkedResourcesMockTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitorsListMonitoredResourcesMockTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/OperationDisplayTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/OperationListResultTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/OperationResultInnerTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/OperationsListMockTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/ResourceSkuTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsCreateOrUpdateMockTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsGetWithResponseMockTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsListMockTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/SubscriptionListTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/TagRulesCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/TagRulesGetWithResponseMockTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/TagRulesListMockTests.java delete mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/UserInfoTests.java diff --git a/sdk/datadog/azure-resourcemanager-datadog/CHANGELOG.md b/sdk/datadog/azure-resourcemanager-datadog/CHANGELOG.md index 87b1670e1e41f..9a1ded633c199 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/CHANGELOG.md +++ b/sdk/datadog/azure-resourcemanager-datadog/CHANGELOG.md @@ -1,14 +1,41 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2024-12-18) + +- Azure Resource Manager MicrosoftDatadog client library for Java. This package contains Microsoft Azure SDK for MicrosoftDatadog Management SDK. Package tag package-2023-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added -### Breaking Changes +* `models.BillingInfoResponse` was added + +* `models.PartnerBillingEntity` was added + +* `models.BillingInfoes` was added -### Bugs Fixed +* `models.MarketplaceSaaSInfo` was added + +#### `models.MonitoredSubscriptionPropertiesList` was modified + +* `withNextLink(java.lang.String)` was added +* `nextLink()` was added + +#### `MicrosoftDatadogManager` was modified + +* `billingInfoes()` was added + +#### `models.LinkedResource` was modified + +* `location()` was added + +#### `models.CreateResourceSupportedResponseList` was modified + +* `withNextLink(java.lang.String)` was added +* `nextLink()` was added + +#### `models.MonitoringTagRulesProperties` was modified -### Other Changes +* `customMetrics()` was added +* `withCustomMetrics(java.lang.Boolean)` was added ## 1.1.0 (2024-12-11) diff --git a/sdk/datadog/azure-resourcemanager-datadog/README.md b/sdk/datadog/azure-resourcemanager-datadog/README.md index c96a4ae188780..c46ae95cc9f5e 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/README.md +++ b/sdk/datadog/azure-resourcemanager-datadog/README.md @@ -2,7 +2,7 @@ Azure Resource Manager MicrosoftDatadog client library for Java. -This package contains Microsoft Azure SDK for MicrosoftDatadog Management SDK. Package tag package-2023-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for MicrosoftDatadog Management SDK. Package tag package-2023-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-datadog - 1.1.0 + 1.2.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/datadog/azure-resourcemanager-datadog/SAMPLE.md b/sdk/datadog/azure-resourcemanager-datadog/SAMPLE.md index 57ce6134c1396..c93fb02a9e8a8 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/SAMPLE.md +++ b/sdk/datadog/azure-resourcemanager-datadog/SAMPLE.md @@ -1,6 +1,10 @@ # Code snippets and samples +## BillingInfo + +- [Get](#billinginfo_get) + ## CreationSupported - [Get](#creationsupported_get) @@ -50,6 +54,28 @@ - [CreateOrUpdate](#tagrules_createorupdate) - [Get](#tagrules_get) - [List](#tagrules_list) +### BillingInfo_Get + +```java +/** + * Samples for BillingInfo Get. + */ +public final class BillingInfoGetSamples { + /* + * x-ms-original-file: + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/BillingInfo_Get.json + */ + /** + * Sample code: BillingInfo_Get. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void billingInfoGet(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.billingInfoes().getWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} +``` + ### CreationSupported_Get ```java @@ -59,7 +85,7 @@ public final class CreationSupportedGetSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/CreationSupported_Get.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/CreationSupported_Get.json */ /** * Sample code: CreationSupported_Get. @@ -81,7 +107,7 @@ public final class CreationSupportedGetSamples { public final class CreationSupportedListSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/CreationSupported_List.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/CreationSupported_List.json */ /** * Sample code: CreationSupported_List. @@ -106,7 +132,7 @@ import com.azure.resourcemanager.datadog.models.DatadogAgreementProperties; public final class MarketplaceAgreementsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/MarketplaceAgreements_Create. + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/MarketplaceAgreements_Create. * json */ /** @@ -133,7 +159,7 @@ public final class MarketplaceAgreementsCreateOrUpdateSamples { public final class MarketplaceAgreementsListSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/MarketplaceAgreements_List. + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/MarketplaceAgreements_List. * json */ /** @@ -166,7 +192,7 @@ import java.util.Arrays; */ public final class MonitoredSubscriptionsCreateorUpdateSamples { /* - * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/ + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/ * MonitoredSubscriptions_CreateorUpdate.json */ /** @@ -221,7 +247,7 @@ public final class MonitoredSubscriptionsCreateorUpdateSamples { public final class MonitoredSubscriptionsDeleteSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/MonitoredSubscriptions_Delete + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/MonitoredSubscriptions_Delete * .json */ /** @@ -246,7 +272,7 @@ public final class MonitoredSubscriptionsDeleteSamples { public final class MonitoredSubscriptionsGetSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/MonitoredSubscriptions_Get. + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/MonitoredSubscriptions_Get. * json */ /** @@ -271,7 +297,7 @@ public final class MonitoredSubscriptionsGetSamples { public final class MonitoredSubscriptionsListSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/MonitoredSubscriptions_List. + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/MonitoredSubscriptions_List. * json */ /** @@ -307,7 +333,7 @@ import java.util.Arrays; public final class MonitoredSubscriptionsUpdateSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/MonitoredSubscriptions_Update + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/MonitoredSubscriptions_Update * .json */ /** @@ -371,7 +397,7 @@ import java.util.Map; public final class MonitorsCreateSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Monitors_Create.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/Monitors_Create.json */ /** * Sample code: Monitors_Create. @@ -421,7 +447,7 @@ public final class MonitorsCreateSamples { public final class MonitorsDeleteSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Monitors_Delete.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/Monitors_Delete.json */ /** * Sample code: Monitors_Delete. @@ -443,7 +469,7 @@ public final class MonitorsDeleteSamples { public final class MonitorsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Monitors_Get.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/Monitors_Get.json */ /** * Sample code: Monitors_Get. @@ -466,7 +492,7 @@ public final class MonitorsGetByResourceGroupSamples { public final class MonitorsGetDefaultKeySamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/ApiKeys_GetDefaultKey.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/ApiKeys_GetDefaultKey.json */ /** * Sample code: Monitors_GetDefaultKey. @@ -488,7 +514,7 @@ public final class MonitorsGetDefaultKeySamples { public final class MonitorsListSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Monitors_List.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/Monitors_List.json */ /** * Sample code: Monitors_List. @@ -510,7 +536,7 @@ public final class MonitorsListSamples { public final class MonitorsListApiKeysSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/ApiKeys_List.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/ApiKeys_List.json */ /** * Sample code: Monitors_ListApiKeys. @@ -532,7 +558,7 @@ public final class MonitorsListApiKeysSamples { public final class MonitorsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Monitors_ListByResourceGroup. + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/Monitors_ListByResourceGroup. * json */ /** @@ -555,7 +581,7 @@ public final class MonitorsListByResourceGroupSamples { public final class MonitorsListHostsSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Hosts_List.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/Hosts_List.json */ /** * Sample code: Monitors_ListHosts. @@ -577,7 +603,7 @@ public final class MonitorsListHostsSamples { public final class MonitorsListLinkedResourcesSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/LinkedResources_List.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/LinkedResources_List.json */ /** * Sample code: Monitors_ListLinkedResources. @@ -599,7 +625,7 @@ public final class MonitorsListLinkedResourcesSamples { public final class MonitorsListMonitoredResourcesSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/MonitoredResources_List.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/MonitoredResources_List.json */ /** * Sample code: Monitors_ListMonitoredResources. @@ -622,7 +648,7 @@ public final class MonitorsListMonitoredResourcesSamples { public final class MonitorsRefreshSetPasswordLinkSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/RefreshSetPassword_Get.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/RefreshSetPassword_Get.json */ /** * Sample code: Monitors_RefreshSetPasswordLink. @@ -648,7 +674,7 @@ import com.azure.resourcemanager.datadog.fluent.models.DatadogApiKeyInner; public final class MonitorsSetDefaultKeySamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/ApiKeys_SetDefaultKey.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/ApiKeys_SetDefaultKey.json */ /** * Sample code: Monitors_SetDefaultKey. @@ -678,7 +704,7 @@ import java.util.Map; public final class MonitorsUpdateSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Monitors_Update.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/Monitors_Update.json */ /** * Sample code: Monitors_Update. @@ -718,7 +744,7 @@ public final class MonitorsUpdateSamples { public final class OperationsListSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Operations_List.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/Operations_List.json */ /** * Sample code: Operations_List. @@ -742,7 +768,7 @@ import com.azure.resourcemanager.datadog.models.SingleSignOnStates; */ public final class SingleSignOnConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/ + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/ * SingleSignOnConfigurations_CreateOrUpdate.json */ /** @@ -770,7 +796,7 @@ public final class SingleSignOnConfigurationsCreateOrUpdateSamples { */ public final class SingleSignOnConfigurationsGetSamples { /* - * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/ + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/ * SingleSignOnConfigurations_Get.json */ /** @@ -794,7 +820,7 @@ public final class SingleSignOnConfigurationsGetSamples { */ public final class SingleSignOnConfigurationsListSamples { /* - * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/ + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/ * SingleSignOnConfigurations_List.json */ /** @@ -825,7 +851,7 @@ import java.util.Arrays; public final class TagRulesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/TagRules_CreateOrUpdate.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/TagRules_CreateOrUpdate.json */ /** * Sample code: TagRules_CreateOrUpdate. @@ -859,7 +885,7 @@ public final class TagRulesCreateOrUpdateSamples { public final class TagRulesGetSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/TagRules_Get.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/TagRules_Get.json */ /** * Sample code: TagRules_Get. @@ -881,7 +907,7 @@ public final class TagRulesGetSamples { public final class TagRulesListSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/TagRules_List.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/TagRules_List.json */ /** * Sample code: TagRules_List. diff --git a/sdk/datadog/azure-resourcemanager-datadog/pom.xml b/sdk/datadog/azure-resourcemanager-datadog/pom.xml index cc4f8839b4245..5d628608b6b02 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/pom.xml +++ b/sdk/datadog/azure-resourcemanager-datadog/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for MicrosoftDatadog Management - This package contains Microsoft Azure SDK for MicrosoftDatadog Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2023-01. + This package contains Microsoft Azure SDK for MicrosoftDatadog Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2023-10. https://github.com/Azure/azure-sdk-for-java @@ -45,6 +45,7 @@ UTF-8 0 0 + true false diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/MicrosoftDatadogManager.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/MicrosoftDatadogManager.java index 683e283739ce1..2261fae27e9e3 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/MicrosoftDatadogManager.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/MicrosoftDatadogManager.java @@ -24,6 +24,7 @@ import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datadog.fluent.MicrosoftDatadogClient; +import com.azure.resourcemanager.datadog.implementation.BillingInfoesImpl; import com.azure.resourcemanager.datadog.implementation.CreationSupportedsImpl; import com.azure.resourcemanager.datadog.implementation.MarketplaceAgreementsImpl; import com.azure.resourcemanager.datadog.implementation.MicrosoftDatadogClientBuilder; @@ -32,6 +33,7 @@ import com.azure.resourcemanager.datadog.implementation.OperationsImpl; import com.azure.resourcemanager.datadog.implementation.SingleSignOnConfigurationsImpl; import com.azure.resourcemanager.datadog.implementation.TagRulesImpl; +import com.azure.resourcemanager.datadog.models.BillingInfoes; import com.azure.resourcemanager.datadog.models.CreationSupporteds; import com.azure.resourcemanager.datadog.models.MarketplaceAgreements; import com.azure.resourcemanager.datadog.models.MonitoredSubscriptions; @@ -58,6 +60,8 @@ public final class MicrosoftDatadogManager { private Operations operations; + private BillingInfoes billingInfoes; + private TagRules tagRules; private SingleSignOnConfigurations singleSignOnConfigurations; @@ -228,7 +232,7 @@ public MicrosoftDatadogManager authenticate(TokenCredential credential, AzurePro .append("-") .append("com.azure.resourcemanager.datadog") .append("/") - .append("1.1.0"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -322,6 +326,18 @@ public Operations operations() { return operations; } + /** + * Gets the resource collection API of BillingInfoes. + * + * @return Resource collection API of BillingInfoes. + */ + public BillingInfoes billingInfoes() { + if (this.billingInfoes == null) { + this.billingInfoes = new BillingInfoesImpl(clientObject.getBillingInfoes(), this); + } + return billingInfoes; + } + /** * Gets the resource collection API of TagRules. It manages MonitoringTagRules. * diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/BillingInfoesClient.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/BillingInfoesClient.java new file mode 100644 index 0000000000000..99a26cbec5cd0 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/BillingInfoesClient.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.datadog.fluent.models.BillingInfoResponseInner; + +/** + * An instance of this class provides access to all the operations defined in BillingInfoesClient. + */ +public interface BillingInfoesClient { + /** + * Get marketplace and organization info mapped to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace and organization info mapped to the given monitor along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String monitorName, Context context); + + /** + * Get marketplace and organization info mapped to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace and organization info mapped to the given monitor. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BillingInfoResponseInner get(String resourceGroupName, String monitorName); +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/MicrosoftDatadogClient.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/MicrosoftDatadogClient.java index c29a855602336..1fd95a6197ecf 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/MicrosoftDatadogClient.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/MicrosoftDatadogClient.java @@ -74,6 +74,13 @@ public interface MicrosoftDatadogClient { */ OperationsClient getOperations(); + /** + * Gets the BillingInfoesClient object to access its operations. + * + * @return the BillingInfoesClient object. + */ + BillingInfoesClient getBillingInfoes(); + /** * Gets the TagRulesClient object to access its operations. * diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/OperationsClient.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/OperationsClient.java index e8be6b7b693fe..3f773ed4cf71e 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/OperationsClient.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/OperationsClient.java @@ -15,7 +15,7 @@ */ public interface OperationsClient { /** - * List all operations provided by Microsoft.Datadog for the 2023-01-01 api version. + * List all operations provided by Microsoft.Datadog for the 2023-10-20 api version. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -26,7 +26,7 @@ public interface OperationsClient { PagedIterable list(); /** - * List all operations provided by Microsoft.Datadog for the 2023-01-01 api version. + * List all operations provided by Microsoft.Datadog for the 2023-10-20 api version. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/BillingInfoResponseInner.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/BillingInfoResponseInner.java new file mode 100644 index 0000000000000..4752495834926 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/BillingInfoResponseInner.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.datadog.models.MarketplaceSaaSInfo; +import com.azure.resourcemanager.datadog.models.PartnerBillingEntity; +import java.io.IOException; + +/** + * Marketplace Subscription and Organization details to which resource gets billed into. + */ +@Fluent +public final class BillingInfoResponseInner implements JsonSerializable { + /* + * Marketplace Subscription details + */ + private MarketplaceSaaSInfo marketplaceSaasInfo; + + /* + * Partner Billing Entity details: Organization Info + */ + private PartnerBillingEntity partnerBillingEntity; + + /** + * Creates an instance of BillingInfoResponseInner class. + */ + public BillingInfoResponseInner() { + } + + /** + * Get the marketplaceSaasInfo property: Marketplace Subscription details. + * + * @return the marketplaceSaasInfo value. + */ + public MarketplaceSaaSInfo marketplaceSaasInfo() { + return this.marketplaceSaasInfo; + } + + /** + * Set the marketplaceSaasInfo property: Marketplace Subscription details. + * + * @param marketplaceSaasInfo the marketplaceSaasInfo value to set. + * @return the BillingInfoResponseInner object itself. + */ + public BillingInfoResponseInner withMarketplaceSaasInfo(MarketplaceSaaSInfo marketplaceSaasInfo) { + this.marketplaceSaasInfo = marketplaceSaasInfo; + return this; + } + + /** + * Get the partnerBillingEntity property: Partner Billing Entity details: Organization Info. + * + * @return the partnerBillingEntity value. + */ + public PartnerBillingEntity partnerBillingEntity() { + return this.partnerBillingEntity; + } + + /** + * Set the partnerBillingEntity property: Partner Billing Entity details: Organization Info. + * + * @param partnerBillingEntity the partnerBillingEntity value to set. + * @return the BillingInfoResponseInner object itself. + */ + public BillingInfoResponseInner withPartnerBillingEntity(PartnerBillingEntity partnerBillingEntity) { + this.partnerBillingEntity = partnerBillingEntity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (marketplaceSaasInfo() != null) { + marketplaceSaasInfo().validate(); + } + if (partnerBillingEntity() != null) { + partnerBillingEntity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("marketplaceSaasInfo", this.marketplaceSaasInfo); + jsonWriter.writeJsonField("partnerBillingEntity", this.partnerBillingEntity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of BillingInfoResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of BillingInfoResponseInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the BillingInfoResponseInner. + */ + public static BillingInfoResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + BillingInfoResponseInner deserializedBillingInfoResponseInner = new BillingInfoResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("marketplaceSaasInfo".equals(fieldName)) { + deserializedBillingInfoResponseInner.marketplaceSaasInfo = MarketplaceSaaSInfo.fromJson(reader); + } else if ("partnerBillingEntity".equals(fieldName)) { + deserializedBillingInfoResponseInner.partnerBillingEntity = PartnerBillingEntity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedBillingInfoResponseInner; + }); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/LinkedResourceInner.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/LinkedResourceInner.java index a8fb4f8fa250d..a521d8f51369b 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/LinkedResourceInner.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/LinkedResourceInner.java @@ -21,6 +21,11 @@ public final class LinkedResourceInner implements JsonSerializable> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get marketplace and organization info mapped to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace and organization info mapped to the given monitor along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String monitorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, monitorName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get marketplace and organization info mapped to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace and organization info mapped to the given monitor along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String monitorName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (monitorName == null) { + return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, accept, context); + } + + /** + * Get marketplace and organization info mapped to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace and organization info mapped to the given monitor on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String monitorName) { + return getWithResponseAsync(resourceGroupName, monitorName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get marketplace and organization info mapped to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace and organization info mapped to the given monitor along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String monitorName, + Context context) { + return getWithResponseAsync(resourceGroupName, monitorName, context).block(); + } + + /** + * Get marketplace and organization info mapped to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace and organization info mapped to the given monitor. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BillingInfoResponseInner get(String resourceGroupName, String monitorName) { + return getWithResponse(resourceGroupName, monitorName, Context.NONE).getValue(); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/BillingInfoesImpl.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/BillingInfoesImpl.java new file mode 100644 index 0000000000000..82631556f7221 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/BillingInfoesImpl.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.datadog.fluent.BillingInfoesClient; +import com.azure.resourcemanager.datadog.fluent.models.BillingInfoResponseInner; +import com.azure.resourcemanager.datadog.models.BillingInfoResponse; +import com.azure.resourcemanager.datadog.models.BillingInfoes; + +public final class BillingInfoesImpl implements BillingInfoes { + private static final ClientLogger LOGGER = new ClientLogger(BillingInfoesImpl.class); + + private final BillingInfoesClient innerClient; + + private final com.azure.resourcemanager.datadog.MicrosoftDatadogManager serviceManager; + + public BillingInfoesImpl(BillingInfoesClient innerClient, + com.azure.resourcemanager.datadog.MicrosoftDatadogManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String monitorName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, monitorName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new BillingInfoResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BillingInfoResponse get(String resourceGroupName, String monitorName) { + BillingInfoResponseInner inner = this.serviceClient().get(resourceGroupName, monitorName); + if (inner != null) { + return new BillingInfoResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + private BillingInfoesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/CreationSupportedsClientImpl.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/CreationSupportedsClientImpl.java index 3033e1967d39c..c78b391c1d659 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/CreationSupportedsClientImpl.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/CreationSupportedsClientImpl.java @@ -79,6 +79,14 @@ Mono> get(@HostParam("$host") Str @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @QueryParam("datadogOrganizationId") String datadogOrganizationId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** @@ -110,7 +118,7 @@ Mono> get(@HostParam("$host") Str .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), datadogOrganizationId, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -145,7 +153,7 @@ private Mono> listSinglePage .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), datadogOrganizationId, accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); + res.getValue().value(), res.getValue().nextLink(), null)); } /** @@ -159,7 +167,8 @@ private Mono> listSinglePage */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String datadogOrganizationId) { - return new PagedFlux<>(() -> listSinglePageAsync(datadogOrganizationId)); + return new PagedFlux<>(() -> listSinglePageAsync(datadogOrganizationId), + nextLink -> listNextSinglePageAsync(nextLink)); } /** @@ -174,7 +183,8 @@ private PagedFlux listAsync(String datadog */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String datadogOrganizationId, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(datadogOrganizationId, context)); + return new PagedFlux<>(() -> listSinglePageAsync(datadogOrganizationId, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** @@ -312,4 +322,56 @@ public Response getWithResponse(String dat public CreateResourceSupportedResponseInner get(String datadogOrganizationId) { return getWithResponse(datadogOrganizationId, Context.NONE).getValue(); } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } } diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/LinkedResourceImpl.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/LinkedResourceImpl.java index 28a20be87f95a..5d4f3f3723225 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/LinkedResourceImpl.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/LinkedResourceImpl.java @@ -22,6 +22,10 @@ public String id() { return this.innerModel().id(); } + public String location() { + return this.innerModel().location(); + } + public LinkedResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MicrosoftDatadogClientImpl.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MicrosoftDatadogClientImpl.java index 651121c68cc71..1b5a0f6a1d7f6 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MicrosoftDatadogClientImpl.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MicrosoftDatadogClientImpl.java @@ -23,6 +23,7 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.datadog.fluent.BillingInfoesClient; import com.azure.resourcemanager.datadog.fluent.CreationSupportedsClient; import com.azure.resourcemanager.datadog.fluent.MarketplaceAgreementsClient; import com.azure.resourcemanager.datadog.fluent.MicrosoftDatadogClient; @@ -185,6 +186,20 @@ public OperationsClient getOperations() { return this.operations; } + /** + * The BillingInfoesClient object to access its operations. + */ + private final BillingInfoesClient billingInfoes; + + /** + * Gets the BillingInfoesClient object to access its operations. + * + * @return the BillingInfoesClient object. + */ + public BillingInfoesClient getBillingInfoes() { + return this.billingInfoes; + } + /** * The TagRulesClient object to access its operations. */ @@ -244,11 +259,12 @@ public MonitoredSubscriptionsClient getMonitoredSubscriptions() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-01-01"; + this.apiVersion = "2023-10-20"; this.marketplaceAgreements = new MarketplaceAgreementsClientImpl(this); this.creationSupporteds = new CreationSupportedsClientImpl(this); this.monitors = new MonitorsClientImpl(this); this.operations = new OperationsClientImpl(this); + this.billingInfoes = new BillingInfoesClientImpl(this); this.tagRules = new TagRulesClientImpl(this); this.singleSignOnConfigurations = new SingleSignOnConfigurationsClientImpl(this); this.monitoredSubscriptions = new MonitoredSubscriptionsClientImpl(this); diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MonitoredSubscriptionsClientImpl.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MonitoredSubscriptionsClientImpl.java index dfe427a1e588e..a13555160b59d 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MonitoredSubscriptionsClientImpl.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MonitoredSubscriptionsClientImpl.java @@ -121,6 +121,14 @@ Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, @PathParam("configurationName") String configurationName, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** @@ -156,7 +164,7 @@ private Mono> listSinglePage .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, this.client.getApiVersion(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -195,7 +203,7 @@ private Mono> listSinglePage .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, this.client.getApiVersion(), accept, context) .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); + res.getValue().value(), res.getValue().nextLink(), null)); } /** @@ -210,7 +218,8 @@ private Mono> listSinglePage */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String monitorName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** @@ -227,7 +236,8 @@ private PagedFlux listAsync(String resourc @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String monitorName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, context)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** @@ -1225,4 +1235,56 @@ public void delete(String resourceGroupName, String monitorName, String configur public void delete(String resourceGroupName, String monitorName, String configurationName, Context context) { deleteAsync(resourceGroupName, monitorName, configurationName, context).block(); } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } } diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/OperationsClientImpl.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/OperationsClientImpl.java index e4e8679bcd549..0cd7cc631f0fa 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/OperationsClientImpl.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/OperationsClientImpl.java @@ -78,7 +78,7 @@ Mono> listNext(@PathParam(value = "nextLink", enco } /** - * List all operations provided by Microsoft.Datadog for the 2023-01-01 api version. + * List all operations provided by Microsoft.Datadog for the 2023-10-20 api version. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -101,7 +101,7 @@ private Mono> listSinglePageAsync() { } /** - * List all operations provided by Microsoft.Datadog for the 2023-01-01 api version. + * List all operations provided by Microsoft.Datadog for the 2023-10-20 api version. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -124,7 +124,7 @@ private Mono> listSinglePageAsync(Context co } /** - * List all operations provided by Microsoft.Datadog for the 2023-01-01 api version. + * List all operations provided by Microsoft.Datadog for the 2023-10-20 api version. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -137,7 +137,7 @@ private PagedFlux listAsync() { } /** - * List all operations provided by Microsoft.Datadog for the 2023-01-01 api version. + * List all operations provided by Microsoft.Datadog for the 2023-10-20 api version. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -153,7 +153,7 @@ private PagedFlux listAsync(Context context) { } /** - * List all operations provided by Microsoft.Datadog for the 2023-01-01 api version. + * List all operations provided by Microsoft.Datadog for the 2023-10-20 api version. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -166,7 +166,7 @@ public PagedIterable list() { } /** - * List all operations provided by Microsoft.Datadog for the 2023-01-01 api version. + * List all operations provided by Microsoft.Datadog for the 2023-10-20 api version. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/BillingInfoResponse.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/BillingInfoResponse.java new file mode 100644 index 0000000000000..c0dc6d04d3db4 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/BillingInfoResponse.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.models; + +import com.azure.resourcemanager.datadog.fluent.models.BillingInfoResponseInner; + +/** + * An immutable client-side representation of BillingInfoResponse. + */ +public interface BillingInfoResponse { + /** + * Gets the marketplaceSaasInfo property: Marketplace Subscription details. + * + * @return the marketplaceSaasInfo value. + */ + MarketplaceSaaSInfo marketplaceSaasInfo(); + + /** + * Gets the partnerBillingEntity property: Partner Billing Entity details: Organization Info. + * + * @return the partnerBillingEntity value. + */ + PartnerBillingEntity partnerBillingEntity(); + + /** + * Gets the inner com.azure.resourcemanager.datadog.fluent.models.BillingInfoResponseInner object. + * + * @return the inner object. + */ + BillingInfoResponseInner innerModel(); +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/BillingInfoes.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/BillingInfoes.java new file mode 100644 index 0000000000000..8ac6df927e867 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/BillingInfoes.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of BillingInfoes. + */ +public interface BillingInfoes { + /** + * Get marketplace and organization info mapped to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace and organization info mapped to the given monitor along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String monitorName, Context context); + + /** + * Get marketplace and organization info mapped to the given monitor. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param monitorName Monitor resource name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return marketplace and organization info mapped to the given monitor. + */ + BillingInfoResponse get(String resourceGroupName, String monitorName); +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/CreateResourceSupportedResponseList.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/CreateResourceSupportedResponseList.java index 3c28c22689877..cbb34a4109e43 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/CreateResourceSupportedResponseList.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/CreateResourceSupportedResponseList.java @@ -24,6 +24,11 @@ public final class CreateResourceSupportedResponseList */ private List value; + /* + * Link to the next set of results, if any. + */ + private String nextLink; + /** * Creates an instance of CreateResourceSupportedResponseList class. */ @@ -50,6 +55,26 @@ public CreateResourceSupportedResponseList withValue(List writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -91,6 +117,8 @@ public static CreateResourceSupportedResponseList fromJson(JsonReader jsonReader List value = reader.readArray(reader1 -> CreateResourceSupportedResponseInner.fromJson(reader1)); deserializedCreateResourceSupportedResponseList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedCreateResourceSupportedResponseList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/LinkedResource.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/LinkedResource.java index 22e0a8008bd87..05fbec3b9c281 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/LinkedResource.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/LinkedResource.java @@ -17,6 +17,13 @@ public interface LinkedResource { */ String id(); + /** + * Gets the location property: The location of the linked resource. + * + * @return the location value. + */ + String location(); + /** * Gets the inner com.azure.resourcemanager.datadog.fluent.models.LinkedResourceInner object. * diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MarketplaceSaaSInfo.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MarketplaceSaaSInfo.java new file mode 100644 index 0000000000000..e78ec85299a78 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MarketplaceSaaSInfo.java @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Marketplace SAAS Info of the resource. + */ +@Fluent +public final class MarketplaceSaaSInfo implements JsonSerializable { + /* + * Marketplace Subscription Id. This is a GUID-formatted string. + */ + private String marketplaceSubscriptionId; + + /* + * Marketplace Subscription Details: SAAS Name + */ + private String marketplaceName; + + /* + * Marketplace Subscription Details: SaaS Subscription Status + */ + private String marketplaceStatus; + + /* + * The Azure Subscription ID to which the Marketplace Subscription belongs and gets billed into. + */ + private String billedAzureSubscriptionId; + + /* + * Flag specifying if the Marketplace status is subscribed or not. + */ + private Boolean subscribed; + + /** + * Creates an instance of MarketplaceSaaSInfo class. + */ + public MarketplaceSaaSInfo() { + } + + /** + * Get the marketplaceSubscriptionId property: Marketplace Subscription Id. This is a GUID-formatted string. + * + * @return the marketplaceSubscriptionId value. + */ + public String marketplaceSubscriptionId() { + return this.marketplaceSubscriptionId; + } + + /** + * Set the marketplaceSubscriptionId property: Marketplace Subscription Id. This is a GUID-formatted string. + * + * @param marketplaceSubscriptionId the marketplaceSubscriptionId value to set. + * @return the MarketplaceSaaSInfo object itself. + */ + public MarketplaceSaaSInfo withMarketplaceSubscriptionId(String marketplaceSubscriptionId) { + this.marketplaceSubscriptionId = marketplaceSubscriptionId; + return this; + } + + /** + * Get the marketplaceName property: Marketplace Subscription Details: SAAS Name. + * + * @return the marketplaceName value. + */ + public String marketplaceName() { + return this.marketplaceName; + } + + /** + * Set the marketplaceName property: Marketplace Subscription Details: SAAS Name. + * + * @param marketplaceName the marketplaceName value to set. + * @return the MarketplaceSaaSInfo object itself. + */ + public MarketplaceSaaSInfo withMarketplaceName(String marketplaceName) { + this.marketplaceName = marketplaceName; + return this; + } + + /** + * Get the marketplaceStatus property: Marketplace Subscription Details: SaaS Subscription Status. + * + * @return the marketplaceStatus value. + */ + public String marketplaceStatus() { + return this.marketplaceStatus; + } + + /** + * Set the marketplaceStatus property: Marketplace Subscription Details: SaaS Subscription Status. + * + * @param marketplaceStatus the marketplaceStatus value to set. + * @return the MarketplaceSaaSInfo object itself. + */ + public MarketplaceSaaSInfo withMarketplaceStatus(String marketplaceStatus) { + this.marketplaceStatus = marketplaceStatus; + return this; + } + + /** + * Get the billedAzureSubscriptionId property: The Azure Subscription ID to which the Marketplace Subscription + * belongs and gets billed into. + * + * @return the billedAzureSubscriptionId value. + */ + public String billedAzureSubscriptionId() { + return this.billedAzureSubscriptionId; + } + + /** + * Set the billedAzureSubscriptionId property: The Azure Subscription ID to which the Marketplace Subscription + * belongs and gets billed into. + * + * @param billedAzureSubscriptionId the billedAzureSubscriptionId value to set. + * @return the MarketplaceSaaSInfo object itself. + */ + public MarketplaceSaaSInfo withBilledAzureSubscriptionId(String billedAzureSubscriptionId) { + this.billedAzureSubscriptionId = billedAzureSubscriptionId; + return this; + } + + /** + * Get the subscribed property: Flag specifying if the Marketplace status is subscribed or not. + * + * @return the subscribed value. + */ + public Boolean subscribed() { + return this.subscribed; + } + + /** + * Set the subscribed property: Flag specifying if the Marketplace status is subscribed or not. + * + * @param subscribed the subscribed value to set. + * @return the MarketplaceSaaSInfo object itself. + */ + public MarketplaceSaaSInfo withSubscribed(Boolean subscribed) { + this.subscribed = subscribed; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("marketplaceSubscriptionId", this.marketplaceSubscriptionId); + jsonWriter.writeStringField("marketplaceName", this.marketplaceName); + jsonWriter.writeStringField("marketplaceStatus", this.marketplaceStatus); + jsonWriter.writeStringField("billedAzureSubscriptionId", this.billedAzureSubscriptionId); + jsonWriter.writeBooleanField("subscribed", this.subscribed); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MarketplaceSaaSInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MarketplaceSaaSInfo if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the MarketplaceSaaSInfo. + */ + public static MarketplaceSaaSInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MarketplaceSaaSInfo deserializedMarketplaceSaaSInfo = new MarketplaceSaaSInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("marketplaceSubscriptionId".equals(fieldName)) { + deserializedMarketplaceSaaSInfo.marketplaceSubscriptionId = reader.getString(); + } else if ("marketplaceName".equals(fieldName)) { + deserializedMarketplaceSaaSInfo.marketplaceName = reader.getString(); + } else if ("marketplaceStatus".equals(fieldName)) { + deserializedMarketplaceSaaSInfo.marketplaceStatus = reader.getString(); + } else if ("billedAzureSubscriptionId".equals(fieldName)) { + deserializedMarketplaceSaaSInfo.billedAzureSubscriptionId = reader.getString(); + } else if ("subscribed".equals(fieldName)) { + deserializedMarketplaceSaaSInfo.subscribed = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedMarketplaceSaaSInfo; + }); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoredSubscriptionPropertiesList.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoredSubscriptionPropertiesList.java index 25b7e7bd0b2f0..8544896eb778a 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoredSubscriptionPropertiesList.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoredSubscriptionPropertiesList.java @@ -24,6 +24,11 @@ public final class MonitoredSubscriptionPropertiesList */ private List value; + /* + * Link to the next set of results, if any. + */ + private String nextLink; + /** * Creates an instance of MonitoredSubscriptionPropertiesList class. */ @@ -50,6 +55,26 @@ public MonitoredSubscriptionPropertiesList withValue(List writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -91,6 +117,8 @@ public static MonitoredSubscriptionPropertiesList fromJson(JsonReader jsonReader List value = reader.readArray(reader1 -> MonitoredSubscriptionPropertiesInner.fromJson(reader1)); deserializedMonitoredSubscriptionPropertiesList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedMonitoredSubscriptionPropertiesList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoringTagRulesProperties.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoringTagRulesProperties.java index 8479c37ea63ff..a1ccd1b013d6d 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoringTagRulesProperties.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoringTagRulesProperties.java @@ -36,6 +36,11 @@ public final class MonitoringTagRulesProperties implements JsonSerializable list(); /** - * List all operations provided by Microsoft.Datadog for the 2023-01-01 api version. + * List all operations provided by Microsoft.Datadog for the 2023-10-20 api version. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/PartnerBillingEntity.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/PartnerBillingEntity.java new file mode 100644 index 0000000000000..3d904c5c01b9a --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/PartnerBillingEntity.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Partner Billing details associated with the resource. + */ +@Fluent +public final class PartnerBillingEntity implements JsonSerializable { + /* + * The Datadog Organization Id. + */ + private String id; + + /* + * The Datadog Organization Name. + */ + private String name; + + /* + * Link to the datadog organization page + */ + private String partnerEntityUri; + + /** + * Creates an instance of PartnerBillingEntity class. + */ + public PartnerBillingEntity() { + } + + /** + * Get the id property: The Datadog Organization Id. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The Datadog Organization Id. + * + * @param id the id value to set. + * @return the PartnerBillingEntity object itself. + */ + public PartnerBillingEntity withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: The Datadog Organization Name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The Datadog Organization Name. + * + * @param name the name value to set. + * @return the PartnerBillingEntity object itself. + */ + public PartnerBillingEntity withName(String name) { + this.name = name; + return this; + } + + /** + * Get the partnerEntityUri property: Link to the datadog organization page. + * + * @return the partnerEntityUri value. + */ + public String partnerEntityUri() { + return this.partnerEntityUri; + } + + /** + * Set the partnerEntityUri property: Link to the datadog organization page. + * + * @param partnerEntityUri the partnerEntityUri value to set. + * @return the PartnerBillingEntity object itself. + */ + public PartnerBillingEntity withPartnerEntityUri(String partnerEntityUri) { + this.partnerEntityUri = partnerEntityUri; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("partnerEntityUri", this.partnerEntityUri); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PartnerBillingEntity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PartnerBillingEntity if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the PartnerBillingEntity. + */ + public static PartnerBillingEntity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PartnerBillingEntity deserializedPartnerBillingEntity = new PartnerBillingEntity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPartnerBillingEntity.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPartnerBillingEntity.name = reader.getString(); + } else if ("partnerEntityUri".equals(fieldName)) { + deserializedPartnerBillingEntity.partnerEntityUri = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPartnerBillingEntity; + }); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/ResourceSku.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/ResourceSku.java index dadbbae6e45c4..51b57bee8944d 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/ResourceSku.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/ResourceSku.java @@ -18,7 +18,7 @@ @Fluent public final class ResourceSku implements JsonSerializable { /* - * Name of the SKU in {PlanId} format. For Terraform, the only allowed value is 'linking'. + * Name of the SKU in {PlanId} format. For Terraform, the only allowed value is 'Linked'. */ private String name; @@ -29,7 +29,7 @@ public ResourceSku() { } /** - * Get the name property: Name of the SKU in {PlanId} format. For Terraform, the only allowed value is 'linking'. + * Get the name property: Name of the SKU in {PlanId} format. For Terraform, the only allowed value is 'Linked'. * * @return the name value. */ @@ -38,7 +38,7 @@ public String name() { } /** - * Set the name property: Name of the SKU in {PlanId} format. For Terraform, the only allowed value is 'linking'. + * Set the name property: Name of the SKU in {PlanId} format. For Terraform, the only allowed value is 'Linked'. * * @param name the name value to set. * @return the ResourceSku object itself. diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-datadog/proxy-config.json b/sdk/datadog/azure-resourcemanager-datadog/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-datadog/proxy-config.json index e0b1dc6357bf6..b872aff728559 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-datadog/proxy-config.json +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-datadog/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.datadog.implementation.CreationSupportedsClientImpl$CreationSupportedsService"],["com.azure.resourcemanager.datadog.implementation.MarketplaceAgreementsClientImpl$MarketplaceAgreementsService"],["com.azure.resourcemanager.datadog.implementation.MonitoredSubscriptionsClientImpl$MonitoredSubscriptionsService"],["com.azure.resourcemanager.datadog.implementation.MonitorsClientImpl$MonitorsService"],["com.azure.resourcemanager.datadog.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.datadog.implementation.SingleSignOnConfigurationsClientImpl$SingleSignOnConfigurationsService"],["com.azure.resourcemanager.datadog.implementation.TagRulesClientImpl$TagRulesService"]] \ No newline at end of file +[["com.azure.resourcemanager.datadog.implementation.BillingInfoesClientImpl$BillingInfoesService"],["com.azure.resourcemanager.datadog.implementation.CreationSupportedsClientImpl$CreationSupportedsService"],["com.azure.resourcemanager.datadog.implementation.MarketplaceAgreementsClientImpl$MarketplaceAgreementsService"],["com.azure.resourcemanager.datadog.implementation.MonitoredSubscriptionsClientImpl$MonitoredSubscriptionsService"],["com.azure.resourcemanager.datadog.implementation.MonitorsClientImpl$MonitorsService"],["com.azure.resourcemanager.datadog.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.datadog.implementation.SingleSignOnConfigurationsClientImpl$SingleSignOnConfigurationsService"],["com.azure.resourcemanager.datadog.implementation.TagRulesClientImpl$TagRulesService"]] \ No newline at end of file diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/BillingInfoGetSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/BillingInfoGetSamples.java new file mode 100644 index 0000000000000..4ee85f3ec4dc5 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/BillingInfoGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.datadog.generated; + +/** + * Samples for BillingInfo Get. + */ +public final class BillingInfoGetSamples { + /* + * x-ms-original-file: + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/BillingInfo_Get.json + */ + /** + * Sample code: BillingInfo_Get. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void billingInfoGet(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.billingInfoes().getWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/CreationSupportedGetSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/CreationSupportedGetSamples.java index 2f1be039901d8..e06f41c886056 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/CreationSupportedGetSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/CreationSupportedGetSamples.java @@ -10,7 +10,7 @@ public final class CreationSupportedGetSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/CreationSupported_Get.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/CreationSupported_Get.json */ /** * Sample code: CreationSupported_Get. diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/CreationSupportedListSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/CreationSupportedListSamples.java index 567efae222d4c..688668b18c194 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/CreationSupportedListSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/CreationSupportedListSamples.java @@ -10,7 +10,7 @@ public final class CreationSupportedListSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/CreationSupported_List.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/CreationSupported_List.json */ /** * Sample code: CreationSupported_List. diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsCreateOrUpdateSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsCreateOrUpdateSamples.java index 84b1d854159b9..7a7329c450128 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsCreateOrUpdateSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ public final class MarketplaceAgreementsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/MarketplaceAgreements_Create. + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/MarketplaceAgreements_Create. * json */ /** diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsListSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsListSamples.java index 971a8c9991fb4..9b83581446602 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsListSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsListSamples.java @@ -10,7 +10,7 @@ public final class MarketplaceAgreementsListSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/MarketplaceAgreements_List. + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/MarketplaceAgreements_List. * json */ /** diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsCreateorUpdateSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsCreateorUpdateSamples.java index 59d7da6680356..23c673d3c53aa 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsCreateorUpdateSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsCreateorUpdateSamples.java @@ -20,7 +20,7 @@ */ public final class MonitoredSubscriptionsCreateorUpdateSamples { /* - * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/ + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/ * MonitoredSubscriptions_CreateorUpdate.json */ /** diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsDeleteSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsDeleteSamples.java index dd3546a6e7711..a86d80abf79a7 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsDeleteSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsDeleteSamples.java @@ -10,7 +10,7 @@ public final class MonitoredSubscriptionsDeleteSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/MonitoredSubscriptions_Delete + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/MonitoredSubscriptions_Delete * .json */ /** diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsGetSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsGetSamples.java index da1807ba133ba..ef1cf632f4d13 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsGetSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsGetSamples.java @@ -10,7 +10,7 @@ public final class MonitoredSubscriptionsGetSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/MonitoredSubscriptions_Get. + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/MonitoredSubscriptions_Get. * json */ /** diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsListSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsListSamples.java index b3a6349aa9b92..e4e95bfc5b471 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsListSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsListSamples.java @@ -10,7 +10,7 @@ public final class MonitoredSubscriptionsListSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/MonitoredSubscriptions_List. + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/MonitoredSubscriptions_List. * json */ /** diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsUpdateSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsUpdateSamples.java index f00f04c7af8ce..23b36774182e3 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsUpdateSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsUpdateSamples.java @@ -22,7 +22,7 @@ public final class MonitoredSubscriptionsUpdateSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/MonitoredSubscriptions_Update + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/MonitoredSubscriptions_Update * .json */ /** diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsCreateSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsCreateSamples.java index 8de6877b0a463..70961476ce14c 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsCreateSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsCreateSamples.java @@ -18,7 +18,7 @@ public final class MonitorsCreateSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Monitors_Create.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/Monitors_Create.json */ /** * Sample code: Monitors_Create. diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsDeleteSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsDeleteSamples.java index 58d520ced0518..334a8c74407c7 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsDeleteSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsDeleteSamples.java @@ -10,7 +10,7 @@ public final class MonitorsDeleteSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Monitors_Delete.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/Monitors_Delete.json */ /** * Sample code: Monitors_Delete. diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsGetByResourceGroupSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsGetByResourceGroupSamples.java index ef67a326b7d92..a3af862ddda70 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsGetByResourceGroupSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class MonitorsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Monitors_Get.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/Monitors_Get.json */ /** * Sample code: Monitors_Get. diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsGetDefaultKeySamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsGetDefaultKeySamples.java index 9828f518c16db..e4be03b9d210b 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsGetDefaultKeySamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsGetDefaultKeySamples.java @@ -10,7 +10,7 @@ public final class MonitorsGetDefaultKeySamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/ApiKeys_GetDefaultKey.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/ApiKeys_GetDefaultKey.json */ /** * Sample code: Monitors_GetDefaultKey. diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListApiKeysSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListApiKeysSamples.java index 6cf82be84bf59..dfad1711b0717 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListApiKeysSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListApiKeysSamples.java @@ -10,7 +10,7 @@ public final class MonitorsListApiKeysSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/ApiKeys_List.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/ApiKeys_List.json */ /** * Sample code: Monitors_ListApiKeys. diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListByResourceGroupSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListByResourceGroupSamples.java index e93798c78b6cc..ca62cb997e0a1 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListByResourceGroupSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class MonitorsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Monitors_ListByResourceGroup. + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/Monitors_ListByResourceGroup. * json */ /** diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListHostsSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListHostsSamples.java index 2a2bd0cb6df96..7cce075169eeb 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListHostsSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListHostsSamples.java @@ -10,7 +10,7 @@ public final class MonitorsListHostsSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Hosts_List.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/Hosts_List.json */ /** * Sample code: Monitors_ListHosts. diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListLinkedResourcesSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListLinkedResourcesSamples.java index cb1f0089a6898..40c76ab949ec0 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListLinkedResourcesSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListLinkedResourcesSamples.java @@ -10,7 +10,7 @@ public final class MonitorsListLinkedResourcesSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/LinkedResources_List.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/LinkedResources_List.json */ /** * Sample code: Monitors_ListLinkedResources. diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListMonitoredResourcesSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListMonitoredResourcesSamples.java index c88f2dc9dc68f..f2b1f97c4311a 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListMonitoredResourcesSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListMonitoredResourcesSamples.java @@ -10,7 +10,7 @@ public final class MonitorsListMonitoredResourcesSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/MonitoredResources_List.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/MonitoredResources_List.json */ /** * Sample code: Monitors_ListMonitoredResources. diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListSamples.java index 7d7db24da9e8b..9e758708a66b8 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListSamples.java @@ -10,7 +10,7 @@ public final class MonitorsListSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Monitors_List.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/Monitors_List.json */ /** * Sample code: Monitors_List. diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsRefreshSetPasswordLinkSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsRefreshSetPasswordLinkSamples.java index 142e1f2e7f745..6326bdd64a67d 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsRefreshSetPasswordLinkSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsRefreshSetPasswordLinkSamples.java @@ -10,7 +10,7 @@ public final class MonitorsRefreshSetPasswordLinkSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/RefreshSetPassword_Get.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/RefreshSetPassword_Get.json */ /** * Sample code: Monitors_RefreshSetPasswordLink. diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsSetDefaultKeySamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsSetDefaultKeySamples.java index 6284a22c48ce7..9b5d765c21d46 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsSetDefaultKeySamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsSetDefaultKeySamples.java @@ -12,7 +12,7 @@ public final class MonitorsSetDefaultKeySamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/ApiKeys_SetDefaultKey.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/ApiKeys_SetDefaultKey.json */ /** * Sample code: Monitors_SetDefaultKey. diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsUpdateSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsUpdateSamples.java index 983491c7764c8..2984211c781ba 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsUpdateSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsUpdateSamples.java @@ -16,7 +16,7 @@ public final class MonitorsUpdateSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Monitors_Update.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/Monitors_Update.json */ /** * Sample code: Monitors_Update. diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/OperationsListSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/OperationsListSamples.java index e19162acb5332..bb97f48e37e57 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/OperationsListSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/OperationsListSamples.java @@ -10,7 +10,7 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/Operations_List.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/Operations_List.json */ /** * Sample code: Operations_List. diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsCreateOrUpdateSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsCreateOrUpdateSamples.java index 9e7c1ffeb829b..02a92a7310768 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsCreateOrUpdateSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class SingleSignOnConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/ + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/ * SingleSignOnConfigurations_CreateOrUpdate.json */ /** diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsGetSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsGetSamples.java index d8797665f4a53..eefee86ddf69c 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsGetSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsGetSamples.java @@ -9,7 +9,7 @@ */ public final class SingleSignOnConfigurationsGetSamples { /* - * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/ + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/ * SingleSignOnConfigurations_Get.json */ /** diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsListSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsListSamples.java index 35dc29b4e423c..bc461aadcce9b 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsListSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsListSamples.java @@ -9,7 +9,7 @@ */ public final class SingleSignOnConfigurationsListSamples { /* - * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/ + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/ * SingleSignOnConfigurations_List.json */ /** diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesCreateOrUpdateSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesCreateOrUpdateSamples.java index 99e915ea87a2e..d62ce3b3600b5 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesCreateOrUpdateSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesCreateOrUpdateSamples.java @@ -17,7 +17,7 @@ public final class TagRulesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/TagRules_CreateOrUpdate.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/TagRules_CreateOrUpdate.json */ /** * Sample code: TagRules_CreateOrUpdate. diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesGetSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesGetSamples.java index 9fb47f8f0a91e..d3d4a0bf4c054 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesGetSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesGetSamples.java @@ -10,7 +10,7 @@ public final class TagRulesGetSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/TagRules_Get.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/TagRules_Get.json */ /** * Sample code: TagRules_Get. diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesListSamples.java b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesListSamples.java index 5b26e2ab5ed31..a60ee9cdc4fe9 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesListSamples.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesListSamples.java @@ -10,7 +10,7 @@ public final class TagRulesListSamples { /* * x-ms-original-file: - * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-01-01/examples/TagRules_List.json + * specification/datadog/resource-manager/Microsoft.Datadog/stable/2023-10-20/examples/TagRules_List.json */ /** * Sample code: TagRules_List. diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/CreateResourceSupportedPropertiesTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/CreateResourceSupportedPropertiesTests.java deleted file mode 100644 index 3fdd84458f175..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/CreateResourceSupportedPropertiesTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.models.CreateResourceSupportedProperties; - -public final class CreateResourceSupportedPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CreateResourceSupportedProperties model - = BinaryData.fromString("{\"name\":\"wyahuxinpmqnja\",\"creationSupported\":true}") - .toObject(CreateResourceSupportedProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CreateResourceSupportedProperties model = new CreateResourceSupportedProperties(); - model = BinaryData.fromObject(model).toObject(CreateResourceSupportedProperties.class); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/CreateResourceSupportedResponseInnerTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/CreateResourceSupportedResponseInnerTests.java deleted file mode 100644 index e6ac87c0ed248..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/CreateResourceSupportedResponseInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.fluent.models.CreateResourceSupportedResponseInner; -import com.azure.resourcemanager.datadog.models.CreateResourceSupportedProperties; - -public final class CreateResourceSupportedResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CreateResourceSupportedResponseInner model - = BinaryData.fromString("{\"properties\":{\"name\":\"odmailzyd\",\"creationSupported\":false}}") - .toObject(CreateResourceSupportedResponseInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CreateResourceSupportedResponseInner model - = new CreateResourceSupportedResponseInner().withProperties(new CreateResourceSupportedProperties()); - model = BinaryData.fromObject(model).toObject(CreateResourceSupportedResponseInner.class); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/CreateResourceSupportedResponseListTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/CreateResourceSupportedResponseListTests.java deleted file mode 100644 index 7960d043ca235..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/CreateResourceSupportedResponseListTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.fluent.models.CreateResourceSupportedResponseInner; -import com.azure.resourcemanager.datadog.models.CreateResourceSupportedProperties; -import com.azure.resourcemanager.datadog.models.CreateResourceSupportedResponseList; -import java.util.Arrays; - -public final class CreateResourceSupportedResponseListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CreateResourceSupportedResponseList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"name\":\"wlokjyem\",\"creationSupported\":false}},{\"properties\":{\"name\":\"pjoxzjnch\",\"creationSupported\":true}}]}") - .toObject(CreateResourceSupportedResponseList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CreateResourceSupportedResponseList model = new CreateResourceSupportedResponseList().withValue(Arrays.asList( - new CreateResourceSupportedResponseInner().withProperties(new CreateResourceSupportedProperties()), - new CreateResourceSupportedResponseInner().withProperties(new CreateResourceSupportedProperties()))); - model = BinaryData.fromObject(model).toObject(CreateResourceSupportedResponseList.class); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/CreationSupportedsGetWithResponseMockTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/CreationSupportedsGetWithResponseMockTests.java deleted file mode 100644 index 60cf09738601f..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/CreationSupportedsGetWithResponseMockTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.datadog.MicrosoftDatadogManager; -import com.azure.resourcemanager.datadog.models.CreateResourceSupportedResponse; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CreationSupportedsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr = "{\"properties\":{\"name\":\"yueaxibxujwb\",\"creationSupported\":false}}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MicrosoftDatadogManager manager = MicrosoftDatadogManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CreateResourceSupportedResponse response = manager.creationSupporteds() - .getWithResponse("qpuedckzywbiex", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/CreationSupportedsListMockTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/CreationSupportedsListMockTests.java deleted file mode 100644 index d815823525362..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/CreationSupportedsListMockTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.datadog.MicrosoftDatadogManager; -import com.azure.resourcemanager.datadog.models.CreateResourceSupportedResponse; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CreationSupportedsListMockTests { - @Test - public void testList() throws Exception { - String responseStr = "{\"value\":[{\"properties\":{\"name\":\"yyazttbt\",\"creationSupported\":false}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MicrosoftDatadogManager manager = MicrosoftDatadogManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.creationSupporteds().list("wrqlfktsthsuco", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogAgreementPropertiesTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogAgreementPropertiesTests.java deleted file mode 100644 index f7077632fb652..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogAgreementPropertiesTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.models.DatadogAgreementProperties; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class DatadogAgreementPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatadogAgreementProperties model = BinaryData.fromString( - "{\"publisher\":\"b\",\"product\":\"rkxvdum\",\"plan\":\"rtfw\",\"licenseTextLink\":\"k\",\"privacyPolicyLink\":\"audccsnhs\",\"retrieveDatetime\":\"2021-10-29T04:44:12Z\",\"signature\":\"ejhkry\",\"accepted\":true}") - .toObject(DatadogAgreementProperties.class); - Assertions.assertEquals("b", model.publisher()); - Assertions.assertEquals("rkxvdum", model.product()); - Assertions.assertEquals("rtfw", model.plan()); - Assertions.assertEquals("k", model.licenseTextLink()); - Assertions.assertEquals("audccsnhs", model.privacyPolicyLink()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-29T04:44:12Z"), model.retrieveDatetime()); - Assertions.assertEquals("ejhkry", model.signature()); - Assertions.assertEquals(true, model.accepted()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatadogAgreementProperties model = new DatadogAgreementProperties().withPublisher("b") - .withProduct("rkxvdum") - .withPlan("rtfw") - .withLicenseTextLink("k") - .withPrivacyPolicyLink("audccsnhs") - .withRetrieveDatetime(OffsetDateTime.parse("2021-10-29T04:44:12Z")) - .withSignature("ejhkry") - .withAccepted(true); - model = BinaryData.fromObject(model).toObject(DatadogAgreementProperties.class); - Assertions.assertEquals("b", model.publisher()); - Assertions.assertEquals("rkxvdum", model.product()); - Assertions.assertEquals("rtfw", model.plan()); - Assertions.assertEquals("k", model.licenseTextLink()); - Assertions.assertEquals("audccsnhs", model.privacyPolicyLink()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-29T04:44:12Z"), model.retrieveDatetime()); - Assertions.assertEquals("ejhkry", model.signature()); - Assertions.assertEquals(true, model.accepted()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogAgreementResourceInnerTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogAgreementResourceInnerTests.java deleted file mode 100644 index 07a08dbf79dfb..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogAgreementResourceInnerTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.fluent.models.DatadogAgreementResourceInner; -import com.azure.resourcemanager.datadog.models.DatadogAgreementProperties; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class DatadogAgreementResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatadogAgreementResourceInner model = BinaryData.fromString( - "{\"properties\":{\"publisher\":\"u\",\"product\":\"nryrtihf\",\"plan\":\"ijbpzvgnwzsymgl\",\"licenseTextLink\":\"fcyzkohdbihanufh\",\"privacyPolicyLink\":\"bj\",\"retrieveDatetime\":\"2021-10-05T18:31:22Z\",\"signature\":\"ithxqhabifpi\",\"accepted\":false},\"id\":\"zb\",\"name\":\"scnpqxuhivy\",\"type\":\"n\"}") - .toObject(DatadogAgreementResourceInner.class); - Assertions.assertEquals("u", model.properties().publisher()); - Assertions.assertEquals("nryrtihf", model.properties().product()); - Assertions.assertEquals("ijbpzvgnwzsymgl", model.properties().plan()); - Assertions.assertEquals("fcyzkohdbihanufh", model.properties().licenseTextLink()); - Assertions.assertEquals("bj", model.properties().privacyPolicyLink()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-05T18:31:22Z"), model.properties().retrieveDatetime()); - Assertions.assertEquals("ithxqhabifpi", model.properties().signature()); - Assertions.assertEquals(false, model.properties().accepted()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatadogAgreementResourceInner model - = new DatadogAgreementResourceInner().withProperties(new DatadogAgreementProperties().withPublisher("u") - .withProduct("nryrtihf") - .withPlan("ijbpzvgnwzsymgl") - .withLicenseTextLink("fcyzkohdbihanufh") - .withPrivacyPolicyLink("bj") - .withRetrieveDatetime(OffsetDateTime.parse("2021-10-05T18:31:22Z")) - .withSignature("ithxqhabifpi") - .withAccepted(false)); - model = BinaryData.fromObject(model).toObject(DatadogAgreementResourceInner.class); - Assertions.assertEquals("u", model.properties().publisher()); - Assertions.assertEquals("nryrtihf", model.properties().product()); - Assertions.assertEquals("ijbpzvgnwzsymgl", model.properties().plan()); - Assertions.assertEquals("fcyzkohdbihanufh", model.properties().licenseTextLink()); - Assertions.assertEquals("bj", model.properties().privacyPolicyLink()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-05T18:31:22Z"), model.properties().retrieveDatetime()); - Assertions.assertEquals("ithxqhabifpi", model.properties().signature()); - Assertions.assertEquals(false, model.properties().accepted()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogAgreementResourceListResponseTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogAgreementResourceListResponseTests.java deleted file mode 100644 index ca0ac89bbe63a..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogAgreementResourceListResponseTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.fluent.models.DatadogAgreementResourceInner; -import com.azure.resourcemanager.datadog.models.DatadogAgreementProperties; -import com.azure.resourcemanager.datadog.models.DatadogAgreementResourceListResponse; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DatadogAgreementResourceListResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatadogAgreementResourceListResponse model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"publisher\":\"uv\",\"product\":\"xpyb\",\"plan\":\"m\",\"licenseTextLink\":\"mtz\",\"privacyPolicyLink\":\"bsphrupidgsybbe\",\"retrieveDatetime\":\"2021-02-20T13:53:07Z\",\"signature\":\"oycmsxaobhdxbmt\",\"accepted\":true},\"id\":\"jzehtb\",\"name\":\"ufpo\",\"type\":\"noi\"},{\"properties\":{\"publisher\":\"lrxybqsoq\",\"product\":\"gkdmb\",\"plan\":\"zlobcufpd\",\"licenseTextLink\":\"rbt\",\"privacyPolicyLink\":\"qjnqglhqgnufoooj\",\"retrieveDatetime\":\"2021-06-05T07:25:28Z\",\"signature\":\"sqe\",\"accepted\":true},\"id\":\"dfmglzlhjx\",\"name\":\"ifkwmrvktsizntoc\",\"type\":\"pa\"},{\"properties\":{\"publisher\":\"jpsq\",\"product\":\"mpoyfd\",\"plan\":\"ogknygjofjdd\",\"licenseTextLink\":\"s\",\"privacyPolicyLink\":\"eupewnwreitjz\",\"retrieveDatetime\":\"2021-09-21T22:26:17Z\",\"signature\":\"sarhmofc\",\"accepted\":false},\"id\":\"yurkdtmlxhekuksj\",\"name\":\"xukcdmpar\",\"type\":\"ryuanzwuxzdxtay\"}],\"nextLink\":\"hmwhfpmrqo\"}") - .toObject(DatadogAgreementResourceListResponse.class); - Assertions.assertEquals("uv", model.value().get(0).properties().publisher()); - Assertions.assertEquals("xpyb", model.value().get(0).properties().product()); - Assertions.assertEquals("m", model.value().get(0).properties().plan()); - Assertions.assertEquals("mtz", model.value().get(0).properties().licenseTextLink()); - Assertions.assertEquals("bsphrupidgsybbe", model.value().get(0).properties().privacyPolicyLink()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-20T13:53:07Z"), - model.value().get(0).properties().retrieveDatetime()); - Assertions.assertEquals("oycmsxaobhdxbmt", model.value().get(0).properties().signature()); - Assertions.assertEquals(true, model.value().get(0).properties().accepted()); - Assertions.assertEquals("hmwhfpmrqo", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatadogAgreementResourceListResponse model = new DatadogAgreementResourceListResponse().withValue(Arrays.asList( - new DatadogAgreementResourceInner().withProperties(new DatadogAgreementProperties().withPublisher("uv") - .withProduct("xpyb") - .withPlan("m") - .withLicenseTextLink("mtz") - .withPrivacyPolicyLink("bsphrupidgsybbe") - .withRetrieveDatetime(OffsetDateTime.parse("2021-02-20T13:53:07Z")) - .withSignature("oycmsxaobhdxbmt") - .withAccepted(true)), - new DatadogAgreementResourceInner() - .withProperties(new DatadogAgreementProperties().withPublisher("lrxybqsoq") - .withProduct("gkdmb") - .withPlan("zlobcufpd") - .withLicenseTextLink("rbt") - .withPrivacyPolicyLink("qjnqglhqgnufoooj") - .withRetrieveDatetime(OffsetDateTime.parse("2021-06-05T07:25:28Z")) - .withSignature("sqe") - .withAccepted(true)), - new DatadogAgreementResourceInner().withProperties(new DatadogAgreementProperties().withPublisher("jpsq") - .withProduct("mpoyfd") - .withPlan("ogknygjofjdd") - .withLicenseTextLink("s") - .withPrivacyPolicyLink("eupewnwreitjz") - .withRetrieveDatetime(OffsetDateTime.parse("2021-09-21T22:26:17Z")) - .withSignature("sarhmofc") - .withAccepted(false)))) - .withNextLink("hmwhfpmrqo"); - model = BinaryData.fromObject(model).toObject(DatadogAgreementResourceListResponse.class); - Assertions.assertEquals("uv", model.value().get(0).properties().publisher()); - Assertions.assertEquals("xpyb", model.value().get(0).properties().product()); - Assertions.assertEquals("m", model.value().get(0).properties().plan()); - Assertions.assertEquals("mtz", model.value().get(0).properties().licenseTextLink()); - Assertions.assertEquals("bsphrupidgsybbe", model.value().get(0).properties().privacyPolicyLink()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-20T13:53:07Z"), - model.value().get(0).properties().retrieveDatetime()); - Assertions.assertEquals("oycmsxaobhdxbmt", model.value().get(0).properties().signature()); - Assertions.assertEquals(true, model.value().get(0).properties().accepted()); - Assertions.assertEquals("hmwhfpmrqo", model.nextLink()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogHostInnerTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogHostInnerTests.java deleted file mode 100644 index c4e94839e12c0..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogHostInnerTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.fluent.models.DatadogHostInner; -import com.azure.resourcemanager.datadog.models.DatadogHostMetadata; -import com.azure.resourcemanager.datadog.models.DatadogInstallMethod; -import com.azure.resourcemanager.datadog.models.DatadogLogsAgent; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DatadogHostInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatadogHostInner model = BinaryData.fromString( - "{\"name\":\"bacphejko\",\"aliases\":[\"qgoulznd\",\"i\",\"wyqkgfgibm\"],\"apps\":[\"akeqs\",\"xybz\"],\"meta\":{\"agentVersion\":\"dqytbciqfouflmm\",\"installMethod\":{\"tool\":\"smodmgloug\",\"toolVersion\":\"kwtmutduqktapspw\",\"installerVersion\":\"uertumk\"},\"logsAgent\":{\"transport\":\"vqwhbmdgbbjfd\"}}}") - .toObject(DatadogHostInner.class); - Assertions.assertEquals("bacphejko", model.name()); - Assertions.assertEquals("qgoulznd", model.aliases().get(0)); - Assertions.assertEquals("akeqs", model.apps().get(0)); - Assertions.assertEquals("dqytbciqfouflmm", model.meta().agentVersion()); - Assertions.assertEquals("smodmgloug", model.meta().installMethod().tool()); - Assertions.assertEquals("kwtmutduqktapspw", model.meta().installMethod().toolVersion()); - Assertions.assertEquals("uertumk", model.meta().installMethod().installerVersion()); - Assertions.assertEquals("vqwhbmdgbbjfd", model.meta().logsAgent().transport()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatadogHostInner model = new DatadogHostInner().withName("bacphejko") - .withAliases(Arrays.asList("qgoulznd", "i", "wyqkgfgibm")) - .withApps(Arrays.asList("akeqs", "xybz")) - .withMeta(new DatadogHostMetadata().withAgentVersion("dqytbciqfouflmm") - .withInstallMethod(new DatadogInstallMethod().withTool("smodmgloug") - .withToolVersion("kwtmutduqktapspw") - .withInstallerVersion("uertumk")) - .withLogsAgent(new DatadogLogsAgent().withTransport("vqwhbmdgbbjfd"))); - model = BinaryData.fromObject(model).toObject(DatadogHostInner.class); - Assertions.assertEquals("bacphejko", model.name()); - Assertions.assertEquals("qgoulznd", model.aliases().get(0)); - Assertions.assertEquals("akeqs", model.apps().get(0)); - Assertions.assertEquals("dqytbciqfouflmm", model.meta().agentVersion()); - Assertions.assertEquals("smodmgloug", model.meta().installMethod().tool()); - Assertions.assertEquals("kwtmutduqktapspw", model.meta().installMethod().toolVersion()); - Assertions.assertEquals("uertumk", model.meta().installMethod().installerVersion()); - Assertions.assertEquals("vqwhbmdgbbjfd", model.meta().logsAgent().transport()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogHostListResponseTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogHostListResponseTests.java deleted file mode 100644 index 53ef22afbda19..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogHostListResponseTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.fluent.models.DatadogHostInner; -import com.azure.resourcemanager.datadog.models.DatadogHostListResponse; -import com.azure.resourcemanager.datadog.models.DatadogHostMetadata; -import com.azure.resourcemanager.datadog.models.DatadogInstallMethod; -import com.azure.resourcemanager.datadog.models.DatadogLogsAgent; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DatadogHostListResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatadogHostListResponse model = BinaryData.fromString( - "{\"value\":[{\"name\":\"qpsoacctazak\",\"aliases\":[\"ahbc\",\"yffdfdos\",\"gexpaojakhmsbz\"],\"apps\":[\"rzevdphlxaol\",\"hqtrgqjbpf\",\"fsinzgvfcjrwzoxx\"],\"meta\":{\"agentVersion\":\"elluwfziton\",\"installMethod\":{\"tool\":\"fpjkjlxofp\",\"toolVersion\":\"hpf\",\"installerVersion\":\"ypininm\"},\"logsAgent\":{\"transport\":\"uybbkpodep\"}}},{\"name\":\"ginuvamih\",\"aliases\":[\"narxzxtheotus\",\"vyevcciqi\",\"nhungbw\"],\"apps\":[\"nfygxgispemvtz\",\"kufubljo\",\"xqeofjaeqjhqjba\"],\"meta\":{\"agentVersion\":\"smjqulngsntnbyb\",\"installMethod\":{\"tool\":\"cwrwclxxwrljdous\",\"toolVersion\":\"qvkoc\",\"installerVersion\":\"jdkwtnhxbnjb\"},\"logsAgent\":{\"transport\":\"qrglssainqpjwn\"}}},{\"name\":\"ljfmppee\",\"aliases\":[\"gxsabkyq\",\"uujitcjc\"],\"apps\":[\"evndh\",\"rwpdappdsbdkvwrw\",\"feusnhut\",\"eltmrldhugjzzdat\"],\"meta\":{\"agentVersion\":\"oc\",\"installMethod\":{\"tool\":\"ablgphuticndvk\",\"toolVersion\":\"zwyiftyhxhur\",\"installerVersion\":\"ftyxolniw\"},\"logsAgent\":{\"transport\":\"ukjfkgiawxklr\"}}}],\"nextLink\":\"lwckbasyypnddhs\"}") - .toObject(DatadogHostListResponse.class); - Assertions.assertEquals("qpsoacctazak", model.value().get(0).name()); - Assertions.assertEquals("ahbc", model.value().get(0).aliases().get(0)); - Assertions.assertEquals("rzevdphlxaol", model.value().get(0).apps().get(0)); - Assertions.assertEquals("elluwfziton", model.value().get(0).meta().agentVersion()); - Assertions.assertEquals("fpjkjlxofp", model.value().get(0).meta().installMethod().tool()); - Assertions.assertEquals("hpf", model.value().get(0).meta().installMethod().toolVersion()); - Assertions.assertEquals("ypininm", model.value().get(0).meta().installMethod().installerVersion()); - Assertions.assertEquals("uybbkpodep", model.value().get(0).meta().logsAgent().transport()); - Assertions.assertEquals("lwckbasyypnddhs", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatadogHostListResponse model = new DatadogHostListResponse() - .withValue(Arrays.asList( - new DatadogHostInner().withName("qpsoacctazak") - .withAliases(Arrays.asList("ahbc", "yffdfdos", "gexpaojakhmsbz")) - .withApps(Arrays.asList("rzevdphlxaol", "hqtrgqjbpf", "fsinzgvfcjrwzoxx")) - .withMeta(new DatadogHostMetadata().withAgentVersion("elluwfziton") - .withInstallMethod(new DatadogInstallMethod().withTool("fpjkjlxofp") - .withToolVersion("hpf") - .withInstallerVersion("ypininm")) - .withLogsAgent(new DatadogLogsAgent().withTransport("uybbkpodep"))), - new DatadogHostInner().withName("ginuvamih") - .withAliases(Arrays.asList("narxzxtheotus", "vyevcciqi", "nhungbw")) - .withApps(Arrays.asList("nfygxgispemvtz", "kufubljo", "xqeofjaeqjhqjba")) - .withMeta(new DatadogHostMetadata().withAgentVersion("smjqulngsntnbyb") - .withInstallMethod(new DatadogInstallMethod().withTool("cwrwclxxwrljdous") - .withToolVersion("qvkoc") - .withInstallerVersion("jdkwtnhxbnjb")) - .withLogsAgent(new DatadogLogsAgent().withTransport("qrglssainqpjwn"))), - new DatadogHostInner().withName("ljfmppee") - .withAliases(Arrays.asList("gxsabkyq", "uujitcjc")) - .withApps(Arrays.asList("evndh", "rwpdappdsbdkvwrw", "feusnhut", "eltmrldhugjzzdat")) - .withMeta(new DatadogHostMetadata().withAgentVersion("oc") - .withInstallMethod(new DatadogInstallMethod().withTool("ablgphuticndvk") - .withToolVersion("zwyiftyhxhur") - .withInstallerVersion("ftyxolniw")) - .withLogsAgent(new DatadogLogsAgent().withTransport("ukjfkgiawxklr"))))) - .withNextLink("lwckbasyypnddhs"); - model = BinaryData.fromObject(model).toObject(DatadogHostListResponse.class); - Assertions.assertEquals("qpsoacctazak", model.value().get(0).name()); - Assertions.assertEquals("ahbc", model.value().get(0).aliases().get(0)); - Assertions.assertEquals("rzevdphlxaol", model.value().get(0).apps().get(0)); - Assertions.assertEquals("elluwfziton", model.value().get(0).meta().agentVersion()); - Assertions.assertEquals("fpjkjlxofp", model.value().get(0).meta().installMethod().tool()); - Assertions.assertEquals("hpf", model.value().get(0).meta().installMethod().toolVersion()); - Assertions.assertEquals("ypininm", model.value().get(0).meta().installMethod().installerVersion()); - Assertions.assertEquals("uybbkpodep", model.value().get(0).meta().logsAgent().transport()); - Assertions.assertEquals("lwckbasyypnddhs", model.nextLink()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogHostMetadataTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogHostMetadataTests.java deleted file mode 100644 index 5a8505312e948..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogHostMetadataTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.models.DatadogHostMetadata; -import com.azure.resourcemanager.datadog.models.DatadogInstallMethod; -import com.azure.resourcemanager.datadog.models.DatadogLogsAgent; -import org.junit.jupiter.api.Assertions; - -public final class DatadogHostMetadataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatadogHostMetadata model = BinaryData.fromString( - "{\"agentVersion\":\"mbmbexppbh\",\"installMethod\":{\"tool\":\"rolfpfp\",\"toolVersion\":\"lgbquxig\",\"installerVersion\":\"jgzjaoyfhrtx\"},\"logsAgent\":{\"transport\":\"erkujys\"}}") - .toObject(DatadogHostMetadata.class); - Assertions.assertEquals("mbmbexppbh", model.agentVersion()); - Assertions.assertEquals("rolfpfp", model.installMethod().tool()); - Assertions.assertEquals("lgbquxig", model.installMethod().toolVersion()); - Assertions.assertEquals("jgzjaoyfhrtx", model.installMethod().installerVersion()); - Assertions.assertEquals("erkujys", model.logsAgent().transport()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatadogHostMetadata model = new DatadogHostMetadata().withAgentVersion("mbmbexppbh") - .withInstallMethod(new DatadogInstallMethod().withTool("rolfpfp") - .withToolVersion("lgbquxig") - .withInstallerVersion("jgzjaoyfhrtx")) - .withLogsAgent(new DatadogLogsAgent().withTransport("erkujys")); - model = BinaryData.fromObject(model).toObject(DatadogHostMetadata.class); - Assertions.assertEquals("mbmbexppbh", model.agentVersion()); - Assertions.assertEquals("rolfpfp", model.installMethod().tool()); - Assertions.assertEquals("lgbquxig", model.installMethod().toolVersion()); - Assertions.assertEquals("jgzjaoyfhrtx", model.installMethod().installerVersion()); - Assertions.assertEquals("erkujys", model.logsAgent().transport()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogInstallMethodTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogInstallMethodTests.java deleted file mode 100644 index 0fe37db48e624..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogInstallMethodTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.models.DatadogInstallMethod; -import org.junit.jupiter.api.Assertions; - -public final class DatadogInstallMethodTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatadogInstallMethod model = BinaryData - .fromString("{\"tool\":\"eju\",\"toolVersion\":\"qawrlyxwj\",\"installerVersion\":\"prbnwbxgjvtbv\"}") - .toObject(DatadogInstallMethod.class); - Assertions.assertEquals("eju", model.tool()); - Assertions.assertEquals("qawrlyxwj", model.toolVersion()); - Assertions.assertEquals("prbnwbxgjvtbv", model.installerVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatadogInstallMethod model = new DatadogInstallMethod().withTool("eju") - .withToolVersion("qawrlyxwj") - .withInstallerVersion("prbnwbxgjvtbv"); - model = BinaryData.fromObject(model).toObject(DatadogInstallMethod.class); - Assertions.assertEquals("eju", model.tool()); - Assertions.assertEquals("qawrlyxwj", model.toolVersion()); - Assertions.assertEquals("prbnwbxgjvtbv", model.installerVersion()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogLogsAgentTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogLogsAgentTests.java deleted file mode 100644 index 6ef95af38c113..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogLogsAgentTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.models.DatadogLogsAgent; -import org.junit.jupiter.api.Assertions; - -public final class DatadogLogsAgentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatadogLogsAgent model = BinaryData.fromString("{\"transport\":\"sszdnru\"}").toObject(DatadogLogsAgent.class); - Assertions.assertEquals("sszdnru", model.transport()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatadogLogsAgent model = new DatadogLogsAgent().withTransport("sszdnru"); - model = BinaryData.fromObject(model).toObject(DatadogLogsAgent.class); - Assertions.assertEquals("sszdnru", model.transport()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogMonitorResourceUpdateParametersTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogMonitorResourceUpdateParametersTests.java deleted file mode 100644 index f9aea65a74e1a..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogMonitorResourceUpdateParametersTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.models.DatadogMonitorResourceUpdateParameters; -import com.azure.resourcemanager.datadog.models.MonitorUpdateProperties; -import com.azure.resourcemanager.datadog.models.MonitoringStatus; -import com.azure.resourcemanager.datadog.models.ResourceSku; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DatadogMonitorResourceUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatadogMonitorResourceUpdateParameters model = BinaryData.fromString( - "{\"properties\":{\"monitoringStatus\":\"Enabled\",\"cspm\":true},\"tags\":{\"ebxetqgtzxdp\":\"ccfwnfnbacfion\",\"feallnwsu\":\"qbqqwxr\"},\"sku\":{\"name\":\"snjampmng\"}}") - .toObject(DatadogMonitorResourceUpdateParameters.class); - Assertions.assertEquals(MonitoringStatus.ENABLED, model.properties().monitoringStatus()); - Assertions.assertEquals(true, model.properties().cspm()); - Assertions.assertEquals("ccfwnfnbacfion", model.tags().get("ebxetqgtzxdp")); - Assertions.assertEquals("snjampmng", model.sku().name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatadogMonitorResourceUpdateParameters model = new DatadogMonitorResourceUpdateParameters() - .withProperties(new MonitorUpdateProperties().withMonitoringStatus(MonitoringStatus.ENABLED).withCspm(true)) - .withTags(mapOf("ebxetqgtzxdp", "ccfwnfnbacfion", "feallnwsu", "qbqqwxr")) - .withSku(new ResourceSku().withName("snjampmng")); - model = BinaryData.fromObject(model).toObject(DatadogMonitorResourceUpdateParameters.class); - Assertions.assertEquals(MonitoringStatus.ENABLED, model.properties().monitoringStatus()); - Assertions.assertEquals(true, model.properties().cspm()); - Assertions.assertEquals("ccfwnfnbacfion", model.tags().get("ebxetqgtzxdp")); - Assertions.assertEquals("snjampmng", model.sku().name()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogSingleSignOnPropertiesTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogSingleSignOnPropertiesTests.java deleted file mode 100644 index 03e32c94ca79d..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogSingleSignOnPropertiesTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.models.DatadogSingleSignOnProperties; -import com.azure.resourcemanager.datadog.models.SingleSignOnStates; -import org.junit.jupiter.api.Assertions; - -public final class DatadogSingleSignOnPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatadogSingleSignOnProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Deleting\",\"singleSignOnState\":\"Initial\",\"enterpriseAppId\":\"uimjmvx\",\"singleSignOnUrl\":\"duugidyjr\"}") - .toObject(DatadogSingleSignOnProperties.class); - Assertions.assertEquals(SingleSignOnStates.INITIAL, model.singleSignOnState()); - Assertions.assertEquals("uimjmvx", model.enterpriseAppId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatadogSingleSignOnProperties model - = new DatadogSingleSignOnProperties().withSingleSignOnState(SingleSignOnStates.INITIAL) - .withEnterpriseAppId("uimjmvx"); - model = BinaryData.fromObject(model).toObject(DatadogSingleSignOnProperties.class); - Assertions.assertEquals(SingleSignOnStates.INITIAL, model.singleSignOnState()); - Assertions.assertEquals("uimjmvx", model.enterpriseAppId()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogSingleSignOnResourceInnerTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogSingleSignOnResourceInnerTests.java deleted file mode 100644 index 814ba3525a1b0..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogSingleSignOnResourceInnerTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.fluent.models.DatadogSingleSignOnResourceInner; -import com.azure.resourcemanager.datadog.models.DatadogSingleSignOnProperties; -import com.azure.resourcemanager.datadog.models.SingleSignOnStates; -import org.junit.jupiter.api.Assertions; - -public final class DatadogSingleSignOnResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatadogSingleSignOnResourceInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"singleSignOnState\":\"Existing\",\"enterpriseAppId\":\"jmflbvvnch\",\"singleSignOnUrl\":\"cciw\"},\"id\":\"juqk\",\"name\":\"rsa\",\"type\":\"iwkuofos\"}") - .toObject(DatadogSingleSignOnResourceInner.class); - Assertions.assertEquals(SingleSignOnStates.EXISTING, model.properties().singleSignOnState()); - Assertions.assertEquals("jmflbvvnch", model.properties().enterpriseAppId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatadogSingleSignOnResourceInner model = new DatadogSingleSignOnResourceInner() - .withProperties(new DatadogSingleSignOnProperties().withSingleSignOnState(SingleSignOnStates.EXISTING) - .withEnterpriseAppId("jmflbvvnch")); - model = BinaryData.fromObject(model).toObject(DatadogSingleSignOnResourceInner.class); - Assertions.assertEquals(SingleSignOnStates.EXISTING, model.properties().singleSignOnState()); - Assertions.assertEquals("jmflbvvnch", model.properties().enterpriseAppId()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogSingleSignOnResourceListResponseTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogSingleSignOnResourceListResponseTests.java deleted file mode 100644 index 5c977de9e2d73..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/DatadogSingleSignOnResourceListResponseTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.fluent.models.DatadogSingleSignOnResourceInner; -import com.azure.resourcemanager.datadog.models.DatadogSingleSignOnProperties; -import com.azure.resourcemanager.datadog.models.DatadogSingleSignOnResourceListResponse; -import com.azure.resourcemanager.datadog.models.SingleSignOnStates; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DatadogSingleSignOnResourceListResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatadogSingleSignOnResourceListResponse model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"singleSignOnState\":\"Enable\",\"enterpriseAppId\":\"vyifqrvkdvjsl\",\"singleSignOnUrl\":\"mvvd\"},\"id\":\"atkpnp\",\"name\":\"lexxbczwtru\",\"type\":\"iqzbq\"}],\"nextLink\":\"sovmyokacspkwl\"}") - .toObject(DatadogSingleSignOnResourceListResponse.class); - Assertions.assertEquals(SingleSignOnStates.ENABLE, model.value().get(0).properties().singleSignOnState()); - Assertions.assertEquals("vyifqrvkdvjsl", model.value().get(0).properties().enterpriseAppId()); - Assertions.assertEquals("sovmyokacspkwl", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatadogSingleSignOnResourceListResponse model = new DatadogSingleSignOnResourceListResponse() - .withValue(Arrays.asList(new DatadogSingleSignOnResourceInner() - .withProperties(new DatadogSingleSignOnProperties().withSingleSignOnState(SingleSignOnStates.ENABLE) - .withEnterpriseAppId("vyifqrvkdvjsl")))) - .withNextLink("sovmyokacspkwl"); - model = BinaryData.fromObject(model).toObject(DatadogSingleSignOnResourceListResponse.class); - Assertions.assertEquals(SingleSignOnStates.ENABLE, model.value().get(0).properties().singleSignOnState()); - Assertions.assertEquals("vyifqrvkdvjsl", model.value().get(0).properties().enterpriseAppId()); - Assertions.assertEquals("sovmyokacspkwl", model.nextLink()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/FilteringTagTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/FilteringTagTests.java deleted file mode 100644 index 0377761ff4f57..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/FilteringTagTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.models.FilteringTag; -import com.azure.resourcemanager.datadog.models.TagAction; -import org.junit.jupiter.api.Assertions; - -public final class FilteringTagTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FilteringTag model - = BinaryData.fromString("{\"name\":\"whrdxwzywqsmbsu\",\"value\":\"xim\",\"action\":\"Include\"}") - .toObject(FilteringTag.class); - Assertions.assertEquals("whrdxwzywqsmbsu", model.name()); - Assertions.assertEquals("xim", model.value()); - Assertions.assertEquals(TagAction.INCLUDE, model.action()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FilteringTag model - = new FilteringTag().withName("whrdxwzywqsmbsu").withValue("xim").withAction(TagAction.INCLUDE); - model = BinaryData.fromObject(model).toObject(FilteringTag.class); - Assertions.assertEquals("whrdxwzywqsmbsu", model.name()); - Assertions.assertEquals("xim", model.value()); - Assertions.assertEquals(TagAction.INCLUDE, model.action()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/IdentityPropertiesTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/IdentityPropertiesTests.java deleted file mode 100644 index b696e5c84e046..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/IdentityPropertiesTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.models.IdentityProperties; -import com.azure.resourcemanager.datadog.models.ManagedIdentityTypes; -import org.junit.jupiter.api.Assertions; - -public final class IdentityPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentityProperties model = BinaryData - .fromString("{\"principalId\":\"mcoo\",\"tenantId\":\"xlzevgbmqjqabcy\",\"type\":\"UserAssigned\"}") - .toObject(IdentityProperties.class); - Assertions.assertEquals(ManagedIdentityTypes.USER_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityProperties model = new IdentityProperties().withType(ManagedIdentityTypes.USER_ASSIGNED); - model = BinaryData.fromObject(model).toObject(IdentityProperties.class); - Assertions.assertEquals(ManagedIdentityTypes.USER_ASSIGNED, model.type()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/LinkedResourceInnerTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/LinkedResourceInnerTests.java deleted file mode 100644 index 396e8cbfb259a..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/LinkedResourceInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.fluent.models.LinkedResourceInner; -import org.junit.jupiter.api.Assertions; - -public final class LinkedResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LinkedResourceInner model - = BinaryData.fromString("{\"id\":\"wdzuhtymwisd\"}").toObject(LinkedResourceInner.class); - Assertions.assertEquals("wdzuhtymwisd", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LinkedResourceInner model = new LinkedResourceInner().withId("wdzuhtymwisd"); - model = BinaryData.fromObject(model).toObject(LinkedResourceInner.class); - Assertions.assertEquals("wdzuhtymwisd", model.id()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/LinkedResourceListResponseTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/LinkedResourceListResponseTests.java deleted file mode 100644 index cbe786b1cc477..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/LinkedResourceListResponseTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.fluent.models.LinkedResourceInner; -import com.azure.resourcemanager.datadog.models.LinkedResourceListResponse; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LinkedResourceListResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LinkedResourceListResponse model = BinaryData.fromString( - "{\"value\":[{\"id\":\"hmuouqfprwzwbn\"},{\"id\":\"itnwuizgazxufi\"},{\"id\":\"ckyfih\"}],\"nextLink\":\"idf\"}") - .toObject(LinkedResourceListResponse.class); - Assertions.assertEquals("hmuouqfprwzwbn", model.value().get(0).id()); - Assertions.assertEquals("idf", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LinkedResourceListResponse model = new LinkedResourceListResponse() - .withValue(Arrays.asList(new LinkedResourceInner().withId("hmuouqfprwzwbn"), - new LinkedResourceInner().withId("itnwuizgazxufi"), new LinkedResourceInner().withId("ckyfih"))) - .withNextLink("idf"); - model = BinaryData.fromObject(model).toObject(LinkedResourceListResponse.class); - Assertions.assertEquals("hmuouqfprwzwbn", model.value().get(0).id()); - Assertions.assertEquals("idf", model.nextLink()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/LogRulesTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/LogRulesTests.java deleted file mode 100644 index 19b86fed39550..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/LogRulesTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.models.FilteringTag; -import com.azure.resourcemanager.datadog.models.LogRules; -import com.azure.resourcemanager.datadog.models.TagAction; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LogRulesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogRules model = BinaryData.fromString( - "{\"sendAadLogs\":false,\"sendSubscriptionLogs\":true,\"sendResourceLogs\":false,\"filteringTags\":[{\"name\":\"aodsfcpkv\",\"value\":\"dpuozmyz\",\"action\":\"Exclude\"},{\"name\":\"fuaxbe\",\"value\":\"iu\",\"action\":\"Include\"}]}") - .toObject(LogRules.class); - Assertions.assertEquals(false, model.sendAadLogs()); - Assertions.assertEquals(true, model.sendSubscriptionLogs()); - Assertions.assertEquals(false, model.sendResourceLogs()); - Assertions.assertEquals("aodsfcpkv", model.filteringTags().get(0).name()); - Assertions.assertEquals("dpuozmyz", model.filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.filteringTags().get(0).action()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogRules model = new LogRules().withSendAadLogs(false) - .withSendSubscriptionLogs(true) - .withSendResourceLogs(false) - .withFilteringTags(Arrays.asList( - new FilteringTag().withName("aodsfcpkv").withValue("dpuozmyz").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("fuaxbe").withValue("iu").withAction(TagAction.INCLUDE))); - model = BinaryData.fromObject(model).toObject(LogRules.class); - Assertions.assertEquals(false, model.sendAadLogs()); - Assertions.assertEquals(true, model.sendSubscriptionLogs()); - Assertions.assertEquals(false, model.sendResourceLogs()); - Assertions.assertEquals("aodsfcpkv", model.filteringTags().get(0).name()); - Assertions.assertEquals("dpuozmyz", model.filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.filteringTags().get(0).action()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsCreateOrUpdateWithResponseMockTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 204aba538587c..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.datadog.MicrosoftDatadogManager; -import com.azure.resourcemanager.datadog.fluent.models.DatadogAgreementResourceInner; -import com.azure.resourcemanager.datadog.models.DatadogAgreementProperties; -import com.azure.resourcemanager.datadog.models.DatadogAgreementResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MarketplaceAgreementsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"publisher\":\"nhijggmebfsi\",\"product\":\"butr\",\"plan\":\"pnazzm\",\"licenseTextLink\":\"runmp\",\"privacyPolicyLink\":\"tdbhrbnla\",\"retrieveDatetime\":\"2021-04-13T18:59:18Z\",\"signature\":\"yskpbhen\",\"accepted\":false},\"id\":\"xywnytnrsynlqidy\",\"name\":\"yxczfclh\",\"type\":\"axdbabph\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MicrosoftDatadogManager manager = MicrosoftDatadogManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DatadogAgreementResource response = manager.marketplaceAgreements() - .createOrUpdateWithResponse(new DatadogAgreementResourceInner() - .withProperties(new DatadogAgreementProperties().withPublisher("txfvgx") - .withProduct("smx") - .withPlan("hmpvecx") - .withLicenseTextLink("debfqkkrbmpukgri") - .withPrivacyPolicyLink("lzlfbxzpuz") - .withRetrieveDatetime(OffsetDateTime.parse("2021-01-20T14:00:46Z")) - .withSignature("pnq") - .withAccepted(true)), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("nhijggmebfsi", response.properties().publisher()); - Assertions.assertEquals("butr", response.properties().product()); - Assertions.assertEquals("pnazzm", response.properties().plan()); - Assertions.assertEquals("runmp", response.properties().licenseTextLink()); - Assertions.assertEquals("tdbhrbnla", response.properties().privacyPolicyLink()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-13T18:59:18Z"), response.properties().retrieveDatetime()); - Assertions.assertEquals("yskpbhen", response.properties().signature()); - Assertions.assertEquals(false, response.properties().accepted()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsListMockTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsListMockTests.java deleted file mode 100644 index 77f012be43d99..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsListMockTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.datadog.MicrosoftDatadogManager; -import com.azure.resourcemanager.datadog.models.DatadogAgreementResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MarketplaceAgreementsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"publisher\":\"tcktvfcivfsnky\",\"product\":\"ctq\",\"plan\":\"fbebrjcxer\",\"licenseTextLink\":\"wutttxfvjrbi\",\"privacyPolicyLink\":\"hxepcyvahfnlj\",\"retrieveDatetime\":\"2021-01-31T22:23:26Z\",\"signature\":\"j\",\"accepted\":false},\"id\":\"qgidokgjljyo\",\"name\":\"gvcl\",\"type\":\"bgsncghkjeszzhb\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MicrosoftDatadogManager manager = MicrosoftDatadogManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.marketplaceAgreements().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("tcktvfcivfsnky", response.iterator().next().properties().publisher()); - Assertions.assertEquals("ctq", response.iterator().next().properties().product()); - Assertions.assertEquals("fbebrjcxer", response.iterator().next().properties().plan()); - Assertions.assertEquals("wutttxfvjrbi", response.iterator().next().properties().licenseTextLink()); - Assertions.assertEquals("hxepcyvahfnlj", response.iterator().next().properties().privacyPolicyLink()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-31T22:23:26Z"), - response.iterator().next().properties().retrieveDatetime()); - Assertions.assertEquals("j", response.iterator().next().properties().signature()); - Assertions.assertEquals(false, response.iterator().next().properties().accepted()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MetricRulesTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MetricRulesTests.java deleted file mode 100644 index b8a2d67d6fa66..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MetricRulesTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.models.FilteringTag; -import com.azure.resourcemanager.datadog.models.MetricRules; -import com.azure.resourcemanager.datadog.models.TagAction; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MetricRulesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetricRules model = BinaryData - .fromString( - "{\"filteringTags\":[{\"name\":\"sfksy\",\"value\":\"dystkiiuxhqyud\",\"action\":\"Exclude\"}]}") - .toObject(MetricRules.class); - Assertions.assertEquals("sfksy", model.filteringTags().get(0).name()); - Assertions.assertEquals("dystkiiuxhqyud", model.filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.filteringTags().get(0).action()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricRules model = new MetricRules().withFilteringTags(Arrays - .asList(new FilteringTag().withName("sfksy").withValue("dystkiiuxhqyud").withAction(TagAction.EXCLUDE))); - model = BinaryData.fromObject(model).toObject(MetricRules.class); - Assertions.assertEquals("sfksy", model.filteringTags().get(0).name()); - Assertions.assertEquals("dystkiiuxhqyud", model.filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.filteringTags().get(0).action()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitorUpdatePropertiesTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitorUpdatePropertiesTests.java deleted file mode 100644 index fb01ec114f15d..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitorUpdatePropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.models.MonitorUpdateProperties; -import com.azure.resourcemanager.datadog.models.MonitoringStatus; -import org.junit.jupiter.api.Assertions; - -public final class MonitorUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitorUpdateProperties model = BinaryData.fromString("{\"monitoringStatus\":\"Enabled\",\"cspm\":true}") - .toObject(MonitorUpdateProperties.class); - Assertions.assertEquals(MonitoringStatus.ENABLED, model.monitoringStatus()); - Assertions.assertEquals(true, model.cspm()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitorUpdateProperties model - = new MonitorUpdateProperties().withMonitoringStatus(MonitoringStatus.ENABLED).withCspm(true); - model = BinaryData.fromObject(model).toObject(MonitorUpdateProperties.class); - Assertions.assertEquals(MonitoringStatus.ENABLED, model.monitoringStatus()); - Assertions.assertEquals(true, model.cspm()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredResourceInnerTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredResourceInnerTests.java deleted file mode 100644 index f183787aa4903..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredResourceInnerTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.fluent.models.MonitoredResourceInner; -import org.junit.jupiter.api.Assertions; - -public final class MonitoredResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoredResourceInner model = BinaryData.fromString( - "{\"id\":\"whdsoifiyip\",\"sendingMetrics\":false,\"reasonForMetricsStatus\":\"wpgrjbzno\",\"sendingLogs\":true,\"reasonForLogsStatus\":\"vsnb\"}") - .toObject(MonitoredResourceInner.class); - Assertions.assertEquals("whdsoifiyip", model.id()); - Assertions.assertEquals(false, model.sendingMetrics()); - Assertions.assertEquals("wpgrjbzno", model.reasonForMetricsStatus()); - Assertions.assertEquals(true, model.sendingLogs()); - Assertions.assertEquals("vsnb", model.reasonForLogsStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoredResourceInner model = new MonitoredResourceInner().withId("whdsoifiyip") - .withSendingMetrics(false) - .withReasonForMetricsStatus("wpgrjbzno") - .withSendingLogs(true) - .withReasonForLogsStatus("vsnb"); - model = BinaryData.fromObject(model).toObject(MonitoredResourceInner.class); - Assertions.assertEquals("whdsoifiyip", model.id()); - Assertions.assertEquals(false, model.sendingMetrics()); - Assertions.assertEquals("wpgrjbzno", model.reasonForMetricsStatus()); - Assertions.assertEquals(true, model.sendingLogs()); - Assertions.assertEquals("vsnb", model.reasonForLogsStatus()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredResourceListResponseTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredResourceListResponseTests.java deleted file mode 100644 index eb090425ccc32..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredResourceListResponseTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.fluent.models.MonitoredResourceInner; -import com.azure.resourcemanager.datadog.models.MonitoredResourceListResponse; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MonitoredResourceListResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoredResourceListResponse model = BinaryData.fromString( - "{\"value\":[{\"id\":\"wxmnteiwao\",\"sendingMetrics\":false,\"reasonForMetricsStatus\":\"ijcmmx\",\"sendingLogs\":false,\"reasonForLogsStatus\":\"uf\"},{\"id\":\"pymzidnsezcxtbzs\",\"sendingMetrics\":false,\"reasonForMetricsStatus\":\"cs\",\"sendingLogs\":true,\"reasonForLogsStatus\":\"dwzjeiach\"},{\"id\":\"osfln\",\"sendingMetrics\":true,\"reasonForMetricsStatus\":\"qpteeh\",\"sendingLogs\":true,\"reasonForLogsStatus\":\"pyqr\"},{\"id\":\"z\",\"sendingMetrics\":true,\"reasonForMetricsStatus\":\"swjdkirso\",\"sendingLogs\":false,\"reasonForLogsStatus\":\"hc\"}],\"nextLink\":\"nohjt\"}") - .toObject(MonitoredResourceListResponse.class); - Assertions.assertEquals("wxmnteiwao", model.value().get(0).id()); - Assertions.assertEquals(false, model.value().get(0).sendingMetrics()); - Assertions.assertEquals("ijcmmx", model.value().get(0).reasonForMetricsStatus()); - Assertions.assertEquals(false, model.value().get(0).sendingLogs()); - Assertions.assertEquals("uf", model.value().get(0).reasonForLogsStatus()); - Assertions.assertEquals("nohjt", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoredResourceListResponse model = new MonitoredResourceListResponse().withValue(Arrays.asList( - new MonitoredResourceInner().withId("wxmnteiwao") - .withSendingMetrics(false) - .withReasonForMetricsStatus("ijcmmx") - .withSendingLogs(false) - .withReasonForLogsStatus("uf"), - new MonitoredResourceInner().withId("pymzidnsezcxtbzs") - .withSendingMetrics(false) - .withReasonForMetricsStatus("cs") - .withSendingLogs(true) - .withReasonForLogsStatus("dwzjeiach"), - new MonitoredResourceInner().withId("osfln") - .withSendingMetrics(true) - .withReasonForMetricsStatus("qpteeh") - .withSendingLogs(true) - .withReasonForLogsStatus("pyqr"), - new MonitoredResourceInner().withId("z") - .withSendingMetrics(true) - .withReasonForMetricsStatus("swjdkirso") - .withSendingLogs(false) - .withReasonForLogsStatus("hc"))) - .withNextLink("nohjt"); - model = BinaryData.fromObject(model).toObject(MonitoredResourceListResponse.class); - Assertions.assertEquals("wxmnteiwao", model.value().get(0).id()); - Assertions.assertEquals(false, model.value().get(0).sendingMetrics()); - Assertions.assertEquals("ijcmmx", model.value().get(0).reasonForMetricsStatus()); - Assertions.assertEquals(false, model.value().get(0).sendingLogs()); - Assertions.assertEquals("uf", model.value().get(0).reasonForLogsStatus()); - Assertions.assertEquals("nohjt", model.nextLink()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionPropertiesInnerTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionPropertiesInnerTests.java deleted file mode 100644 index b4554f4d28093..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionPropertiesInnerTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.fluent.models.MonitoredSubscriptionPropertiesInner; -import com.azure.resourcemanager.datadog.models.FilteringTag; -import com.azure.resourcemanager.datadog.models.LogRules; -import com.azure.resourcemanager.datadog.models.MetricRules; -import com.azure.resourcemanager.datadog.models.MonitoredSubscription; -import com.azure.resourcemanager.datadog.models.MonitoringTagRulesProperties; -import com.azure.resourcemanager.datadog.models.Operation; -import com.azure.resourcemanager.datadog.models.Status; -import com.azure.resourcemanager.datadog.models.SubscriptionList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MonitoredSubscriptionPropertiesInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoredSubscriptionPropertiesInner model = BinaryData.fromString( - "{\"name\":\"ou\",\"id\":\"vudwtiukbldng\",\"type\":\"ocipazyxoeg\",\"properties\":{\"operation\":\"AddComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"ucgygevqz\",\"status\":\"InProgress\",\"error\":\"mrbpizcdrqj\",\"tagRules\":{\"provisioningState\":\"Failed\",\"logRules\":{\"sendAadLogs\":false,\"sendSubscriptionLogs\":false,\"sendResourceLogs\":false,\"filteringTags\":[{},{}]},\"metricRules\":{\"filteringTags\":[{}]},\"automuting\":false}}]}}") - .toObject(MonitoredSubscriptionPropertiesInner.class); - Assertions.assertEquals(Operation.ADD_COMPLETE, model.properties().operation()); - Assertions.assertEquals("ucgygevqz", model.properties().monitoredSubscriptionList().get(0).subscriptionId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.properties().monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("mrbpizcdrqj", model.properties().monitoredSubscriptionList().get(0).error()); - Assertions.assertEquals(false, - model.properties().monitoredSubscriptionList().get(0).tagRules().logRules().sendAadLogs()); - Assertions.assertEquals(false, - model.properties().monitoredSubscriptionList().get(0).tagRules().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(false, - model.properties().monitoredSubscriptionList().get(0).tagRules().logRules().sendResourceLogs()); - Assertions.assertEquals(false, model.properties().monitoredSubscriptionList().get(0).tagRules().automuting()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoredSubscriptionPropertiesInner model = new MonitoredSubscriptionPropertiesInner() - .withProperties(new SubscriptionList().withOperation(Operation.ADD_COMPLETE) - .withMonitoredSubscriptionList(Arrays.asList(new MonitoredSubscription().withSubscriptionId("ucgygevqz") - .withStatus(Status.IN_PROGRESS) - .withError("mrbpizcdrqj") - .withTagRules(new MonitoringTagRulesProperties() - .withLogRules(new LogRules().withSendAadLogs(false) - .withSendSubscriptionLogs(false) - .withSendResourceLogs(false) - .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag()))) - .withMetricRules(new MetricRules().withFilteringTags(Arrays.asList(new FilteringTag()))) - .withAutomuting(false))))); - model = BinaryData.fromObject(model).toObject(MonitoredSubscriptionPropertiesInner.class); - Assertions.assertEquals(Operation.ADD_COMPLETE, model.properties().operation()); - Assertions.assertEquals("ucgygevqz", model.properties().monitoredSubscriptionList().get(0).subscriptionId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.properties().monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("mrbpizcdrqj", model.properties().monitoredSubscriptionList().get(0).error()); - Assertions.assertEquals(false, - model.properties().monitoredSubscriptionList().get(0).tagRules().logRules().sendAadLogs()); - Assertions.assertEquals(false, - model.properties().monitoredSubscriptionList().get(0).tagRules().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(false, - model.properties().monitoredSubscriptionList().get(0).tagRules().logRules().sendResourceLogs()); - Assertions.assertEquals(false, model.properties().monitoredSubscriptionList().get(0).tagRules().automuting()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionPropertiesListTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionPropertiesListTests.java deleted file mode 100644 index 8daf2b3843751..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionPropertiesListTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.fluent.models.MonitoredSubscriptionPropertiesInner; -import com.azure.resourcemanager.datadog.models.MonitoredSubscription; -import com.azure.resourcemanager.datadog.models.MonitoredSubscriptionPropertiesList; -import com.azure.resourcemanager.datadog.models.MonitoringTagRulesProperties; -import com.azure.resourcemanager.datadog.models.Operation; -import com.azure.resourcemanager.datadog.models.Status; -import com.azure.resourcemanager.datadog.models.SubscriptionList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MonitoredSubscriptionPropertiesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoredSubscriptionPropertiesList model = BinaryData.fromString( - "{\"value\":[{\"name\":\"aos\",\"id\":\"xc\",\"type\":\"npc\",\"properties\":{\"operation\":\"AddComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"lkevle\",\"status\":\"Active\",\"error\":\"buhfmvfaxkffeiit\",\"tagRules\":{}},{\"subscriptionId\":\"m\",\"status\":\"Active\",\"error\":\"shxmzsbbzoggigrx\",\"tagRules\":{}},{\"subscriptionId\":\"rvjx\",\"status\":\"Deleting\",\"error\":\"pydptko\",\"tagRules\":{}}]}}]}") - .toObject(MonitoredSubscriptionPropertiesList.class); - Assertions.assertEquals(Operation.ADD_COMPLETE, model.value().get(0).properties().operation()); - Assertions.assertEquals("lkevle", - model.value().get(0).properties().monitoredSubscriptionList().get(0).subscriptionId()); - Assertions.assertEquals(Status.ACTIVE, - model.value().get(0).properties().monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("buhfmvfaxkffeiit", - model.value().get(0).properties().monitoredSubscriptionList().get(0).error()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoredSubscriptionPropertiesList model = new MonitoredSubscriptionPropertiesList() - .withValue(Arrays.asList(new MonitoredSubscriptionPropertiesInner() - .withProperties(new SubscriptionList().withOperation(Operation.ADD_COMPLETE) - .withMonitoredSubscriptionList(Arrays.asList( - new MonitoredSubscription().withSubscriptionId("lkevle") - .withStatus(Status.ACTIVE) - .withError("buhfmvfaxkffeiit") - .withTagRules(new MonitoringTagRulesProperties()), - new MonitoredSubscription().withSubscriptionId("m") - .withStatus(Status.ACTIVE) - .withError("shxmzsbbzoggigrx") - .withTagRules(new MonitoringTagRulesProperties()), - new MonitoredSubscription().withSubscriptionId("rvjx") - .withStatus(Status.DELETING) - .withError("pydptko") - .withTagRules(new MonitoringTagRulesProperties())))))); - model = BinaryData.fromObject(model).toObject(MonitoredSubscriptionPropertiesList.class); - Assertions.assertEquals(Operation.ADD_COMPLETE, model.value().get(0).properties().operation()); - Assertions.assertEquals("lkevle", - model.value().get(0).properties().monitoredSubscriptionList().get(0).subscriptionId()); - Assertions.assertEquals(Status.ACTIVE, - model.value().get(0).properties().monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("buhfmvfaxkffeiit", - model.value().get(0).properties().monitoredSubscriptionList().get(0).error()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionTests.java deleted file mode 100644 index 170178c045866..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.models.FilteringTag; -import com.azure.resourcemanager.datadog.models.LogRules; -import com.azure.resourcemanager.datadog.models.MetricRules; -import com.azure.resourcemanager.datadog.models.MonitoredSubscription; -import com.azure.resourcemanager.datadog.models.MonitoringTagRulesProperties; -import com.azure.resourcemanager.datadog.models.Status; -import com.azure.resourcemanager.datadog.models.TagAction; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MonitoredSubscriptionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoredSubscription model = BinaryData.fromString( - "{\"subscriptionId\":\"gyxzk\",\"status\":\"Failed\",\"error\":\"uko\",\"tagRules\":{\"provisioningState\":\"Deleting\",\"logRules\":{\"sendAadLogs\":true,\"sendSubscriptionLogs\":true,\"sendResourceLogs\":false,\"filteringTags\":[{\"name\":\"kbeype\",\"value\":\"mjmwvvjektcx\",\"action\":\"Exclude\"}]},\"metricRules\":{\"filteringTags\":[{\"name\":\"s\",\"value\":\"rzpwvlqdqgbiq\",\"action\":\"Exclude\"}]},\"automuting\":false}}") - .toObject(MonitoredSubscription.class); - Assertions.assertEquals("gyxzk", model.subscriptionId()); - Assertions.assertEquals(Status.FAILED, model.status()); - Assertions.assertEquals("uko", model.error()); - Assertions.assertEquals(true, model.tagRules().logRules().sendAadLogs()); - Assertions.assertEquals(true, model.tagRules().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(false, model.tagRules().logRules().sendResourceLogs()); - Assertions.assertEquals("kbeype", model.tagRules().logRules().filteringTags().get(0).name()); - Assertions.assertEquals("mjmwvvjektcx", model.tagRules().logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.tagRules().logRules().filteringTags().get(0).action()); - Assertions.assertEquals("s", model.tagRules().metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("rzpwvlqdqgbiq", model.tagRules().metricRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.tagRules().metricRules().filteringTags().get(0).action()); - Assertions.assertEquals(false, model.tagRules().automuting()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoredSubscription model = new MonitoredSubscription().withSubscriptionId("gyxzk") - .withStatus(Status.FAILED) - .withError("uko") - .withTagRules(new MonitoringTagRulesProperties() - .withLogRules(new LogRules().withSendAadLogs(true) - .withSendSubscriptionLogs(true) - .withSendResourceLogs(false) - .withFilteringTags(Arrays.asList( - new FilteringTag().withName("kbeype").withValue("mjmwvvjektcx").withAction(TagAction.EXCLUDE)))) - .withMetricRules(new MetricRules().withFilteringTags(Arrays - .asList(new FilteringTag().withName("s").withValue("rzpwvlqdqgbiq").withAction(TagAction.EXCLUDE)))) - .withAutomuting(false)); - model = BinaryData.fromObject(model).toObject(MonitoredSubscription.class); - Assertions.assertEquals("gyxzk", model.subscriptionId()); - Assertions.assertEquals(Status.FAILED, model.status()); - Assertions.assertEquals("uko", model.error()); - Assertions.assertEquals(true, model.tagRules().logRules().sendAadLogs()); - Assertions.assertEquals(true, model.tagRules().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(false, model.tagRules().logRules().sendResourceLogs()); - Assertions.assertEquals("kbeype", model.tagRules().logRules().filteringTags().get(0).name()); - Assertions.assertEquals("mjmwvvjektcx", model.tagRules().logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.tagRules().logRules().filteringTags().get(0).action()); - Assertions.assertEquals("s", model.tagRules().metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("rzpwvlqdqgbiq", model.tagRules().metricRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.tagRules().metricRules().filteringTags().get(0).action()); - Assertions.assertEquals(false, model.tagRules().automuting()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsCreateorUpdateMockTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsCreateorUpdateMockTests.java deleted file mode 100644 index e4d643875178a..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsCreateorUpdateMockTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.datadog.MicrosoftDatadogManager; -import com.azure.resourcemanager.datadog.models.LogRules; -import com.azure.resourcemanager.datadog.models.MetricRules; -import com.azure.resourcemanager.datadog.models.MonitoredSubscription; -import com.azure.resourcemanager.datadog.models.MonitoredSubscriptionProperties; -import com.azure.resourcemanager.datadog.models.MonitoringTagRulesProperties; -import com.azure.resourcemanager.datadog.models.Operation; -import com.azure.resourcemanager.datadog.models.Status; -import com.azure.resourcemanager.datadog.models.SubscriptionList; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MonitoredSubscriptionsCreateorUpdateMockTests { - @Test - public void testCreateorUpdate() throws Exception { - String responseStr - = "{\"name\":\"ljxywsu\",\"id\":\"yrs\",\"type\":\"sytgadgvraea\",\"properties\":{\"operation\":\"DeleteBegin\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"rrwlquuijfqkace\",\"status\":\"Active\",\"error\":\"fpubjibwwi\",\"tagRules\":{\"provisioningState\":\"Failed\",\"logRules\":{},\"metricRules\":{},\"automuting\":false}}]}}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MicrosoftDatadogManager manager = MicrosoftDatadogManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MonitoredSubscriptionProperties response = manager.monitoredSubscriptions() - .define("tddckcb") - .withExistingMonitor("qvmkcxo", "apvhelxprgly") - .withProperties(new SubscriptionList().withOperation(Operation.DELETE_BEGIN) - .withMonitoredSubscriptionList(Arrays.asList( - new MonitoredSubscription().withSubscriptionId("rkwofyyvoqa") - .withStatus(Status.FAILED) - .withError("xpbtgiwbwo") - .withTagRules(new MonitoringTagRulesProperties().withLogRules(new LogRules()) - .withMetricRules(new MetricRules()) - .withAutomuting(false)), - new MonitoredSubscription().withSubscriptionId("tkcnqxwb") - .withStatus(Status.FAILED) - .withError("lpiujwaa") - .withTagRules(new MonitoringTagRulesProperties().withLogRules(new LogRules()) - .withMetricRules(new MetricRules()) - .withAutomuting(true)), - new MonitoredSubscription().withSubscriptionId("uqerpqlpqwc") - .withStatus(Status.DELETING) - .withError("gbdbutauv") - .withTagRules(new MonitoringTagRulesProperties().withLogRules(new LogRules()) - .withMetricRules(new MetricRules()) - .withAutomuting(false)), - new MonitoredSubscription().withSubscriptionId("hykojoxafnndlpic") - .withStatus(Status.IN_PROGRESS) - .withError("mkcdyhbpkkpwdre") - .withTagRules(new MonitoringTagRulesProperties().withLogRules(new LogRules()) - .withMetricRules(new MetricRules()) - .withAutomuting(true))))) - .create(); - - Assertions.assertEquals(Operation.DELETE_BEGIN, response.properties().operation()); - Assertions.assertEquals("rrwlquuijfqkace", - response.properties().monitoredSubscriptionList().get(0).subscriptionId()); - Assertions.assertEquals(Status.ACTIVE, response.properties().monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("fpubjibwwi", response.properties().monitoredSubscriptionList().get(0).error()); - Assertions.assertEquals(false, - response.properties().monitoredSubscriptionList().get(0).tagRules().automuting()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsDeleteMockTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsDeleteMockTests.java deleted file mode 100644 index d7e91ff28f3ea..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsDeleteMockTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.datadog.MicrosoftDatadogManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MonitoredSubscriptionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MicrosoftDatadogManager manager = MicrosoftDatadogManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.monitoredSubscriptions() - .delete("mquxvypo", "gkopkwhojvpajqgx", "smocmbq", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsGetWithResponseMockTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsGetWithResponseMockTests.java deleted file mode 100644 index 0ef96c0b17704..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsGetWithResponseMockTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.datadog.MicrosoftDatadogManager; -import com.azure.resourcemanager.datadog.models.MonitoredSubscriptionProperties; -import com.azure.resourcemanager.datadog.models.Operation; -import com.azure.resourcemanager.datadog.models.Status; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MonitoredSubscriptionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"name\":\"gx\",\"id\":\"rslpmutwuoeg\",\"type\":\"khjwn\",\"properties\":{\"operation\":\"DeleteComplete\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"cpdggkzzlvmbmp\",\"status\":\"Deleting\",\"error\":\"dfvue\",\"tagRules\":{\"provisioningState\":\"Deleted\",\"logRules\":{},\"metricRules\":{},\"automuting\":false}},{\"subscriptionId\":\"wyhrfouyftaakc\",\"status\":\"Failed\",\"error\":\"zvqtmnubexkp\",\"tagRules\":{\"provisioningState\":\"Deleting\",\"logRules\":{},\"metricRules\":{},\"automuting\":true}}]}}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MicrosoftDatadogManager manager = MicrosoftDatadogManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MonitoredSubscriptionProperties response = manager.monitoredSubscriptions() - .getWithResponse("drhvoodsotbo", "zdopcjwvnhd", "d", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(Operation.DELETE_COMPLETE, response.properties().operation()); - Assertions.assertEquals("cpdggkzzlvmbmp", - response.properties().monitoredSubscriptionList().get(0).subscriptionId()); - Assertions.assertEquals(Status.DELETING, response.properties().monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("dfvue", response.properties().monitoredSubscriptionList().get(0).error()); - Assertions.assertEquals(false, - response.properties().monitoredSubscriptionList().get(0).tagRules().automuting()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsListMockTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsListMockTests.java deleted file mode 100644 index 9c6361389d43a..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoredSubscriptionsListMockTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.datadog.MicrosoftDatadogManager; -import com.azure.resourcemanager.datadog.models.MonitoredSubscriptionProperties; -import com.azure.resourcemanager.datadog.models.Operation; -import com.azure.resourcemanager.datadog.models.Status; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MonitoredSubscriptionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"jutiiswacff\",\"id\":\"k\",\"type\":\"ewkfvhqcrai\",\"properties\":{\"operation\":\"Active\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"uflrwd\",\"status\":\"Active\",\"error\":\"xyjrxsagafcnih\",\"tagRules\":{\"provisioningState\":\"Succeeded\",\"logRules\":{},\"metricRules\":{},\"automuting\":true}},{\"subscriptionId\":\"fb\",\"status\":\"Active\",\"error\":\"vq\",\"tagRules\":{\"provisioningState\":\"Succeeded\",\"logRules\":{},\"metricRules\":{},\"automuting\":false}}]}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MicrosoftDatadogManager manager = MicrosoftDatadogManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.monitoredSubscriptions().list("lvithhqzonosgg", "hcohfwdsjnk", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(Operation.ACTIVE, response.iterator().next().properties().operation()); - Assertions.assertEquals("uflrwd", - response.iterator().next().properties().monitoredSubscriptionList().get(0).subscriptionId()); - Assertions.assertEquals(Status.ACTIVE, - response.iterator().next().properties().monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("xyjrxsagafcnih", - response.iterator().next().properties().monitoredSubscriptionList().get(0).error()); - Assertions.assertEquals(true, - response.iterator().next().properties().monitoredSubscriptionList().get(0).tagRules().automuting()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoringTagRulesInnerTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoringTagRulesInnerTests.java deleted file mode 100644 index ed7b8bb562bab..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoringTagRulesInnerTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.fluent.models.MonitoringTagRulesInner; -import com.azure.resourcemanager.datadog.models.FilteringTag; -import com.azure.resourcemanager.datadog.models.LogRules; -import com.azure.resourcemanager.datadog.models.MetricRules; -import com.azure.resourcemanager.datadog.models.MonitoringTagRulesProperties; -import com.azure.resourcemanager.datadog.models.TagAction; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MonitoringTagRulesInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoringTagRulesInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Deleting\",\"logRules\":{\"sendAadLogs\":false,\"sendSubscriptionLogs\":true,\"sendResourceLogs\":false,\"filteringTags\":[{\"name\":\"snzwd\",\"value\":\"bavo\",\"action\":\"Exclude\"},{\"name\":\"mohctb\",\"value\":\"udwxdndnvowguj\",\"action\":\"Exclude\"},{\"name\":\"dkcglhsl\",\"value\":\"jdyggdtji\",\"action\":\"Include\"},{\"name\":\"uofqwe\",\"value\":\"hmenevfyexfwhybc\",\"action\":\"Include\"}]},\"metricRules\":{\"filteringTags\":[{\"name\":\"sit\",\"value\":\"naamde\",\"action\":\"Include\"}]},\"automuting\":false},\"id\":\"qsc\",\"name\":\"eypvhezrkg\",\"type\":\"hcjrefovgmk\"}") - .toObject(MonitoringTagRulesInner.class); - Assertions.assertEquals(false, model.properties().logRules().sendAadLogs()); - Assertions.assertEquals(true, model.properties().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(false, model.properties().logRules().sendResourceLogs()); - Assertions.assertEquals("snzwd", model.properties().logRules().filteringTags().get(0).name()); - Assertions.assertEquals("bavo", model.properties().logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.properties().logRules().filteringTags().get(0).action()); - Assertions.assertEquals("sit", model.properties().metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("naamde", model.properties().metricRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, model.properties().metricRules().filteringTags().get(0).action()); - Assertions.assertEquals(false, model.properties().automuting()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoringTagRulesInner model = new MonitoringTagRulesInner().withProperties(new MonitoringTagRulesProperties() - .withLogRules(new LogRules().withSendAadLogs(false) - .withSendSubscriptionLogs(true) - .withSendResourceLogs(false) - .withFilteringTags(Arrays.asList( - new FilteringTag().withName("snzwd").withValue("bavo").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("mohctb").withValue("udwxdndnvowguj").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("dkcglhsl").withValue("jdyggdtji").withAction(TagAction.INCLUDE), - new FilteringTag().withName("uofqwe").withValue("hmenevfyexfwhybc").withAction(TagAction.INCLUDE)))) - .withMetricRules(new MetricRules().withFilteringTags( - Arrays.asList(new FilteringTag().withName("sit").withValue("naamde").withAction(TagAction.INCLUDE)))) - .withAutomuting(false)); - model = BinaryData.fromObject(model).toObject(MonitoringTagRulesInner.class); - Assertions.assertEquals(false, model.properties().logRules().sendAadLogs()); - Assertions.assertEquals(true, model.properties().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(false, model.properties().logRules().sendResourceLogs()); - Assertions.assertEquals("snzwd", model.properties().logRules().filteringTags().get(0).name()); - Assertions.assertEquals("bavo", model.properties().logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.properties().logRules().filteringTags().get(0).action()); - Assertions.assertEquals("sit", model.properties().metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("naamde", model.properties().metricRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, model.properties().metricRules().filteringTags().get(0).action()); - Assertions.assertEquals(false, model.properties().automuting()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoringTagRulesListResponseTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoringTagRulesListResponseTests.java deleted file mode 100644 index 68ebf54c0fefe..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoringTagRulesListResponseTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.fluent.models.MonitoringTagRulesInner; -import com.azure.resourcemanager.datadog.models.FilteringTag; -import com.azure.resourcemanager.datadog.models.LogRules; -import com.azure.resourcemanager.datadog.models.MetricRules; -import com.azure.resourcemanager.datadog.models.MonitoringTagRulesListResponse; -import com.azure.resourcemanager.datadog.models.MonitoringTagRulesProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MonitoringTagRulesListResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoringTagRulesListResponse model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"logRules\":{\"sendAadLogs\":true,\"sendSubscriptionLogs\":false,\"sendResourceLogs\":false,\"filteringTags\":[{},{},{},{}]},\"metricRules\":{\"filteringTags\":[{}]},\"automuting\":false},\"id\":\"okeyyienj\",\"name\":\"dlwtgrhpdj\",\"type\":\"jumasx\"},{\"properties\":{\"provisioningState\":\"Creating\",\"logRules\":{\"sendAadLogs\":false,\"sendSubscriptionLogs\":true,\"sendResourceLogs\":true,\"filteringTags\":[{}]},\"metricRules\":{\"filteringTags\":[{},{}]},\"automuting\":false},\"id\":\"zzvdudgwds\",\"name\":\"fhotw\",\"type\":\"cynpwlbjnp\"}],\"nextLink\":\"cftadeh\"}") - .toObject(MonitoringTagRulesListResponse.class); - Assertions.assertEquals(true, model.value().get(0).properties().logRules().sendAadLogs()); - Assertions.assertEquals(false, model.value().get(0).properties().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(false, model.value().get(0).properties().logRules().sendResourceLogs()); - Assertions.assertEquals(false, model.value().get(0).properties().automuting()); - Assertions.assertEquals("cftadeh", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoringTagRulesListResponse model - = new MonitoringTagRulesListResponse().withValue(Arrays.asList( - new MonitoringTagRulesInner().withProperties(new MonitoringTagRulesProperties() - .withLogRules(new LogRules().withSendAadLogs(true) - .withSendSubscriptionLogs(false) - .withSendResourceLogs(false) - .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag(), new FilteringTag(), - new FilteringTag()))) - .withMetricRules(new MetricRules().withFilteringTags(Arrays.asList(new FilteringTag()))) - .withAutomuting(false)), - new MonitoringTagRulesInner().withProperties(new MonitoringTagRulesProperties() - .withLogRules(new LogRules().withSendAadLogs(false) - .withSendSubscriptionLogs(true) - .withSendResourceLogs(true) - .withFilteringTags(Arrays.asList(new FilteringTag()))) - .withMetricRules( - new MetricRules().withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag()))) - .withAutomuting(false)))) - .withNextLink("cftadeh"); - model = BinaryData.fromObject(model).toObject(MonitoringTagRulesListResponse.class); - Assertions.assertEquals(true, model.value().get(0).properties().logRules().sendAadLogs()); - Assertions.assertEquals(false, model.value().get(0).properties().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(false, model.value().get(0).properties().logRules().sendResourceLogs()); - Assertions.assertEquals(false, model.value().get(0).properties().automuting()); - Assertions.assertEquals("cftadeh", model.nextLink()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoringTagRulesPropertiesTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoringTagRulesPropertiesTests.java deleted file mode 100644 index 1c65ff61b7820..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitoringTagRulesPropertiesTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.models.FilteringTag; -import com.azure.resourcemanager.datadog.models.LogRules; -import com.azure.resourcemanager.datadog.models.MetricRules; -import com.azure.resourcemanager.datadog.models.MonitoringTagRulesProperties; -import com.azure.resourcemanager.datadog.models.TagAction; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MonitoringTagRulesPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoringTagRulesProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Creating\",\"logRules\":{\"sendAadLogs\":false,\"sendSubscriptionLogs\":false,\"sendResourceLogs\":true,\"filteringTags\":[{\"name\":\"cattpngjcrcczsq\",\"value\":\"hvmdajvnysounq\",\"action\":\"Include\"}]},\"metricRules\":{\"filteringTags\":[{\"name\":\"upfh\",\"value\":\"ltrpmopj\",\"action\":\"Include\"}]},\"automuting\":false}") - .toObject(MonitoringTagRulesProperties.class); - Assertions.assertEquals(false, model.logRules().sendAadLogs()); - Assertions.assertEquals(false, model.logRules().sendSubscriptionLogs()); - Assertions.assertEquals(true, model.logRules().sendResourceLogs()); - Assertions.assertEquals("cattpngjcrcczsq", model.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("hvmdajvnysounq", model.logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, model.logRules().filteringTags().get(0).action()); - Assertions.assertEquals("upfh", model.metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("ltrpmopj", model.metricRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, model.metricRules().filteringTags().get(0).action()); - Assertions.assertEquals(false, model.automuting()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoringTagRulesProperties model = new MonitoringTagRulesProperties() - .withLogRules(new LogRules().withSendAadLogs(false) - .withSendSubscriptionLogs(false) - .withSendResourceLogs(true) - .withFilteringTags(Arrays.asList(new FilteringTag().withName("cattpngjcrcczsq") - .withValue("hvmdajvnysounq") - .withAction(TagAction.INCLUDE)))) - .withMetricRules(new MetricRules().withFilteringTags( - Arrays.asList(new FilteringTag().withName("upfh").withValue("ltrpmopj").withAction(TagAction.INCLUDE)))) - .withAutomuting(false); - model = BinaryData.fromObject(model).toObject(MonitoringTagRulesProperties.class); - Assertions.assertEquals(false, model.logRules().sendAadLogs()); - Assertions.assertEquals(false, model.logRules().sendSubscriptionLogs()); - Assertions.assertEquals(true, model.logRules().sendResourceLogs()); - Assertions.assertEquals("cattpngjcrcczsq", model.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("hvmdajvnysounq", model.logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, model.logRules().filteringTags().get(0).action()); - Assertions.assertEquals("upfh", model.metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("ltrpmopj", model.metricRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, model.metricRules().filteringTags().get(0).action()); - Assertions.assertEquals(false, model.automuting()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitorsDeleteMockTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitorsDeleteMockTests.java deleted file mode 100644 index 3ca425f021a9d..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitorsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.datadog.MicrosoftDatadogManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MonitorsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MicrosoftDatadogManager manager = MicrosoftDatadogManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.monitors().delete("sowzxcugi", "jooxdjebw", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitorsListHostsMockTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitorsListHostsMockTests.java deleted file mode 100644 index 74ea7caaf623e..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitorsListHostsMockTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.datadog.MicrosoftDatadogManager; -import com.azure.resourcemanager.datadog.models.DatadogHost; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MonitorsListHostsMockTests { - @Test - public void testListHosts() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"ebtfhvpesap\",\"aliases\":[\"dqmh\",\"jdhtldwkyzxu\",\"tkncwsc\",\"svlxotogtwrup\"],\"apps\":[\"vnm\",\"cykvceo\",\"eil\",\"vnotyfjfcnj\"],\"meta\":{\"agentVersion\":\"nxdhbt\",\"installMethod\":{\"tool\":\"h\",\"toolVersion\":\"pnvjtoqnermclf\",\"installerVersion\":\"phoxus\"},\"logsAgent\":{\"transport\":\"abgy\"}}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MicrosoftDatadogManager manager = MicrosoftDatadogManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.monitors().listHosts("upedeojnabckhs", "txp", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ebtfhvpesap", response.iterator().next().name()); - Assertions.assertEquals("dqmh", response.iterator().next().aliases().get(0)); - Assertions.assertEquals("vnm", response.iterator().next().apps().get(0)); - Assertions.assertEquals("nxdhbt", response.iterator().next().meta().agentVersion()); - Assertions.assertEquals("h", response.iterator().next().meta().installMethod().tool()); - Assertions.assertEquals("pnvjtoqnermclf", response.iterator().next().meta().installMethod().toolVersion()); - Assertions.assertEquals("phoxus", response.iterator().next().meta().installMethod().installerVersion()); - Assertions.assertEquals("abgy", response.iterator().next().meta().logsAgent().transport()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitorsListLinkedResourcesMockTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitorsListLinkedResourcesMockTests.java deleted file mode 100644 index 27f88303f28aa..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitorsListLinkedResourcesMockTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.datadog.MicrosoftDatadogManager; -import com.azure.resourcemanager.datadog.models.LinkedResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MonitorsListLinkedResourcesMockTests { - @Test - public void testListLinkedResources() throws Exception { - String responseStr = "{\"value\":[{\"id\":\"q\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MicrosoftDatadogManager manager = MicrosoftDatadogManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.monitors().listLinkedResources("psbjta", "qugxywpmueefjzwf", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("q", response.iterator().next().id()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitorsListMonitoredResourcesMockTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitorsListMonitoredResourcesMockTests.java deleted file mode 100644 index ca38c57b5e607..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/MonitorsListMonitoredResourcesMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.datadog.MicrosoftDatadogManager; -import com.azure.resourcemanager.datadog.models.MonitoredResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MonitorsListMonitoredResourcesMockTests { - @Test - public void testListMonitoredResources() throws Exception { - String responseStr - = "{\"value\":[{\"id\":\"dxyt\",\"sendingMetrics\":true,\"reasonForMetricsStatus\":\"rxv\",\"sendingLogs\":false,\"reasonForLogsStatus\":\"wpzntxhdzh\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MicrosoftDatadogManager manager = MicrosoftDatadogManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.monitors().listMonitoredResources("jidsuyonobglaoc", "xtccmg", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("dxyt", response.iterator().next().id()); - Assertions.assertEquals(true, response.iterator().next().sendingMetrics()); - Assertions.assertEquals("rxv", response.iterator().next().reasonForMetricsStatus()); - Assertions.assertEquals(false, response.iterator().next().sendingLogs()); - Assertions.assertEquals("wpzntxhdzh", response.iterator().next().reasonForLogsStatus()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/OperationDisplayTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/OperationDisplayTests.java deleted file mode 100644 index 574b8b29ed8e2..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/OperationDisplayTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"kexxppof\",\"resource\":\"axcfjpgddtocjjx\",\"operation\":\"pmouexhdz\",\"description\":\"bqe\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("kexxppof", model.provider()); - Assertions.assertEquals("axcfjpgddtocjjx", model.resource()); - Assertions.assertEquals("pmouexhdz", model.operation()); - Assertions.assertEquals("bqe", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay().withProvider("kexxppof") - .withResource("axcfjpgddtocjjx") - .withOperation("pmouexhdz") - .withDescription("bqe"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("kexxppof", model.provider()); - Assertions.assertEquals("axcfjpgddtocjjx", model.resource()); - Assertions.assertEquals("pmouexhdz", model.operation()); - Assertions.assertEquals("bqe", model.description()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/OperationListResultTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/OperationListResultTests.java deleted file mode 100644 index d5ca453b7a0b1..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/OperationListResultTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.fluent.models.OperationResultInner; -import com.azure.resourcemanager.datadog.models.OperationDisplay; -import com.azure.resourcemanager.datadog.models.OperationListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"bnmo\",\"display\":{\"provider\":\"ysh\",\"resource\":\"zafb\",\"operation\":\"j\",\"description\":\"btoqcjmkljavbqid\"},\"isDataAction\":false},{\"name\":\"zyulp\",\"display\":{\"provider\":\"jkrlkhbzhfepg\",\"resource\":\"qex\",\"operation\":\"ocxscpaierhhbcs\",\"description\":\"ummajtjaod\"},\"isDataAction\":true}],\"nextLink\":\"bdxkqpxokaj\"}") - .toObject(OperationListResult.class); - Assertions.assertEquals("bnmo", model.value().get(0).name()); - Assertions.assertEquals("ysh", model.value().get(0).display().provider()); - Assertions.assertEquals("zafb", model.value().get(0).display().resource()); - Assertions.assertEquals("j", model.value().get(0).display().operation()); - Assertions.assertEquals("btoqcjmkljavbqid", model.value().get(0).display().description()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - Assertions.assertEquals("bdxkqpxokaj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult().withValue(Arrays.asList( - new OperationResultInner().withName("bnmo") - .withDisplay(new OperationDisplay().withProvider("ysh") - .withResource("zafb") - .withOperation("j") - .withDescription("btoqcjmkljavbqid")) - .withIsDataAction(false), - new OperationResultInner().withName("zyulp") - .withDisplay(new OperationDisplay().withProvider("jkrlkhbzhfepg") - .withResource("qex") - .withOperation("ocxscpaierhhbcs") - .withDescription("ummajtjaod")) - .withIsDataAction(true))) - .withNextLink("bdxkqpxokaj"); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - Assertions.assertEquals("bnmo", model.value().get(0).name()); - Assertions.assertEquals("ysh", model.value().get(0).display().provider()); - Assertions.assertEquals("zafb", model.value().get(0).display().resource()); - Assertions.assertEquals("j", model.value().get(0).display().operation()); - Assertions.assertEquals("btoqcjmkljavbqid", model.value().get(0).display().description()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - Assertions.assertEquals("bdxkqpxokaj", model.nextLink()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/OperationResultInnerTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/OperationResultInnerTests.java deleted file mode 100644 index a638d59578a87..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/OperationResultInnerTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.fluent.models.OperationResultInner; -import com.azure.resourcemanager.datadog.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationResultInner model = BinaryData.fromString( - "{\"name\":\"npime\",\"display\":{\"provider\":\"txgcpodgmaajr\",\"resource\":\"djwzrlov\",\"operation\":\"lwhijcoejctbzaq\",\"description\":\"sycbkbfk\"},\"isDataAction\":false}") - .toObject(OperationResultInner.class); - Assertions.assertEquals("npime", model.name()); - Assertions.assertEquals("txgcpodgmaajr", model.display().provider()); - Assertions.assertEquals("djwzrlov", model.display().resource()); - Assertions.assertEquals("lwhijcoejctbzaq", model.display().operation()); - Assertions.assertEquals("sycbkbfk", model.display().description()); - Assertions.assertEquals(false, model.isDataAction()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationResultInner model = new OperationResultInner().withName("npime") - .withDisplay(new OperationDisplay().withProvider("txgcpodgmaajr") - .withResource("djwzrlov") - .withOperation("lwhijcoejctbzaq") - .withDescription("sycbkbfk")) - .withIsDataAction(false); - model = BinaryData.fromObject(model).toObject(OperationResultInner.class); - Assertions.assertEquals("npime", model.name()); - Assertions.assertEquals("txgcpodgmaajr", model.display().provider()); - Assertions.assertEquals("djwzrlov", model.display().resource()); - Assertions.assertEquals("lwhijcoejctbzaq", model.display().operation()); - Assertions.assertEquals("sycbkbfk", model.display().description()); - Assertions.assertEquals(false, model.isDataAction()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/OperationsListMockTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/OperationsListMockTests.java deleted file mode 100644 index bcd6ed0d86501..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/OperationsListMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.datadog.MicrosoftDatadogManager; -import com.azure.resourcemanager.datadog.models.OperationResult; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"ujznb\",\"display\":{\"provider\":\"wuwprzqlv\",\"resource\":\"alupjm\",\"operation\":\"fxobbcsws\",\"description\":\"jriplrbpbewtghf\"},\"isDataAction\":true}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MicrosoftDatadogManager manager = MicrosoftDatadogManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ujznb", response.iterator().next().name()); - Assertions.assertEquals("wuwprzqlv", response.iterator().next().display().provider()); - Assertions.assertEquals("alupjm", response.iterator().next().display().resource()); - Assertions.assertEquals("fxobbcsws", response.iterator().next().display().operation()); - Assertions.assertEquals("jriplrbpbewtghf", response.iterator().next().display().description()); - Assertions.assertEquals(true, response.iterator().next().isDataAction()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/ResourceSkuTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/ResourceSkuTests.java deleted file mode 100644 index 9d43cf7ae6684..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/ResourceSkuTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.models.ResourceSku; -import org.junit.jupiter.api.Assertions; - -public final class ResourceSkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceSku model = BinaryData.fromString("{\"name\":\"w\"}").toObject(ResourceSku.class); - Assertions.assertEquals("w", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceSku model = new ResourceSku().withName("w"); - model = BinaryData.fromObject(model).toObject(ResourceSku.class); - Assertions.assertEquals("w", model.name()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsCreateOrUpdateMockTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsCreateOrUpdateMockTests.java deleted file mode 100644 index c0c6fe3d6c111..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.datadog.MicrosoftDatadogManager; -import com.azure.resourcemanager.datadog.models.DatadogSingleSignOnProperties; -import com.azure.resourcemanager.datadog.models.DatadogSingleSignOnResource; -import com.azure.resourcemanager.datadog.models.SingleSignOnStates; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SingleSignOnConfigurationsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"singleSignOnState\":\"Existing\",\"enterpriseAppId\":\"hjpglkf\",\"singleSignOnUrl\":\"hdneuelfph\"},\"id\":\"yhtozfikdowwqu\",\"name\":\"v\",\"type\":\"zx\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MicrosoftDatadogManager manager = MicrosoftDatadogManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DatadogSingleSignOnResource response = manager.singleSignOnConfigurations() - .define("oievseotgqrlltm") - .withExistingMonitor("iplbpodxunkbebxm", "byyntwlrbqt") - .withProperties(new DatadogSingleSignOnProperties().withSingleSignOnState(SingleSignOnStates.EXISTING) - .withEnterpriseAppId("izxbmpgcjef")) - .create(); - - Assertions.assertEquals(SingleSignOnStates.EXISTING, response.properties().singleSignOnState()); - Assertions.assertEquals("hjpglkf", response.properties().enterpriseAppId()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsGetWithResponseMockTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsGetWithResponseMockTests.java deleted file mode 100644 index a18b55d1ab512..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsGetWithResponseMockTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.datadog.MicrosoftDatadogManager; -import com.azure.resourcemanager.datadog.models.DatadogSingleSignOnResource; -import com.azure.resourcemanager.datadog.models.SingleSignOnStates; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SingleSignOnConfigurationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleted\",\"singleSignOnState\":\"Enable\",\"enterpriseAppId\":\"kqze\",\"singleSignOnUrl\":\"kdltfzxmhhvhg\"},\"id\":\"eodkwobda\",\"name\":\"xtibqdxbxwakbog\",\"type\":\"xndlkzgxhu\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MicrosoftDatadogManager manager = MicrosoftDatadogManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DatadogSingleSignOnResource response = manager.singleSignOnConfigurations() - .getWithResponse("k", "wtppjflcxogaoko", "z", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(SingleSignOnStates.ENABLE, response.properties().singleSignOnState()); - Assertions.assertEquals("kqze", response.properties().enterpriseAppId()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsListMockTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsListMockTests.java deleted file mode 100644 index 7775fb426fb6a..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsListMockTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.datadog.MicrosoftDatadogManager; -import com.azure.resourcemanager.datadog.models.DatadogSingleSignOnResource; -import com.azure.resourcemanager.datadog.models.SingleSignOnStates; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SingleSignOnConfigurationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleted\",\"singleSignOnState\":\"Disable\",\"enterpriseAppId\":\"tdss\",\"singleSignOnUrl\":\"wtmwerio\"},\"id\":\"pyqs\",\"name\":\"mwabnetshhszhedp\",\"type\":\"vwiwubmwmbesld\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MicrosoftDatadogManager manager = MicrosoftDatadogManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.singleSignOnConfigurations().list("xsrz", "zucerscdntnev", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(SingleSignOnStates.DISABLE, - response.iterator().next().properties().singleSignOnState()); - Assertions.assertEquals("tdss", response.iterator().next().properties().enterpriseAppId()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/SubscriptionListTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/SubscriptionListTests.java deleted file mode 100644 index d00250a3653d8..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/SubscriptionListTests.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.models.FilteringTag; -import com.azure.resourcemanager.datadog.models.LogRules; -import com.azure.resourcemanager.datadog.models.MetricRules; -import com.azure.resourcemanager.datadog.models.MonitoredSubscription; -import com.azure.resourcemanager.datadog.models.MonitoringTagRulesProperties; -import com.azure.resourcemanager.datadog.models.Operation; -import com.azure.resourcemanager.datadog.models.Status; -import com.azure.resourcemanager.datadog.models.SubscriptionList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SubscriptionListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubscriptionList model = BinaryData.fromString( - "{\"operation\":\"Active\",\"monitoredSubscriptionList\":[{\"subscriptionId\":\"ttgzfbis\",\"status\":\"InProgress\",\"error\":\"hajdeyeamdpha\",\"tagRules\":{\"provisioningState\":\"Creating\",\"logRules\":{\"sendAadLogs\":false,\"sendSubscriptionLogs\":true,\"sendResourceLogs\":true,\"filteringTags\":[{},{},{},{}]},\"metricRules\":{\"filteringTags\":[{}]},\"automuting\":false}},{\"subscriptionId\":\"shwankixzbinje\",\"status\":\"Failed\",\"error\":\"mryw\",\"tagRules\":{\"provisioningState\":\"Canceled\",\"logRules\":{\"sendAadLogs\":true,\"sendSubscriptionLogs\":true,\"sendResourceLogs\":true,\"filteringTags\":[{}]},\"metricRules\":{\"filteringTags\":[{},{},{},{}]},\"automuting\":false}},{\"subscriptionId\":\"lwh\",\"status\":\"Deleting\",\"error\":\"cohoq\",\"tagRules\":{\"provisioningState\":\"Updating\",\"logRules\":{\"sendAadLogs\":false,\"sendSubscriptionLogs\":true,\"sendResourceLogs\":true,\"filteringTags\":[{}]},\"metricRules\":{\"filteringTags\":[{},{},{},{}]},\"automuting\":true}}]}") - .toObject(SubscriptionList.class); - Assertions.assertEquals(Operation.ACTIVE, model.operation()); - Assertions.assertEquals("ttgzfbis", model.monitoredSubscriptionList().get(0).subscriptionId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("hajdeyeamdpha", model.monitoredSubscriptionList().get(0).error()); - Assertions.assertEquals(false, model.monitoredSubscriptionList().get(0).tagRules().logRules().sendAadLogs()); - Assertions.assertEquals(true, - model.monitoredSubscriptionList().get(0).tagRules().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(true, - model.monitoredSubscriptionList().get(0).tagRules().logRules().sendResourceLogs()); - Assertions.assertEquals(false, model.monitoredSubscriptionList().get(0).tagRules().automuting()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubscriptionList model = new SubscriptionList().withOperation(Operation.ACTIVE) - .withMonitoredSubscriptionList(Arrays.asList( - new MonitoredSubscription().withSubscriptionId("ttgzfbis") - .withStatus(Status.IN_PROGRESS) - .withError("hajdeyeamdpha") - .withTagRules(new MonitoringTagRulesProperties() - .withLogRules(new LogRules().withSendAadLogs(false) - .withSendSubscriptionLogs(true) - .withSendResourceLogs(true) - .withFilteringTags(Arrays.asList(new FilteringTag(), new FilteringTag(), new FilteringTag(), - new FilteringTag()))) - .withMetricRules(new MetricRules().withFilteringTags(Arrays.asList(new FilteringTag()))) - .withAutomuting(false)), - new MonitoredSubscription().withSubscriptionId("shwankixzbinje") - .withStatus(Status.FAILED) - .withError("mryw") - .withTagRules(new MonitoringTagRulesProperties() - .withLogRules(new LogRules().withSendAadLogs(true) - .withSendSubscriptionLogs(true) - .withSendResourceLogs(true) - .withFilteringTags(Arrays.asList(new FilteringTag()))) - .withMetricRules(new MetricRules().withFilteringTags(Arrays.asList(new FilteringTag(), - new FilteringTag(), new FilteringTag(), new FilteringTag()))) - .withAutomuting(false)), - new MonitoredSubscription().withSubscriptionId("lwh") - .withStatus(Status.DELETING) - .withError("cohoq") - .withTagRules(new MonitoringTagRulesProperties() - .withLogRules(new LogRules().withSendAadLogs(false) - .withSendSubscriptionLogs(true) - .withSendResourceLogs(true) - .withFilteringTags(Arrays.asList(new FilteringTag()))) - .withMetricRules(new MetricRules().withFilteringTags(Arrays.asList(new FilteringTag(), - new FilteringTag(), new FilteringTag(), new FilteringTag()))) - .withAutomuting(true)))); - model = BinaryData.fromObject(model).toObject(SubscriptionList.class); - Assertions.assertEquals(Operation.ACTIVE, model.operation()); - Assertions.assertEquals("ttgzfbis", model.monitoredSubscriptionList().get(0).subscriptionId()); - Assertions.assertEquals(Status.IN_PROGRESS, model.monitoredSubscriptionList().get(0).status()); - Assertions.assertEquals("hajdeyeamdpha", model.monitoredSubscriptionList().get(0).error()); - Assertions.assertEquals(false, model.monitoredSubscriptionList().get(0).tagRules().logRules().sendAadLogs()); - Assertions.assertEquals(true, - model.monitoredSubscriptionList().get(0).tagRules().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(true, - model.monitoredSubscriptionList().get(0).tagRules().logRules().sendResourceLogs()); - Assertions.assertEquals(false, model.monitoredSubscriptionList().get(0).tagRules().automuting()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/TagRulesCreateOrUpdateWithResponseMockTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/TagRulesCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 50b57f2e8ef7c..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/TagRulesCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.datadog.MicrosoftDatadogManager; -import com.azure.resourcemanager.datadog.models.FilteringTag; -import com.azure.resourcemanager.datadog.models.LogRules; -import com.azure.resourcemanager.datadog.models.MetricRules; -import com.azure.resourcemanager.datadog.models.MonitoringTagRules; -import com.azure.resourcemanager.datadog.models.MonitoringTagRulesProperties; -import com.azure.resourcemanager.datadog.models.TagAction; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TagRulesCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"logRules\":{\"sendAadLogs\":true,\"sendSubscriptionLogs\":false,\"sendResourceLogs\":true,\"filteringTags\":[{\"name\":\"nayqi\",\"value\":\"nduhavhqlkthum\",\"action\":\"Exclude\"}]},\"metricRules\":{\"filteringTags\":[{\"name\":\"cdui\",\"value\":\"tgccymvaolpss\",\"action\":\"Exclude\"},{\"name\":\"mmdnbbglzps\",\"value\":\"ydmcwyhzdxssa\",\"action\":\"Exclude\"}]},\"automuting\":true},\"id\":\"dfznudaodv\",\"name\":\"zbn\",\"type\":\"blylpstdbh\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MicrosoftDatadogManager manager = MicrosoftDatadogManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MonitoringTagRules response = manager.tagRules() - .define("qzvszjf") - .withExistingMonitor("xjyngudivk", "tswb") - .withProperties(new MonitoringTagRulesProperties() - .withLogRules(new LogRules().withSendAadLogs(false) - .withSendSubscriptionLogs(false) - .withSendResourceLogs(false) - .withFilteringTags(Arrays.asList( - new FilteringTag().withName("cqaqtdoqmcbx").withValue("vxysl").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("fxoblytkb").withValue("pe").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("bkrvrnsvshqj").withValue("xc").withAction(TagAction.EXCLUDE)))) - .withMetricRules(new MetricRules().withFilteringTags(Arrays.asList( - new FilteringTag().withName("srruvwbhsqfsubcg").withValue("irx").withAction(TagAction.EXCLUDE), - new FilteringTag().withName("srfbjfdtwss").withValue("ftpvjzbexil").withAction(TagAction.INCLUDE), - new FilteringTag().withName("qqnvwpmq").withValue("ruoujmk").withAction(TagAction.INCLUDE)))) - .withAutomuting(true)) - .create(); - - Assertions.assertEquals(true, response.properties().logRules().sendAadLogs()); - Assertions.assertEquals(false, response.properties().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(true, response.properties().logRules().sendResourceLogs()); - Assertions.assertEquals("nayqi", response.properties().logRules().filteringTags().get(0).name()); - Assertions.assertEquals("nduhavhqlkthum", response.properties().logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, response.properties().logRules().filteringTags().get(0).action()); - Assertions.assertEquals("cdui", response.properties().metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("tgccymvaolpss", response.properties().metricRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, response.properties().metricRules().filteringTags().get(0).action()); - Assertions.assertEquals(true, response.properties().automuting()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/TagRulesGetWithResponseMockTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/TagRulesGetWithResponseMockTests.java deleted file mode 100644 index 6531937826519..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/TagRulesGetWithResponseMockTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.datadog.MicrosoftDatadogManager; -import com.azure.resourcemanager.datadog.models.MonitoringTagRules; -import com.azure.resourcemanager.datadog.models.TagAction; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TagRulesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Accepted\",\"logRules\":{\"sendAadLogs\":true,\"sendSubscriptionLogs\":false,\"sendResourceLogs\":false,\"filteringTags\":[{\"name\":\"aln\",\"value\":\"xisxyawjoyaqcsl\",\"action\":\"Include\"},{\"name\":\"iidzyexzne\",\"value\":\"xhnrztfolhb\",\"action\":\"Exclude\"},{\"name\":\"alaulppggdtpnapn\",\"value\":\"ropuhpigv\",\"action\":\"Exclude\"},{\"name\":\"gqgitxmedjvcsl\",\"value\":\"qwwncw\",\"action\":\"Include\"}]},\"metricRules\":{\"filteringTags\":[{\"name\":\"rmgucnap\",\"value\":\"eoellwptfdygp\",\"action\":\"Include\"},{\"name\":\"ac\",\"value\":\"pzfqrhhuaoppp\",\"action\":\"Include\"},{\"name\":\"xolzdahzx\",\"value\":\"obgbkdmoizp\",\"action\":\"Exclude\"}]},\"automuting\":false},\"id\":\"cfbu\",\"name\":\"rmfqjhhkxbpvj\",\"type\":\"mjh\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MicrosoftDatadogManager manager = MicrosoftDatadogManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MonitoringTagRules response = manager.tagRules() - .getWithResponse("uusdttouwa", "oekqvk", "lns", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.properties().logRules().sendAadLogs()); - Assertions.assertEquals(false, response.properties().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(false, response.properties().logRules().sendResourceLogs()); - Assertions.assertEquals("aln", response.properties().logRules().filteringTags().get(0).name()); - Assertions.assertEquals("xisxyawjoyaqcsl", response.properties().logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, response.properties().logRules().filteringTags().get(0).action()); - Assertions.assertEquals("rmgucnap", response.properties().metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("eoellwptfdygp", response.properties().metricRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, response.properties().metricRules().filteringTags().get(0).action()); - Assertions.assertEquals(false, response.properties().automuting()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/TagRulesListMockTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/TagRulesListMockTests.java deleted file mode 100644 index 45b2068849c0b..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/TagRulesListMockTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.datadog.MicrosoftDatadogManager; -import com.azure.resourcemanager.datadog.models.MonitoringTagRules; -import com.azure.resourcemanager.datadog.models.TagAction; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class TagRulesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"NotSpecified\",\"logRules\":{\"sendAadLogs\":false,\"sendSubscriptionLogs\":true,\"sendResourceLogs\":false,\"filteringTags\":[{\"name\":\"loayqcgw\",\"value\":\"zjuzgwyz\",\"action\":\"Include\"},{\"name\":\"ongmtsa\",\"value\":\"cbpwxqpsrknft\",\"action\":\"Exclude\"},{\"name\":\"iuhprwmdyvxqta\",\"value\":\"iwwroyqbexrmc\",\"action\":\"Exclude\"}]},\"metricRules\":{\"filteringTags\":[{\"name\":\"jvkn\",\"value\":\"fqsgzvahapjy\",\"action\":\"Exclude\"},{\"name\":\"gqzcjr\",\"value\":\"djzlmwlx\",\"action\":\"Include\"},{\"name\":\"fhzovawjvzunluth\",\"value\":\"prnxipeil\",\"action\":\"Include\"}]},\"automuting\":false},\"id\":\"jxdultskzbbtdzu\",\"name\":\"veekgpwozuhkfp\",\"type\":\"sjyofdx\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MicrosoftDatadogManager manager = MicrosoftDatadogManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.tagRules().list("c", "wxzvlvqhjkb", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(false, response.iterator().next().properties().logRules().sendAadLogs()); - Assertions.assertEquals(true, response.iterator().next().properties().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(false, response.iterator().next().properties().logRules().sendResourceLogs()); - Assertions.assertEquals("loayqcgw", - response.iterator().next().properties().logRules().filteringTags().get(0).name()); - Assertions.assertEquals("zjuzgwyz", - response.iterator().next().properties().logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, - response.iterator().next().properties().logRules().filteringTags().get(0).action()); - Assertions.assertEquals("jvkn", - response.iterator().next().properties().metricRules().filteringTags().get(0).name()); - Assertions.assertEquals("fqsgzvahapjy", - response.iterator().next().properties().metricRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, - response.iterator().next().properties().metricRules().filteringTags().get(0).action()); - Assertions.assertEquals(false, response.iterator().next().properties().automuting()); - } -} diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/UserInfoTests.java b/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/UserInfoTests.java deleted file mode 100644 index 1e3aca582a0f0..0000000000000 --- a/sdk/datadog/azure-resourcemanager-datadog/src/test/java/com/azure/resourcemanager/datadog/generated/UserInfoTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.datadog.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.datadog.models.UserInfo; -import org.junit.jupiter.api.Assertions; - -public final class UserInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserInfo model = BinaryData - .fromString("{\"name\":\"ktzlcuiywg\",\"emailAddress\":\"wgndrvynhzgpp\",\"phoneNumber\":\"cgyncocpecf\"}") - .toObject(UserInfo.class); - Assertions.assertEquals("ktzlcuiywg", model.name()); - Assertions.assertEquals("wgndrvynhzgpp", model.emailAddress()); - Assertions.assertEquals("cgyncocpecf", model.phoneNumber()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserInfo model - = new UserInfo().withName("ktzlcuiywg").withEmailAddress("wgndrvynhzgpp").withPhoneNumber("cgyncocpecf"); - model = BinaryData.fromObject(model).toObject(UserInfo.class); - Assertions.assertEquals("ktzlcuiywg", model.name()); - Assertions.assertEquals("wgndrvynhzgpp", model.emailAddress()); - Assertions.assertEquals("cgyncocpecf", model.phoneNumber()); - } -}