From 2bc9d5b42bfeeadba96c19be4d54d0b1f98d40d3 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 3 Aug 2022 06:18:53 +0000 Subject: [PATCH] CodeGen from PR 20022 in Azure/azure-rest-api-specs Merge 56aa35956b5e976da8758e78326f2fe6202da287 into 03c410c8660457f0cc819d6d8f62932c5dc254b7 --- .../CHANGELOG.md | 3 +- .../azure-resourcemanager-datadog/README.md | 5 +- .../azure-resourcemanager-datadog/SAMPLE.md | 513 ++++++++++++++++++ .../azure-resourcemanager-datadog/pom.xml | 2 +- .../datadog/MicrosoftDatadogManager.java | 113 +++- .../fluent/MarketplaceAgreementsClient.java | 6 +- .../datadog/fluent/MonitorsClient.java | 56 +- .../datadog/fluent/OperationsClient.java | 10 +- .../SingleSignOnConfigurationsClient.java | 14 +- .../datadog/fluent/TagRulesClient.java | 8 +- .../models/DatadogAgreementResourceInner.java | 4 - .../fluent/models/DatadogApiKeyInner.java | 7 +- .../fluent/models/DatadogHostInner.java | 4 - .../models/DatadogMonitorResourceInner.java | 4 - .../models/DatadogSetPasswordLinkInner.java | 4 - .../DatadogSingleSignOnResourceInner.java | 4 - .../fluent/models/LinkedResourceInner.java | 4 - .../fluent/models/MonitoredResourceInner.java | 7 +- .../models/MonitoringTagRulesInner.java | 4 - .../fluent/models/OperationResultInner.java | 4 - .../DatadogMonitorResourceImpl.java | 4 + .../DatadogSingleSignOnResourceImpl.java | 4 + .../MarketplaceAgreementsClientImpl.java | 49 +- .../MarketplaceAgreementsImpl.java | 3 +- .../MicrosoftDatadogClientBuilder.java | 62 +-- .../MicrosoftDatadogClientImpl.java | 15 +- .../MonitoringTagRulesImpl.java | 4 + .../implementation/MonitorsClientImpl.java | 251 ++++----- .../datadog/implementation/MonitorsImpl.java | 19 +- .../implementation/OperationsClientImpl.java | 39 +- .../implementation/OperationsImpl.java | 3 +- .../SingleSignOnConfigurationsClientImpl.java | 66 +-- .../SingleSignOnConfigurationsImpl.java | 15 +- .../implementation/TagRulesClientImpl.java | 68 +-- .../datadog/implementation/TagRulesImpl.java | 15 +- .../models/DatadogAgreementProperties.java | 7 +- .../DatadogAgreementResourceListResponse.java | 4 - .../models/DatadogApiKeyListResponse.java | 4 - .../models/DatadogHostListResponse.java | 4 - .../datadog/models/DatadogHostMetadata.java | 4 - .../datadog/models/DatadogInstallMethod.java | 4 - .../datadog/models/DatadogLogsAgent.java | 4 - .../models/DatadogMonitorResource.java | 29 +- .../DatadogMonitorResourceListResponse.java | 4 - ...atadogMonitorResourceUpdateParameters.java | 9 +- .../models/DatadogOrganizationProperties.java | 33 +- .../models/DatadogSingleSignOnProperties.java | 4 - .../models/DatadogSingleSignOnResource.java | 7 + ...tadogSingleSignOnResourceListResponse.java | 4 - .../datadog/models/FilteringTag.java | 7 +- .../datadog/models/IdentityProperties.java | 4 - .../models/LiftrResourceCategories.java | 6 +- .../models/LinkedResourceListResponse.java | 4 - .../datadog/models/LogRules.java | 20 +- .../datadog/models/ManagedIdentityTypes.java | 6 +- .../datadog/models/MarketplaceAgreements.java | 6 +- .../models/MarketplaceSubscriptionStatus.java | 6 +- .../datadog/models/MetricRules.java | 12 +- .../datadog/models/MonitorProperties.java | 8 +- .../models/MonitorUpdateProperties.java | 4 - .../models/MonitoredResourceListResponse.java | 4 - .../datadog/models/MonitoringStatus.java | 6 +- .../datadog/models/MonitoringTagRules.java | 7 + .../MonitoringTagRulesListResponse.java | 4 - .../models/MonitoringTagRulesProperties.java | 4 - .../datadog/models/Monitors.java | 36 +- .../datadog/models/OperationDisplay.java | 4 - .../datadog/models/OperationListResult.java | 4 - .../datadog/models/Operations.java | 10 +- .../datadog/models/ProvisioningState.java | 6 +- .../datadog/models/ResourceSku.java | 7 +- .../models/SingleSignOnConfigurations.java | 10 +- .../datadog/models/SingleSignOnStates.java | 6 +- .../datadog/models/TagAction.java | 6 +- .../datadog/models/TagRules.java | 10 +- .../datadog/models/UserInfo.java | 4 - ...tplaceAgreementsCreateOrUpdateSamples.java | 23 + .../MarketplaceAgreementsListSamples.java | 22 + .../generated/MonitorsCreateSamples.java | 25 + .../generated/MonitorsDeleteSamples.java | 22 + .../MonitorsGetByResourceGroupSamples.java | 22 + .../MonitorsGetDefaultKeySamples.java | 22 + .../generated/MonitorsListApiKeysSamples.java | 22 + .../MonitorsListByResourceGroupSamples.java | 22 + .../generated/MonitorsListHostsSamples.java | 22 + .../MonitorsListLinkedResourcesSamples.java | 22 + ...MonitorsListMonitoredResourcesSamples.java | 23 + .../generated/MonitorsListSamples.java | 22 + ...MonitorsRefreshSetPasswordLinkSamples.java | 23 + .../MonitorsSetDefaultKeySamples.java | 22 + .../generated/MonitorsUpdateSamples.java | 25 + .../generated/OperationsListSamples.java | 22 + ...OnConfigurationsCreateOrUpdateSamples.java | 25 + .../SingleSignOnConfigurationsGetSamples.java | 23 + ...SingleSignOnConfigurationsListSamples.java | 23 + .../TagRulesCreateOrUpdateSamples.java | 20 + .../datadog/generated/TagRulesGetSamples.java | 22 + .../generated/TagRulesListSamples.java | 22 + 98 files changed, 1590 insertions(+), 631 deletions(-) create mode 100644 sdk/datadog/azure-resourcemanager-datadog/SAMPLE.md create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsCreateOrUpdateSamples.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsListSamples.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsCreateSamples.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsDeleteSamples.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsGetByResourceGroupSamples.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsGetDefaultKeySamples.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListApiKeysSamples.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListByResourceGroupSamples.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListHostsSamples.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListLinkedResourcesSamples.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListMonitoredResourcesSamples.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListSamples.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsRefreshSetPasswordLinkSamples.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsSetDefaultKeySamples.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsUpdateSamples.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/OperationsListSamples.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsCreateOrUpdateSamples.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsGetSamples.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsListSamples.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesCreateOrUpdateSamples.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesGetSamples.java create mode 100644 sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesListSamples.java diff --git a/sdk/datadog/azure-resourcemanager-datadog/CHANGELOG.md b/sdk/datadog/azure-resourcemanager-datadog/CHANGELOG.md index 8daee380701d3..aaf65c5e6253c 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/CHANGELOG.md +++ b/sdk/datadog/azure-resourcemanager-datadog/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.4 (Unreleased) +## 1.0.0-beta.1 (2022-08-03) +- Azure Resource Manager MicrosoftDatadog client library for Java. This package contains Microsoft Azure SDK for MicrosoftDatadog Management SDK. Package tag package-2022-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0-beta.3 (2021-05-31) diff --git a/sdk/datadog/azure-resourcemanager-datadog/README.md b/sdk/datadog/azure-resourcemanager-datadog/README.md index d46d07d76072b..e7faa23a7012d 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-2021-03. 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-2022-06. 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.0.0-beta.3 + 1.0.0-beta.4 ``` [//]: # ({x-version-update-end}) @@ -74,6 +74,7 @@ See [API design][design] for general introduction on design and key concepts on ## Examples +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/datadog/azure-resourcemanager-datadog/SAMPLE.md) ## Troubleshooting diff --git a/sdk/datadog/azure-resourcemanager-datadog/SAMPLE.md b/sdk/datadog/azure-resourcemanager-datadog/SAMPLE.md new file mode 100644 index 0000000000000..8e00978c7b9a3 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/SAMPLE.md @@ -0,0 +1,513 @@ +# Code snippets and samples + + +## MarketplaceAgreements + +- [CreateOrUpdate](#marketplaceagreements_createorupdate) +- [List](#marketplaceagreements_list) + +## Monitors + +- [Create](#monitors_create) +- [Delete](#monitors_delete) +- [GetByResourceGroup](#monitors_getbyresourcegroup) +- [GetDefaultKey](#monitors_getdefaultkey) +- [List](#monitors_list) +- [ListApiKeys](#monitors_listapikeys) +- [ListByResourceGroup](#monitors_listbyresourcegroup) +- [ListHosts](#monitors_listhosts) +- [ListLinkedResources](#monitors_listlinkedresources) +- [ListMonitoredResources](#monitors_listmonitoredresources) +- [RefreshSetPasswordLink](#monitors_refreshsetpasswordlink) +- [SetDefaultKey](#monitors_setdefaultkey) +- [Update](#monitors_update) + +## Operations + +- [List](#operations_list) + +## SingleSignOnConfigurations + +- [CreateOrUpdate](#singlesignonconfigurations_createorupdate) +- [Get](#singlesignonconfigurations_get) +- [List](#singlesignonconfigurations_list) + +## TagRules + +- [CreateOrUpdate](#tagrules_createorupdate) +- [Get](#tagrules_get) +- [List](#tagrules_list) +### MarketplaceAgreements_CreateOrUpdate + +```java +import com.azure.core.util.Context; + +/** Samples for MarketplaceAgreements CreateOrUpdate. */ +public final class MarketplaceAgreementsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/MarketplaceAgreements_Create.json + */ + /** + * Sample code: MarketplaceAgreements_CreateOrUpdate. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void marketplaceAgreementsCreateOrUpdate( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.marketplaceAgreements().createOrUpdateWithResponse(null, Context.NONE); + } +} +``` + +### MarketplaceAgreements_List + +```java +import com.azure.core.util.Context; + +/** Samples for MarketplaceAgreements List. */ +public final class MarketplaceAgreementsListSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/MarketplaceAgreements_List.json + */ + /** + * Sample code: MarketplaceAgreements_List. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void marketplaceAgreementsList(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.marketplaceAgreements().list(Context.NONE); + } +} +``` + +### Monitors_Create + +```java +/** Samples for Monitors Create. */ +public final class MonitorsCreateSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/Monitors_Create.json + */ + /** + * Sample code: Monitors_Create. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsCreate(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager + .monitors() + .define("myMonitor") + .withRegion((String) null) + .withExistingResourceGroup("myResourceGroup") + .create(); + } +} +``` + +### Monitors_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Monitors Delete. */ +public final class MonitorsDeleteSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/Monitors_Delete.json + */ + /** + * Sample code: Monitors_Delete. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsDelete(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().delete("myResourceGroup", "myMonitor", Context.NONE); + } +} +``` + +### Monitors_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for Monitors GetByResourceGroup. */ +public final class MonitorsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/Monitors_Get.json + */ + /** + * Sample code: Monitors_Get. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsGet(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().getByResourceGroupWithResponse("myResourceGroup", "myMonitor", Context.NONE); + } +} +``` + +### Monitors_GetDefaultKey + +```java +import com.azure.core.util.Context; + +/** Samples for Monitors GetDefaultKey. */ +public final class MonitorsGetDefaultKeySamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/ApiKeys_GetDefaultKey.json + */ + /** + * Sample code: Monitors_GetDefaultKey. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsGetDefaultKey(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().getDefaultKeyWithResponse("myResourceGroup", "myMonitor", Context.NONE); + } +} +``` + +### Monitors_List + +```java +import com.azure.core.util.Context; + +/** Samples for Monitors List. */ +public final class MonitorsListSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/Monitors_List.json + */ + /** + * Sample code: Monitors_List. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsList(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().list(Context.NONE); + } +} +``` + +### Monitors_ListApiKeys + +```java +import com.azure.core.util.Context; + +/** Samples for Monitors ListApiKeys. */ +public final class MonitorsListApiKeysSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/ApiKeys_List.json + */ + /** + * Sample code: Monitors_ListApiKeys. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsListApiKeys(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().listApiKeys("myResourceGroup", "myMonitor", Context.NONE); + } +} +``` + +### Monitors_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for Monitors ListByResourceGroup. */ +public final class MonitorsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/Monitors_ListByResourceGroup.json + */ + /** + * Sample code: Monitors_ListByResourceGroup. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsListByResourceGroup(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().listByResourceGroup("myResourceGroup", Context.NONE); + } +} +``` + +### Monitors_ListHosts + +```java +import com.azure.core.util.Context; + +/** Samples for Monitors ListHosts. */ +public final class MonitorsListHostsSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/Hosts_List.json + */ + /** + * Sample code: Monitors_ListHosts. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsListHosts(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().listHosts("myResourceGroup", "myMonitor", Context.NONE); + } +} +``` + +### Monitors_ListLinkedResources + +```java +import com.azure.core.util.Context; + +/** Samples for Monitors ListLinkedResources. */ +public final class MonitorsListLinkedResourcesSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/LinkedResources_List.json + */ + /** + * Sample code: Monitors_ListLinkedResources. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsListLinkedResources(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().listLinkedResources("myResourceGroup", "myMonitor", Context.NONE); + } +} +``` + +### Monitors_ListMonitoredResources + +```java +import com.azure.core.util.Context; + +/** Samples for Monitors ListMonitoredResources. */ +public final class MonitorsListMonitoredResourcesSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/MonitoredResources_List.json + */ + /** + * Sample code: Monitors_ListMonitoredResources. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsListMonitoredResources( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().listMonitoredResources("myResourceGroup", "myMonitor", Context.NONE); + } +} +``` + +### Monitors_RefreshSetPasswordLink + +```java +import com.azure.core.util.Context; + +/** Samples for Monitors RefreshSetPasswordLink. */ +public final class MonitorsRefreshSetPasswordLinkSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/RefreshSetPassword_Get.json + */ + /** + * Sample code: Monitors_RefreshSetPasswordLink. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsRefreshSetPasswordLink( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().refreshSetPasswordLinkWithResponse("myResourceGroup", "myMonitor", Context.NONE); + } +} +``` + +### Monitors_SetDefaultKey + +```java +import com.azure.core.util.Context; + +/** Samples for Monitors SetDefaultKey. */ +public final class MonitorsSetDefaultKeySamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/ApiKeys_SetDefaultKey.json + */ + /** + * Sample code: Monitors_SetDefaultKey. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsSetDefaultKey(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().setDefaultKeyWithResponse("myResourceGroup", "myMonitor", null, Context.NONE); + } +} +``` + +### Monitors_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.datadog.models.DatadogMonitorResource; + +/** Samples for Monitors Update. */ +public final class MonitorsUpdateSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/Monitors_Update.json + */ + /** + * Sample code: Monitors_Update. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsUpdate(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + DatadogMonitorResource resource = + manager.monitors().getByResourceGroupWithResponse("myResourceGroup", "myMonitor", Context.NONE).getValue(); + resource.update().apply(); + } +} +``` + +### Operations_List + +```java +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/Operations_List.json + */ + /** + * Sample code: Operations_List. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void operationsList(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.operations().list(Context.NONE); + } +} +``` + +### SingleSignOnConfigurations_CreateOrUpdate + +```java +/** Samples for SingleSignOnConfigurations CreateOrUpdate. */ +public final class SingleSignOnConfigurationsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/SingleSignOnConfigurations_CreateOrUpdate.json + */ + /** + * Sample code: SingleSignOnConfigurations_CreateOrUpdate. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void singleSignOnConfigurationsCreateOrUpdate( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager + .singleSignOnConfigurations() + .define("default") + .withExistingMonitor("myResourceGroup", "myMonitor") + .create(); + } +} +``` + +### SingleSignOnConfigurations_Get + +```java +import com.azure.core.util.Context; + +/** Samples for SingleSignOnConfigurations Get. */ +public final class SingleSignOnConfigurationsGetSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/SingleSignOnConfigurations_Get.json + */ + /** + * Sample code: SingleSignOnConfigurations_Get. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void singleSignOnConfigurationsGet( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.singleSignOnConfigurations().getWithResponse("myResourceGroup", "myMonitor", "default", Context.NONE); + } +} +``` + +### SingleSignOnConfigurations_List + +```java +import com.azure.core.util.Context; + +/** Samples for SingleSignOnConfigurations List. */ +public final class SingleSignOnConfigurationsListSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/SingleSignOnConfigurations_List.json + */ + /** + * Sample code: SingleSignOnConfigurations_List. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void singleSignOnConfigurationsList( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.singleSignOnConfigurations().list("myResourceGroup", "myMonitor", Context.NONE); + } +} +``` + +### TagRules_CreateOrUpdate + +```java +/** Samples for TagRules CreateOrUpdate. */ +public final class TagRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/TagRules_CreateOrUpdate.json + */ + /** + * Sample code: TagRules_CreateOrUpdate. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void tagRulesCreateOrUpdate(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.tagRules().define("default").withExistingMonitor("myResourceGroup", "myMonitor").create(); + } +} +``` + +### TagRules_Get + +```java +import com.azure.core.util.Context; + +/** Samples for TagRules Get. */ +public final class TagRulesGetSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/TagRules_Get.json + */ + /** + * Sample code: TagRules_Get. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void tagRulesGet(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.tagRules().getWithResponse("myResourceGroup", "myMonitor", "default", Context.NONE); + } +} +``` + +### TagRules_List + +```java +import com.azure.core.util.Context; + +/** Samples for TagRules List. */ +public final class TagRulesListSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/TagRules_List.json + */ + /** + * Sample code: TagRules_List. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void tagRulesList(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.tagRules().list("myResourceGroup", "myMonitor", Context.NONE); + } +} +``` + diff --git a/sdk/datadog/azure-resourcemanager-datadog/pom.xml b/sdk/datadog/azure-resourcemanager-datadog/pom.xml index 1481338b91dd2..4ab213d2e2847 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/pom.xml +++ b/sdk/datadog/azure-resourcemanager-datadog/pom.xml @@ -13,7 +13,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-2021-03. + 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-2022-06. https://github.com/Azure/azure-sdk-for-java 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 f43e14859248b..f87a2b99b90ae 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 @@ -8,15 +8,18 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; @@ -37,6 +40,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** Entry point to MicrosoftDatadogManager. */ public final class MicrosoftDatadogManager { @@ -77,6 +81,19 @@ public static MicrosoftDatadogManager authenticate(TokenCredential credential, A return configure().authenticate(credential, profile); } + /** + * Creates an instance of MicrosoftDatadog service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the MicrosoftDatadog service API instance. + */ + public static MicrosoftDatadogManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new MicrosoftDatadogManager(httpPipeline, profile, null); + } + /** * Gets a Configurable instance that can be used to create MicrosoftDatadogManager with optional configuration. * @@ -88,12 +105,14 @@ public static Configurable configure() { /** The Configurable allowing configurations to be set. */ public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; + private RetryOptions retryOptions; private Duration defaultPollInterval; private Configurable() { @@ -132,6 +151,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) { return this; } + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + /** * Sets the retry policy to the HTTP pipeline. * @@ -143,6 +173,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { return this; } + /** + * Sets the retry options for the HTTP pipeline retry policy. + * + *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + * + * @param retryOptions the retry options for the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + /** * Sets the default poll interval, used when service does not provide "Retry-After" header. * @@ -150,9 +193,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); } return this; } @@ -174,7 +219,7 @@ public MicrosoftDatadogManager authenticate(TokenCredential credential, AzurePro .append("-") .append("com.azure.resourcemanager.datadog") .append("/") - .append("1.0.0-beta.3"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -188,20 +233,38 @@ public MicrosoftDatadogManager authenticate(TokenCredential credential, AzurePro userAgentBuilder.append(" (auto-generated)"); } + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } if (retryPolicy == null) { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } } List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies - .add( - new BearerTokenAuthenticationPolicy( - credential, profile.getEnvironment().getManagementEndpoint() + "/.default")); - policies.addAll(this.policies); + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = @@ -213,7 +276,11 @@ public MicrosoftDatadogManager authenticate(TokenCredential credential, AzurePro } } - /** @return Resource collection API of MarketplaceAgreements. */ + /** + * Gets the resource collection API of MarketplaceAgreements. + * + * @return Resource collection API of MarketplaceAgreements. + */ public MarketplaceAgreements marketplaceAgreements() { if (this.marketplaceAgreements == null) { this.marketplaceAgreements = new MarketplaceAgreementsImpl(clientObject.getMarketplaceAgreements(), this); @@ -221,7 +288,11 @@ public MarketplaceAgreements marketplaceAgreements() { return marketplaceAgreements; } - /** @return Resource collection API of Monitors. */ + /** + * Gets the resource collection API of Monitors. It manages DatadogMonitorResource. + * + * @return Resource collection API of Monitors. + */ public Monitors monitors() { if (this.monitors == null) { this.monitors = new MonitorsImpl(clientObject.getMonitors(), this); @@ -229,7 +300,11 @@ public Monitors monitors() { return monitors; } - /** @return Resource collection API of Operations. */ + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ public Operations operations() { if (this.operations == null) { this.operations = new OperationsImpl(clientObject.getOperations(), this); @@ -237,7 +312,11 @@ public Operations operations() { return operations; } - /** @return Resource collection API of TagRules. */ + /** + * Gets the resource collection API of TagRules. It manages MonitoringTagRules. + * + * @return Resource collection API of TagRules. + */ public TagRules tagRules() { if (this.tagRules == null) { this.tagRules = new TagRulesImpl(clientObject.getTagRules(), this); @@ -245,7 +324,11 @@ public TagRules tagRules() { return tagRules; } - /** @return Resource collection API of SingleSignOnConfigurations. */ + /** + * Gets the resource collection API of SingleSignOnConfigurations. It manages DatadogSingleSignOnResource. + * + * @return Resource collection API of SingleSignOnConfigurations. + */ public SingleSignOnConfigurations singleSignOnConfigurations() { if (this.singleSignOnConfigurations == null) { this.singleSignOnConfigurations = diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/MarketplaceAgreementsClient.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/MarketplaceAgreementsClient.java index d84a0f179f26b..b0a06e0655a47 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/MarketplaceAgreementsClient.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/MarketplaceAgreementsClient.java @@ -18,7 +18,7 @@ public interface MarketplaceAgreementsClient { * * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -30,7 +30,7 @@ public interface MarketplaceAgreementsClient { * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); @@ -53,7 +53,7 @@ public interface MarketplaceAgreementsClient { * @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 the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/MonitorsClient.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/MonitorsClient.java index f303068afa30d..00fd35130f0d4 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/MonitorsClient.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/MonitorsClient.java @@ -29,7 +29,7 @@ public interface MonitorsClient { * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listApiKeys(String resourceGroupName, String monitorName); @@ -43,7 +43,7 @@ public interface MonitorsClient { * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listApiKeys(String resourceGroupName, String monitorName, Context context); @@ -70,7 +70,7 @@ public interface MonitorsClient { * @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 the default api key. + * @return the default api key along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getDefaultKeyWithResponse( @@ -98,7 +98,7 @@ Response getDefaultKeyWithResponse( * @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 the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response setDefaultKeyWithResponse( @@ -112,7 +112,7 @@ Response setDefaultKeyWithResponse( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listHosts(String resourceGroupName, String monitorName); @@ -126,7 +126,7 @@ Response setDefaultKeyWithResponse( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listHosts(String resourceGroupName, String monitorName, Context context); @@ -139,7 +139,7 @@ Response setDefaultKeyWithResponse( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listLinkedResources(String resourceGroupName, String monitorName); @@ -153,7 +153,7 @@ Response setDefaultKeyWithResponse( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listLinkedResources( @@ -167,7 +167,7 @@ PagedIterable listLinkedResources( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listMonitoredResources(String resourceGroupName, String monitorName); @@ -181,7 +181,7 @@ PagedIterable listLinkedResources( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listMonitoredResources( @@ -192,7 +192,7 @@ PagedIterable listMonitoredResources( * * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -204,7 +204,7 @@ PagedIterable listMonitoredResources( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); @@ -216,7 +216,7 @@ PagedIterable listMonitoredResources( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -229,7 +229,7 @@ PagedIterable listMonitoredResources( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -256,7 +256,7 @@ PagedIterable listMonitoredResources( * @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 the properties of a specific monitor resource. + * @return the properties of a specific monitor resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -271,9 +271,9 @@ Response getByResourceGroupWithResponse( * @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 the response. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatadogMonitorResourceInner> beginCreate( String resourceGroupName, String monitorName, DatadogMonitorResourceInner body); @@ -287,9 +287,9 @@ SyncPoller, DatadogMonitorResourceInner> * @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 the response. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatadogMonitorResourceInner> beginCreate( String resourceGroupName, String monitorName, DatadogMonitorResourceInner body, Context context); @@ -345,9 +345,9 @@ DatadogMonitorResourceInner create( * @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 the response. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatadogMonitorResourceInner> beginUpdate( String resourceGroupName, String monitorName, DatadogMonitorResourceUpdateParameters body); @@ -361,9 +361,9 @@ SyncPoller, DatadogMonitorResourceInner> * @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 the response. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatadogMonitorResourceInner> beginUpdate( String resourceGroupName, String monitorName, DatadogMonitorResourceUpdateParameters body, Context context); @@ -419,9 +419,9 @@ DatadogMonitorResourceInner update( * @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 the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName); /** @@ -433,9 +433,9 @@ DatadogMonitorResourceInner update( * @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 the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, Context context); /** @@ -485,7 +485,7 @@ DatadogMonitorResourceInner update( * @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 the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response refreshSetPasswordLinkWithResponse( 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 5847518f9365e..6dc18a19ab21b 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 @@ -13,23 +13,25 @@ /** An instance of this class provides access to all the operations defined in OperationsClient. */ public interface OperationsClient { /** - * List all operations provided by Microsoft.Datadog for the 2021-03-01 api version. + * List all operations provided by Microsoft.Datadog for the 2022-06-01 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. - * @return result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * List all operations provided by Microsoft.Datadog for the 2021-03-01 api version. + * List all operations provided by Microsoft.Datadog for the 2022-06-01 api version. * * @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 result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/SingleSignOnConfigurationsClient.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/SingleSignOnConfigurationsClient.java index e1b56b9ee1397..4f5027e57dbdc 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/SingleSignOnConfigurationsClient.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/SingleSignOnConfigurationsClient.java @@ -23,7 +23,7 @@ public interface SingleSignOnConfigurationsClient { * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String monitorName); @@ -37,7 +37,7 @@ public interface SingleSignOnConfigurationsClient { * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String monitorName, Context context); @@ -52,9 +52,9 @@ public interface SingleSignOnConfigurationsClient { * @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 the response. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatadogSingleSignOnResourceInner> beginCreateOrUpdate( String resourceGroupName, String monitorName, String configurationName, DatadogSingleSignOnResourceInner body); @@ -69,9 +69,9 @@ SyncPoller, DatadogSingleSignOnReso * @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 the response. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatadogSingleSignOnResourceInner> beginCreateOrUpdate( String resourceGroupName, String monitorName, @@ -155,7 +155,7 @@ DatadogSingleSignOnResourceInner createOrUpdate( * @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 the datadog single sign-on resource for the given Monitor. + * @return the datadog single sign-on resource for the given Monitor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/TagRulesClient.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/TagRulesClient.java index 89672be21d407..8214b079788d5 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/TagRulesClient.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/TagRulesClient.java @@ -21,7 +21,7 @@ public interface TagRulesClient { * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String monitorName); @@ -35,7 +35,7 @@ public interface TagRulesClient { * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String monitorName, Context context); @@ -65,7 +65,7 @@ public interface TagRulesClient { * @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 capture logs and metrics of Azure resources based on ARM tags. + * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -99,7 +99,7 @@ Response createOrUpdateWithResponse( * @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 a tag rule set for a given monitor resource. + * @return a tag rule set for a given monitor resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogAgreementResourceInner.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogAgreementResourceInner.java index 7c58a9cf1bf8c..f0ca5766666e5 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogAgreementResourceInner.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogAgreementResourceInner.java @@ -7,16 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datadog.models.DatadogAgreementProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The DatadogAgreementResource model. */ @Fluent public final class DatadogAgreementResourceInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatadogAgreementResourceInner.class); - /* * Represents the properties of the resource. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogApiKeyInner.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogApiKeyInner.java index be5bfea12deec..464d84b50c3a5 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogApiKeyInner.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogApiKeyInner.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The DatadogApiKey model. */ @Fluent public final class DatadogApiKeyInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatadogApiKeyInner.class); - /* * The user that created the API key. */ @@ -125,9 +122,11 @@ public DatadogApiKeyInner withCreated(String created) { */ public void validate() { if (key() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property key in model DatadogApiKeyInner")); } } + + private static final ClientLogger LOGGER = new ClientLogger(DatadogApiKeyInner.class); } diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogHostInner.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogHostInner.java index 4716b699cc4cf..db3fe3331a6c6 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogHostInner.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogHostInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.datadog.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datadog.models.DatadogHostMetadata; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The DatadogHost model. */ @Fluent public final class DatadogHostInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatadogHostInner.class); - /* * The name of the host. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogMonitorResourceInner.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogMonitorResourceInner.java index a0d37dcab6657..588fcd4164261 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogMonitorResourceInner.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogMonitorResourceInner.java @@ -7,19 +7,15 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datadog.models.IdentityProperties; import com.azure.resourcemanager.datadog.models.MonitorProperties; import com.azure.resourcemanager.datadog.models.ResourceSku; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** The DatadogMonitorResource model. */ @Fluent public final class DatadogMonitorResourceInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatadogMonitorResourceInner.class); - /* * The sku property. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogSetPasswordLinkInner.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogSetPasswordLinkInner.java index 5118e4d80baef..37210ce2d9b66 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogSetPasswordLinkInner.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogSetPasswordLinkInner.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.datadog.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The DatadogSetPasswordLink model. */ @Fluent public final class DatadogSetPasswordLinkInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatadogSetPasswordLinkInner.class); - /* * The setPasswordLink property. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogSingleSignOnResourceInner.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogSingleSignOnResourceInner.java index 5ef58a099a605..83c70bef625e0 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogSingleSignOnResourceInner.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/DatadogSingleSignOnResourceInner.java @@ -7,16 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datadog.models.DatadogSingleSignOnProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The DatadogSingleSignOnResource model. */ @Fluent public final class DatadogSingleSignOnResourceInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatadogSingleSignOnResourceInner.class); - /* * The properties property. */ 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 ae48846edbcbc..c2e2c3f919e53 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.datadog.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The definition of a linked resource. */ @Fluent public final class LinkedResourceInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LinkedResourceInner.class); - /* * The ARM id of the linked resource. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/MonitoredResourceInner.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/MonitoredResourceInner.java index a1ba8aa1858d8..330f5d830ef4f 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/MonitoredResourceInner.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/MonitoredResourceInner.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.datadog.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The properties of a resource currently being monitored by the Datadog monitor resource. */ @Fluent public final class MonitoredResourceInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MonitoredResourceInner.class); - /* * The ARM id of the resource. */ @@ -27,8 +23,7 @@ public final class MonitoredResourceInner { private Boolean sendingMetrics; /* - * Reason for why the resource is sending metrics (or why it is not - * sending). + * Reason for why the resource is sending metrics (or why it is not sending). */ @JsonProperty(value = "reasonForMetricsStatus") private String reasonForMetricsStatus; diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/MonitoringTagRulesInner.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/MonitoringTagRulesInner.java index 70fc1aaac7a16..15413b4160454 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/MonitoringTagRulesInner.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/MonitoringTagRulesInner.java @@ -7,16 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datadog.models.MonitoringTagRulesProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Capture logs and metrics of Azure resources based on ARM tags. */ @Fluent public final class MonitoringTagRulesInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MonitoringTagRulesInner.class); - /* * Definition of the properties for a TagRules resource. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/OperationResultInner.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/OperationResultInner.java index e6102965aeb4f..ddbbacb1f38de 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/OperationResultInner.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/fluent/models/OperationResultInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.datadog.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datadog.models.OperationDisplay; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A Microsoft.Datadog REST API operation. */ @Fluent public final class OperationResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationResultInner.class); - /* * Operation name, i.e., {provider}/{resource}/{operation}. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/DatadogMonitorResourceImpl.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/DatadogMonitorResourceImpl.java index 961ae43ef2d5a..b3c386355c497 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/DatadogMonitorResourceImpl.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/DatadogMonitorResourceImpl.java @@ -80,6 +80,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public DatadogMonitorResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/DatadogSingleSignOnResourceImpl.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/DatadogSingleSignOnResourceImpl.java index a84cfdb27fc27..8c0f7007b33dd 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/DatadogSingleSignOnResourceImpl.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/DatadogSingleSignOnResourceImpl.java @@ -36,6 +36,10 @@ public SystemData systemData() { return this.innerModel().systemData(); } + public String resourceGroupName() { + return resourceGroupName; + } + public DatadogSingleSignOnResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MarketplaceAgreementsClientImpl.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MarketplaceAgreementsClientImpl.java index ad5074f4ead1a..f2395b3bb2100 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MarketplaceAgreementsClientImpl.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MarketplaceAgreementsClientImpl.java @@ -27,7 +27,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datadog.fluent.MarketplaceAgreementsClient; import com.azure.resourcemanager.datadog.fluent.models.DatadogAgreementResourceInner; import com.azure.resourcemanager.datadog.models.DatadogAgreementResourceListResponse; @@ -35,8 +34,6 @@ /** An instance of this class provides access to all the operations defined in MarketplaceAgreementsClient. */ public final class MarketplaceAgreementsClientImpl implements MarketplaceAgreementsClient { - private final ClientLogger logger = new ClientLogger(MarketplaceAgreementsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final MarketplaceAgreementsService service; @@ -101,7 +98,7 @@ Mono> listNext( * * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -147,7 +144,7 @@ private Mono> listSinglePageAsync() * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -188,7 +185,7 @@ private Mono> listSinglePageAsync(C * * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -202,7 +199,7 @@ private PagedFlux listAsync() { * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -215,7 +212,7 @@ private PagedFlux listAsync(Context context) { * * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -229,7 +226,7 @@ public PagedIterable list() { * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -243,7 +240,7 @@ public PagedIterable list(Context context) { * @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. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -286,7 +283,7 @@ private Mono> createOrUpdateWithResponse * @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. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -325,19 +322,11 @@ private Mono> createOrUpdateWithResponse * @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. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(DatadogAgreementResourceInner body) { - return createOrUpdateWithResponseAsync(body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return createOrUpdateWithResponseAsync(body).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -345,20 +334,12 @@ private Mono createOrUpdateAsync(DatadogAgreement * * @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. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync() { final DatadogAgreementResourceInner body = null; - return createOrUpdateWithResponseAsync(body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return createOrUpdateWithResponseAsync(body).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -382,7 +363,7 @@ public DatadogAgreementResourceInner createOrUpdate() { * @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. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -397,7 +378,7 @@ public Response createOrUpdateWithResponse( * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -433,7 +414,7 @@ private Mono> listNextSinglePageAsy * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync( diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MarketplaceAgreementsImpl.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MarketplaceAgreementsImpl.java index d6f65f8e66d31..78754a86af73d 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MarketplaceAgreementsImpl.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MarketplaceAgreementsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.datadog.fluent.models.DatadogAgreementResourceInner; import com.azure.resourcemanager.datadog.models.DatadogAgreementResource; import com.azure.resourcemanager.datadog.models.MarketplaceAgreements; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class MarketplaceAgreementsImpl implements MarketplaceAgreements { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MarketplaceAgreementsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(MarketplaceAgreementsImpl.class); private final MarketplaceAgreementsClient innerClient; diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MicrosoftDatadogClientBuilder.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MicrosoftDatadogClientBuilder.java index dcbbd139238f8..5598e6ae5f4d1 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MicrosoftDatadogClientBuilder.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MicrosoftDatadogClientBuilder.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.AzureEnvironment; @@ -67,34 +66,34 @@ public MicrosoftDatadogClientBuilder environment(AzureEnvironment environment) { } /* - * The default poll interval for long-running operation + * The HTTP pipeline to send requests through */ - private Duration defaultPollInterval; + private HttpPipeline pipeline; /** - * Sets The default poll interval for long-running operation. + * Sets The HTTP pipeline to send requests through. * - * @param defaultPollInterval the defaultPollInterval value. + * @param pipeline the pipeline value. * @return the MicrosoftDatadogClientBuilder. */ - public MicrosoftDatadogClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; + public MicrosoftDatadogClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; return this; } /* - * The HTTP pipeline to send requests through + * The default poll interval for long-running operation */ - private HttpPipeline pipeline; + private Duration defaultPollInterval; /** - * Sets The HTTP pipeline to send requests through. + * Sets The default poll interval for long-running operation. * - * @param pipeline the pipeline value. + * @param defaultPollInterval the defaultPollInterval value. * @return the MicrosoftDatadogClientBuilder. */ - public MicrosoftDatadogClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; + public MicrosoftDatadogClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; return this; } @@ -120,27 +119,26 @@ public MicrosoftDatadogClientBuilder serializerAdapter(SerializerAdapter seriali * @return an instance of MicrosoftDatadogClientImpl. */ public MicrosoftDatadogClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (pipeline == null) { - this.pipeline = - new HttpPipelineBuilder() - .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) - .build(); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = + (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval = + (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = + (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); MicrosoftDatadogClientImpl client = new MicrosoftDatadogClientImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + subscriptionId, + localEndpoint); return client; } } 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 a530bea2aeabf..61fc25139115c 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 @@ -15,6 +15,7 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; @@ -33,15 +34,12 @@ import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.time.Duration; -import java.util.Map; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** Initializes a new instance of the MicrosoftDatadogClientImpl type. */ @ServiceClient(builder = MicrosoftDatadogClientBuilder.class) public final class MicrosoftDatadogClientImpl implements MicrosoftDatadogClient { - private final ClientLogger logger = new ClientLogger(MicrosoftDatadogClientImpl.class); - /** The ID of the target subscription. */ private final String subscriptionId; @@ -196,7 +194,7 @@ public SingleSignOnConfigurationsClient getSingleSignOnConfigurations() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-03-01"; + this.apiVersion = "2022-06-01"; this.marketplaceAgreements = new MarketplaceAgreementsClientImpl(this); this.monitors = new MonitorsClientImpl(this); this.operations = new OperationsClientImpl(this); @@ -220,10 +218,7 @@ public Context getContext() { * @return the merged context. */ public Context mergeContext(Context context) { - for (Map.Entry entry : this.getContext().getValues().entrySet()) { - context = context.addData(entry.getKey(), entry.getValue()); - } - return context; + return CoreUtils.mergeContexts(this.getContext(), context); } /** @@ -287,7 +282,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -346,4 +341,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(MicrosoftDatadogClientImpl.class); } diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MonitoringTagRulesImpl.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MonitoringTagRulesImpl.java index 305ab9d49a920..6f4b2e773417b 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MonitoringTagRulesImpl.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MonitoringTagRulesImpl.java @@ -36,6 +36,10 @@ public SystemData systemData() { return this.innerModel().systemData(); } + public String resourceGroupName() { + return resourceGroupName; + } + public MonitoringTagRulesInner innerModel() { return this.innerObject; } diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MonitorsClientImpl.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MonitorsClientImpl.java index 03840bd4e0c22..9908c2bf063aa 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MonitorsClientImpl.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MonitorsClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.datadog.fluent.MonitorsClient; @@ -53,8 +52,6 @@ /** An instance of this class provides access to all the operations defined in MonitorsClient. */ public final class MonitorsClientImpl implements MonitorsClient { - private final ClientLogger logger = new ClientLogger(MonitorsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final MonitorsService service; @@ -338,7 +335,7 @@ Mono> listByResourceGroupNext( * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listApiKeysSinglePageAsync( @@ -396,7 +393,7 @@ private Mono> listApiKeysSinglePageAsync( * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listApiKeysSinglePageAsync( @@ -450,7 +447,7 @@ private Mono> listApiKeysSinglePageAsync( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listApiKeysAsync(String resourceGroupName, String monitorName) { @@ -468,7 +465,7 @@ private PagedFlux listApiKeysAsync(String resourceGroupName, * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listApiKeysAsync( @@ -486,7 +483,7 @@ private PagedFlux listApiKeysAsync( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listApiKeys(String resourceGroupName, String monitorName) { @@ -502,7 +499,7 @@ public PagedIterable listApiKeys(String resourceGroupName, S * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listApiKeys( @@ -518,7 +515,7 @@ public PagedIterable listApiKeys( * @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 default api key. + * @return the default api key along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultKeyWithResponseAsync( @@ -567,7 +564,7 @@ private Mono> getDefaultKeyWithResponseAsync( * @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 default api key. + * @return the default api key along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getDefaultKeyWithResponseAsync( @@ -612,19 +609,12 @@ private Mono> getDefaultKeyWithResponseAsync( * @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 default api key. + * @return the default api key on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getDefaultKeyAsync(String resourceGroupName, String monitorName) { return getDefaultKeyWithResponseAsync(resourceGroupName, monitorName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -651,7 +641,7 @@ public DatadogApiKeyInner getDefaultKey(String resourceGroupName, String monitor * @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 default api key. + * @return the default api key along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getDefaultKeyWithResponse( @@ -668,7 +658,7 @@ public Response getDefaultKeyWithResponse( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> setDefaultKeyWithResponseAsync( @@ -722,7 +712,7 @@ private Mono> setDefaultKeyWithResponseAsync( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> setDefaultKeyWithResponseAsync( @@ -772,12 +762,11 @@ private Mono> setDefaultKeyWithResponseAsync( * @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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono setDefaultKeyAsync(String resourceGroupName, String monitorName, DatadogApiKeyInner body) { - return setDefaultKeyWithResponseAsync(resourceGroupName, monitorName, body) - .flatMap((Response res) -> Mono.empty()); + return setDefaultKeyWithResponseAsync(resourceGroupName, monitorName, body).flatMap(ignored -> Mono.empty()); } /** @@ -788,13 +777,12 @@ private Mono setDefaultKeyAsync(String resourceGroupName, String monitorNa * @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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono setDefaultKeyAsync(String resourceGroupName, String monitorName) { final DatadogApiKeyInner body = null; - return setDefaultKeyWithResponseAsync(resourceGroupName, monitorName, body) - .flatMap((Response res) -> Mono.empty()); + return setDefaultKeyWithResponseAsync(resourceGroupName, monitorName, body).flatMap(ignored -> Mono.empty()); } /** @@ -822,7 +810,7 @@ public void setDefaultKey(String resourceGroupName, String monitorName) { * @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. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response setDefaultKeyWithResponse( @@ -838,7 +826,7 @@ public Response setDefaultKeyWithResponse( * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listHostsSinglePageAsync( @@ -896,7 +884,7 @@ private Mono> listHostsSinglePageAsync( * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listHostsSinglePageAsync( @@ -950,7 +938,7 @@ private Mono> listHostsSinglePageAsync( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listHostsAsync(String resourceGroupName, String monitorName) { @@ -968,7 +956,7 @@ private PagedFlux listHostsAsync(String resourceGroupName, Str * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listHostsAsync(String resourceGroupName, String monitorName, Context context) { @@ -985,7 +973,7 @@ private PagedFlux listHostsAsync(String resourceGroupName, Str * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listHosts(String resourceGroupName, String monitorName) { @@ -1001,7 +989,7 @@ public PagedIterable listHosts(String resourceGroupName, Strin * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listHosts(String resourceGroupName, String monitorName, Context context) { @@ -1016,7 +1004,7 @@ public PagedIterable listHosts(String resourceGroupName, Strin * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listLinkedResourcesSinglePageAsync( @@ -1074,7 +1062,7 @@ private Mono> listLinkedResourcesSinglePageAs * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listLinkedResourcesSinglePageAsync( @@ -1128,7 +1116,7 @@ private Mono> listLinkedResourcesSinglePageAs * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listLinkedResourcesAsync(String resourceGroupName, String monitorName) { @@ -1146,7 +1134,7 @@ private PagedFlux listLinkedResourcesAsync(String resourceG * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listLinkedResourcesAsync( @@ -1164,7 +1152,7 @@ private PagedFlux listLinkedResourcesAsync( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listLinkedResources(String resourceGroupName, String monitorName) { @@ -1180,7 +1168,7 @@ public PagedIterable listLinkedResources(String resourceGro * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listLinkedResources( @@ -1196,7 +1184,7 @@ public PagedIterable listLinkedResources( * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listMonitoredResourcesSinglePageAsync( @@ -1254,7 +1242,7 @@ private Mono> listMonitoredResourcesSingle * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listMonitoredResourcesSinglePageAsync( @@ -1308,7 +1296,7 @@ private Mono> listMonitoredResourcesSingle * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listMonitoredResourcesAsync( @@ -1327,7 +1315,7 @@ private PagedFlux listMonitoredResourcesAsync( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listMonitoredResourcesAsync( @@ -1345,7 +1333,7 @@ private PagedFlux listMonitoredResourcesAsync( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName) { @@ -1361,7 +1349,7 @@ public PagedIterable listMonitoredResources(String resou * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listMonitoredResources( @@ -1374,7 +1362,7 @@ public PagedIterable listMonitoredResources( * * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -1420,7 +1408,7 @@ private Mono> listSinglePageAsync() { * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -1461,7 +1449,7 @@ private Mono> listSinglePageAsync(Con * * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1475,7 +1463,7 @@ private PagedFlux listAsync() { * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -1488,7 +1476,7 @@ private PagedFlux listAsync(Context context) { * * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -1502,7 +1490,7 @@ public PagedIterable list() { * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -1516,7 +1504,7 @@ public PagedIterable list(Context context) { * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -1569,7 +1557,7 @@ private Mono> listByResourceGroupSing * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -1618,7 +1606,7 @@ private Mono> listByResourceGroupSing * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -1635,7 +1623,7 @@ private PagedFlux listByResourceGroupAsync(String r * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -1651,7 +1639,7 @@ private PagedFlux listByResourceGroupAsync(String r * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -1666,7 +1654,7 @@ public PagedIterable listByResourceGroup(String res * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -1681,7 +1669,8 @@ public PagedIterable listByResourceGroup(String res * @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 properties of a specific monitor resource. + * @return the properties of a specific monitor resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -1730,7 +1719,8 @@ private Mono> getByResourceGroupWithRespon * @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 properties of a specific monitor resource. + * @return the properties of a specific monitor resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -1775,19 +1765,12 @@ private Mono> getByResourceGroupWithRespon * @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 properties of a specific monitor resource. + * @return the properties of a specific monitor resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String monitorName) { return getByResourceGroupWithResponseAsync(resourceGroupName, monitorName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1814,7 +1797,7 @@ public DatadogMonitorResourceInner getByResourceGroup(String resourceGroupName, * @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 properties of a specific monitor resource. + * @return the properties of a specific monitor resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -1831,7 +1814,7 @@ public Response getByResourceGroupWithResponse( * @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. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -1885,7 +1868,7 @@ private Mono>> createWithResponseAsync( * @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. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -1935,9 +1918,9 @@ private Mono>> createWithResponseAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DatadogMonitorResourceInner> beginCreateAsync( String resourceGroupName, String monitorName, DatadogMonitorResourceInner body) { Mono>> mono = createWithResponseAsync(resourceGroupName, monitorName, body); @@ -1948,7 +1931,7 @@ private PollerFlux, DatadogMonitorResour this.client.getHttpPipeline(), DatadogMonitorResourceInner.class, DatadogMonitorResourceInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -1961,9 +1944,9 @@ private PollerFlux, DatadogMonitorResour * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DatadogMonitorResourceInner> beginCreateAsync( String resourceGroupName, String monitorName, DatadogMonitorResourceInner body, Context context) { context = this.client.mergeContext(context); @@ -1987,9 +1970,9 @@ private PollerFlux, DatadogMonitorResour * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatadogMonitorResourceInner> beginCreate( String resourceGroupName, String monitorName, DatadogMonitorResourceInner body) { return beginCreateAsync(resourceGroupName, monitorName, body).getSyncPoller(); @@ -2005,9 +1988,9 @@ public SyncPoller, DatadogMonitorResourc * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatadogMonitorResourceInner> beginCreate( String resourceGroupName, String monitorName, DatadogMonitorResourceInner body, Context context) { return beginCreateAsync(resourceGroupName, monitorName, body, context).getSyncPoller(); @@ -2022,7 +2005,7 @@ public SyncPoller, DatadogMonitorResourc * @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. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -2040,7 +2023,7 @@ private Mono createAsync( * @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. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync(String resourceGroupName, String monitorName) { @@ -2060,7 +2043,7 @@ private Mono createAsync(String resourceGroupName, * @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. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -2130,7 +2113,7 @@ public DatadogMonitorResourceInner create( * @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. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -2184,7 +2167,7 @@ private Mono>> updateWithResponseAsync( * @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. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -2234,9 +2217,9 @@ private Mono>> updateWithResponseAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DatadogMonitorResourceInner> beginUpdateAsync( String resourceGroupName, String monitorName, DatadogMonitorResourceUpdateParameters body) { Mono>> mono = updateWithResponseAsync(resourceGroupName, monitorName, body); @@ -2247,7 +2230,7 @@ private PollerFlux, DatadogMonitorResour this.client.getHttpPipeline(), DatadogMonitorResourceInner.class, DatadogMonitorResourceInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -2260,9 +2243,9 @@ private PollerFlux, DatadogMonitorResour * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DatadogMonitorResourceInner> beginUpdateAsync( String resourceGroupName, String monitorName, DatadogMonitorResourceUpdateParameters body, Context context) { context = this.client.mergeContext(context); @@ -2286,9 +2269,9 @@ private PollerFlux, DatadogMonitorResour * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatadogMonitorResourceInner> beginUpdate( String resourceGroupName, String monitorName, DatadogMonitorResourceUpdateParameters body) { return beginUpdateAsync(resourceGroupName, monitorName, body).getSyncPoller(); @@ -2304,9 +2287,9 @@ public SyncPoller, DatadogMonitorResourc * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatadogMonitorResourceInner> beginUpdate( String resourceGroupName, String monitorName, DatadogMonitorResourceUpdateParameters body, Context context) { return beginUpdateAsync(resourceGroupName, monitorName, body, context).getSyncPoller(); @@ -2321,7 +2304,7 @@ public SyncPoller, DatadogMonitorResourc * @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. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -2339,7 +2322,7 @@ private Mono updateAsync( * @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. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String monitorName) { @@ -2359,7 +2342,7 @@ private Mono updateAsync(String resourceGroupName, * @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. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -2428,7 +2411,7 @@ public DatadogMonitorResourceInner update( * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String monitorName) { @@ -2476,7 +2459,7 @@ private Mono>> deleteWithResponseAsync(String resource * @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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -2521,14 +2504,15 @@ private Mono>> deleteWithResponseAsync( * @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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, monitorName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -2540,9 +2524,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @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 completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String monitorName, Context context) { context = this.client.mergeContext(context); @@ -2560,9 +2544,9 @@ private PollerFlux, Void> beginDeleteAsync( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName) { return beginDeleteAsync(resourceGroupName, monitorName).getSyncPoller(); } @@ -2576,9 +2560,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String monitorName, Context context) { return beginDeleteAsync(resourceGroupName, monitorName, context).getSyncPoller(); @@ -2592,7 +2576,7 @@ public SyncPoller, Void> beginDelete( * @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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String monitorName) { @@ -2608,7 +2592,7 @@ private Mono deleteAsync(String resourceGroupName, String monitorName) { * @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 completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String monitorName, Context context) { @@ -2654,7 +2638,7 @@ public void delete(String resourceGroupName, String monitorName, Context context * @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. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> refreshSetPasswordLinkWithResponseAsync( @@ -2703,7 +2687,7 @@ private Mono> refreshSetPasswordLinkWithRe * @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. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> refreshSetPasswordLinkWithResponseAsync( @@ -2748,20 +2732,13 @@ private Mono> refreshSetPasswordLinkWithRe * @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. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono refreshSetPasswordLinkAsync( String resourceGroupName, String monitorName) { return refreshSetPasswordLinkWithResponseAsync(resourceGroupName, monitorName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -2788,7 +2765,7 @@ public DatadogSetPasswordLinkInner refreshSetPasswordLink(String resourceGroupNa * @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. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response refreshSetPasswordLinkWithResponse( @@ -2803,7 +2780,7 @@ public Response refreshSetPasswordLinkWithResponse( * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listApiKeysNextSinglePageAsync(String nextLink) { @@ -2839,7 +2816,7 @@ private Mono> listApiKeysNextSinglePageAsync(S * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listApiKeysNextSinglePageAsync(String nextLink, Context context) { @@ -2874,7 +2851,7 @@ private Mono> listApiKeysNextSinglePageAsync(S * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listHostsNextSinglePageAsync(String nextLink) { @@ -2910,7 +2887,7 @@ private Mono> listHostsNextSinglePageAsync(Strin * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listHostsNextSinglePageAsync(String nextLink, Context context) { @@ -2945,7 +2922,7 @@ private Mono> listHostsNextSinglePageAsync(Strin * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listLinkedResourcesNextSinglePageAsync(String nextLink) { @@ -2982,7 +2959,7 @@ private Mono> listLinkedResourcesNextSinglePa * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listLinkedResourcesNextSinglePageAsync( @@ -3018,7 +2995,7 @@ private Mono> listLinkedResourcesNextSinglePa * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listMonitoredResourcesNextSinglePageAsync(String nextLink) { @@ -3055,7 +3032,7 @@ private Mono> listMonitoredResourcesNextSi * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listMonitoredResourcesNextSinglePageAsync( @@ -3091,7 +3068,7 @@ private Mono> listMonitoredResourcesNextSi * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -3127,7 +3104,7 @@ private Mono> listNextSinglePageAsync * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -3162,7 +3139,7 @@ private Mono> listNextSinglePageAsync * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -3199,7 +3176,7 @@ private Mono> listByResourceGroupNext * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync( diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MonitorsImpl.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MonitorsImpl.java index 96b0318908a9e..780665420be6c 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MonitorsImpl.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/MonitorsImpl.java @@ -23,10 +23,9 @@ import com.azure.resourcemanager.datadog.models.LinkedResource; import com.azure.resourcemanager.datadog.models.MonitoredResource; import com.azure.resourcemanager.datadog.models.Monitors; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class MonitorsImpl implements Monitors { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MonitorsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(MonitorsImpl.class); private final MonitorsClient innerClient; @@ -198,7 +197,7 @@ public Response refreshSetPasswordLinkWithResponse( public DatadogMonitorResource getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -206,7 +205,7 @@ public DatadogMonitorResource getById(String id) { } String monitorName = Utils.getValueFromIdByName(id, "monitors"); if (monitorName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); @@ -217,7 +216,7 @@ public DatadogMonitorResource getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -225,7 +224,7 @@ public Response getByIdWithResponse(String id, Context c } String monitorName = Utils.getValueFromIdByName(id, "monitors"); if (monitorName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); @@ -236,7 +235,7 @@ public Response getByIdWithResponse(String id, Context c public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -244,7 +243,7 @@ public void deleteById(String id) { } String monitorName = Utils.getValueFromIdByName(id, "monitors"); if (monitorName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); @@ -255,7 +254,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -263,7 +262,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String monitorName = Utils.getValueFromIdByName(id, "monitors"); if (monitorName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); 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 7b29f953fd35e..cc846b31b7b51 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datadog.fluent.OperationsClient; import com.azure.resourcemanager.datadog.fluent.models.OperationResultInner; import com.azure.resourcemanager.datadog.models.OperationListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in OperationsClient. */ public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsService service; @@ -81,11 +78,12 @@ Mono> listNext( } /** - * List all operations provided by Microsoft.Datadog for the 2021-03-01 api version. + * List all operations provided by Microsoft.Datadog for the 2022-06-01 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. - * @return result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -112,13 +110,14 @@ private Mono> listSinglePageAsync() { } /** - * List all operations provided by Microsoft.Datadog for the 2021-03-01 api version. + * List all operations provided by Microsoft.Datadog for the 2022-06-01 api version. * * @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 result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -144,11 +143,12 @@ private Mono> listSinglePageAsync(Context co } /** - * List all operations provided by Microsoft.Datadog for the 2021-03-01 api version. + * List all operations provided by Microsoft.Datadog for the 2022-06-01 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. - * @return result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -156,13 +156,14 @@ private PagedFlux listAsync() { } /** - * List all operations provided by Microsoft.Datadog for the 2021-03-01 api version. + * List all operations provided by Microsoft.Datadog for the 2022-06-01 api version. * * @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 result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -171,11 +172,12 @@ private PagedFlux listAsync(Context context) { } /** - * List all operations provided by Microsoft.Datadog for the 2021-03-01 api version. + * List all operations provided by Microsoft.Datadog for the 2022-06-01 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. - * @return result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -183,13 +185,14 @@ public PagedIterable list() { } /** - * List all operations provided by Microsoft.Datadog for the 2021-03-01 api version. + * List all operations provided by Microsoft.Datadog for the 2022-06-01 api version. * * @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 result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -203,7 +206,8 @@ public PagedIterable list(Context context) { * @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 result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -239,7 +243,8 @@ private Mono> listNextSinglePageAsync(String * @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 result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/OperationsImpl.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/OperationsImpl.java index 7a82ba20bce14..46f2c6f352855 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/OperationsImpl.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/OperationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.datadog.fluent.models.OperationResultInner; import com.azure.resourcemanager.datadog.models.OperationResult; import com.azure.resourcemanager.datadog.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); private final OperationsClient innerClient; diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/SingleSignOnConfigurationsClientImpl.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/SingleSignOnConfigurationsClientImpl.java index ea4564fc7355b..ceedece21356a 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/SingleSignOnConfigurationsClientImpl.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/SingleSignOnConfigurationsClientImpl.java @@ -28,7 +28,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.datadog.fluent.SingleSignOnConfigurationsClient; @@ -40,8 +39,6 @@ /** An instance of this class provides access to all the operations defined in SingleSignOnConfigurationsClient. */ public final class SingleSignOnConfigurationsClientImpl implements SingleSignOnConfigurationsClient { - private final ClientLogger logger = new ClientLogger(SingleSignOnConfigurationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final SingleSignOnConfigurationsService service; @@ -135,7 +132,7 @@ Mono> listNext( * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -193,7 +190,7 @@ private Mono> listSinglePageAsyn * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -247,7 +244,7 @@ private Mono> listSinglePageAsyn * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String monitorName) { @@ -264,7 +261,7 @@ private PagedFlux listAsync(String resourceGro * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -282,7 +279,7 @@ private PagedFlux listAsync( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String monitorName) { @@ -298,7 +295,7 @@ public PagedIterable list(String resourceGroup * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -316,7 +313,7 @@ public PagedIterable list( * @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. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -376,7 +373,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @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. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -436,9 +433,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DatadogSingleSignOnResourceInner> beginCreateOrUpdateAsync( String resourceGroupName, @@ -454,7 +451,7 @@ private Mono>> createOrUpdateWithResponseAsync( this.client.getHttpPipeline(), DatadogSingleSignOnResourceInner.class, DatadogSingleSignOnResourceInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -468,9 +465,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @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. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DatadogSingleSignOnResourceInner> beginCreateOrUpdateAsync( String resourceGroupName, @@ -501,9 +498,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatadogSingleSignOnResourceInner> beginCreateOrUpdate( String resourceGroupName, @@ -524,9 +521,9 @@ private Mono>> createOrUpdateWithResponseAsync( * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatadogSingleSignOnResourceInner> beginCreateOrUpdate( String resourceGroupName, @@ -548,7 +545,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @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. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -567,7 +564,7 @@ private Mono createOrUpdateAsync( * @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. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -589,7 +586,7 @@ private Mono createOrUpdateAsync( * @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. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -671,7 +668,8 @@ public DatadogSingleSignOnResourceInner createOrUpdate( * @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 datadog single sign-on resource for the given Monitor. + * @return the datadog single sign-on resource for the given Monitor along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -726,7 +724,8 @@ private Mono> getWithResponseAsync( * @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 datadog single sign-on resource for the given Monitor. + * @return the datadog single sign-on resource for the given Monitor along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -777,20 +776,13 @@ private Mono> getWithResponseAsync( * @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 datadog single sign-on resource for the given Monitor. + * @return the datadog single sign-on resource for the given Monitor on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String resourceGroupName, String monitorName, String configurationName) { return getWithResponseAsync(resourceGroupName, monitorName, configurationName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -820,7 +812,7 @@ public DatadogSingleSignOnResourceInner get( * @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 datadog single sign-on resource for the given Monitor. + * @return the datadog single sign-on resource for the given Monitor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -835,7 +827,7 @@ public Response getWithResponse( * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -871,7 +863,7 @@ private Mono> listNextSinglePage * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync( diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/SingleSignOnConfigurationsImpl.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/SingleSignOnConfigurationsImpl.java index 030a61f55d6b5..51a884f456085 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/SingleSignOnConfigurationsImpl.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/SingleSignOnConfigurationsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.datadog.fluent.models.DatadogSingleSignOnResourceInner; import com.azure.resourcemanager.datadog.models.DatadogSingleSignOnResource; import com.azure.resourcemanager.datadog.models.SingleSignOnConfigurations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class SingleSignOnConfigurationsImpl implements SingleSignOnConfigurations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SingleSignOnConfigurationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(SingleSignOnConfigurationsImpl.class); private final SingleSignOnConfigurationsClient innerClient; @@ -70,7 +69,7 @@ public Response getWithResponse( public DatadogSingleSignOnResource getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -78,14 +77,14 @@ public DatadogSingleSignOnResource getById(String id) { } String monitorName = Utils.getValueFromIdByName(id, "monitors"); if (monitorName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); } String configurationName = Utils.getValueFromIdByName(id, "singleSignOnConfigurations"); if (configurationName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -99,7 +98,7 @@ public DatadogSingleSignOnResource getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -107,14 +106,14 @@ public Response getByIdWithResponse(String id, Cont } String monitorName = Utils.getValueFromIdByName(id, "monitors"); if (monitorName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); } String configurationName = Utils.getValueFromIdByName(id, "singleSignOnConfigurations"); if (configurationName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/TagRulesClientImpl.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/TagRulesClientImpl.java index cf9f0e1f16da5..cbebe78b41f35 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/TagRulesClientImpl.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/TagRulesClientImpl.java @@ -27,7 +27,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datadog.fluent.TagRulesClient; import com.azure.resourcemanager.datadog.fluent.models.MonitoringTagRulesInner; import com.azure.resourcemanager.datadog.models.MonitoringTagRulesListResponse; @@ -35,8 +34,6 @@ /** An instance of this class provides access to all the operations defined in TagRulesClient. */ public final class TagRulesClientImpl implements TagRulesClient { - private final ClientLogger logger = new ClientLogger(TagRulesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final TagRulesService service; @@ -127,7 +124,7 @@ Mono> listNext( * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -185,7 +182,7 @@ private Mono> listSinglePageAsync( * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -239,7 +236,7 @@ private Mono> listSinglePageAsync( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String monitorName) { @@ -256,7 +253,7 @@ private PagedFlux listAsync(String resourceGroupName, S * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -274,7 +271,7 @@ private PagedFlux listAsync( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String monitorName) { @@ -290,7 +287,7 @@ public PagedIterable list(String resourceGroupName, Str * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String monitorName, Context context) { @@ -307,7 +304,8 @@ public PagedIterable list(String resourceGroupName, Str * @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 capture logs and metrics of Azure resources based on ARM tags. + * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -366,7 +364,8 @@ private Mono> createOrUpdateWithResponseAsync( * @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 capture logs and metrics of Azure resources based on ARM tags. + * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -425,20 +424,13 @@ private Mono> createOrUpdateWithResponseAsync( * @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 capture logs and metrics of Azure resources based on ARM tags. + * @return capture logs and metrics of Azure resources based on ARM tags on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( String resourceGroupName, String monitorName, String ruleSetName, MonitoringTagRulesInner body) { return createOrUpdateWithResponseAsync(resourceGroupName, monitorName, ruleSetName, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -450,21 +442,14 @@ private Mono createOrUpdateAsync( * @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 capture logs and metrics of Azure resources based on ARM tags. + * @return capture logs and metrics of Azure resources based on ARM tags on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( String resourceGroupName, String monitorName, String ruleSetName) { final MonitoringTagRulesInner body = null; return createOrUpdateWithResponseAsync(resourceGroupName, monitorName, ruleSetName, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -495,7 +480,7 @@ public MonitoringTagRulesInner createOrUpdate(String resourceGroupName, String m * @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 capture logs and metrics of Azure resources based on ARM tags. + * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -516,7 +501,8 @@ public Response createOrUpdateWithResponse( * @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 a tag rule set for a given monitor resource. + * @return a tag rule set for a given monitor resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -570,7 +556,8 @@ private Mono> getWithResponseAsync( * @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 a tag rule set for a given monitor resource. + * @return a tag rule set for a given monitor resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -620,19 +607,12 @@ private Mono> getWithResponseAsync( * @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 a tag rule set for a given monitor resource. + * @return a tag rule set for a given monitor resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String monitorName, String ruleSetName) { return getWithResponseAsync(resourceGroupName, monitorName, ruleSetName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -661,7 +641,7 @@ public MonitoringTagRulesInner get(String resourceGroupName, String monitorName, * @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 a tag rule set for a given monitor resource. + * @return a tag rule set for a given monitor resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -676,7 +656,7 @@ public Response getWithResponse( * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -712,7 +692,7 @@ private Mono> listNextSinglePageAsync(Str * @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 response of a list operation. + * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/TagRulesImpl.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/TagRulesImpl.java index 1a11721f209c8..873d25b113520 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/TagRulesImpl.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/implementation/TagRulesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.datadog.fluent.models.MonitoringTagRulesInner; import com.azure.resourcemanager.datadog.models.MonitoringTagRules; import com.azure.resourcemanager.datadog.models.TagRules; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class TagRulesImpl implements TagRules { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TagRulesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(TagRulesImpl.class); private final TagRulesClient innerClient; @@ -66,7 +65,7 @@ public Response getWithResponse( public MonitoringTagRules getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -74,14 +73,14 @@ public MonitoringTagRules getById(String id) { } String monitorName = Utils.getValueFromIdByName(id, "monitors"); if (monitorName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); } String ruleSetName = Utils.getValueFromIdByName(id, "tagRules"); if (ruleSetName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'tagRules'.", id))); @@ -92,7 +91,7 @@ public MonitoringTagRules getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -100,14 +99,14 @@ public Response getByIdWithResponse(String id, Context conte } String monitorName = Utils.getValueFromIdByName(id, "monitors"); if (monitorName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); } String ruleSetName = Utils.getValueFromIdByName(id, "tagRules"); if (ruleSetName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'tagRules'.", id))); diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogAgreementProperties.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogAgreementProperties.java index f7b3a10578385..d67a0822c51b7 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogAgreementProperties.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogAgreementProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Terms properties. */ @Fluent public final class DatadogAgreementProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatadogAgreementProperties.class); - /* * Publisher identifier string. */ @@ -46,8 +42,7 @@ public final class DatadogAgreementProperties { private String privacyPolicyLink; /* - * Date and time in UTC of when the terms were accepted. This is empty if - * Accepted is false. + * Date and time in UTC of when the terms were accepted. This is empty if Accepted is false. */ @JsonProperty(value = "retrieveDatetime") private OffsetDateTime retrieveDatetime; diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogAgreementResourceListResponse.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogAgreementResourceListResponse.java index e14c49fbc873c..25a831e93b13d 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogAgreementResourceListResponse.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogAgreementResourceListResponse.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datadog.fluent.models.DatadogAgreementResourceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Response of a list operation. */ @Fluent public final class DatadogAgreementResourceListResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatadogAgreementResourceListResponse.class); - /* * Results of a list operation. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogApiKeyListResponse.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogApiKeyListResponse.java index b1db4426c251f..bda427bdbd437 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogApiKeyListResponse.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogApiKeyListResponse.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datadog.fluent.models.DatadogApiKeyInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Response of a list operation. */ @Fluent public final class DatadogApiKeyListResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatadogApiKeyListResponse.class); - /* * Results of a list operation. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogHostListResponse.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogHostListResponse.java index 498f50b9b8f80..ab54305a835c7 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogHostListResponse.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogHostListResponse.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datadog.fluent.models.DatadogHostInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Response of a list operation. */ @Fluent public final class DatadogHostListResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatadogHostListResponse.class); - /* * Results of a list operation. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogHostMetadata.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogHostMetadata.java index 3f69cd369cea2..9133212291b38 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogHostMetadata.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogHostMetadata.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The DatadogHostMetadata model. */ @Fluent public final class DatadogHostMetadata { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatadogHostMetadata.class); - /* * The agent version. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogInstallMethod.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogInstallMethod.java index c17c47cb647d8..8fde8eef3e0b9 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogInstallMethod.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogInstallMethod.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The DatadogInstallMethod model. */ @Fluent public final class DatadogInstallMethod { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatadogInstallMethod.class); - /* * The tool. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogLogsAgent.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogLogsAgent.java index 64a4c7731f137..bd13a84cd94fe 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogLogsAgent.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogLogsAgent.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The DatadogLogsAgent model. */ @Fluent public final class DatadogLogsAgent { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatadogLogsAgent.class); - /* * The transport. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogMonitorResource.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogMonitorResource.java index f97923bc02db9..34895c844e617 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogMonitorResource.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogMonitorResource.java @@ -92,6 +92,13 @@ public interface DatadogMonitorResource { */ String regionName(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.datadog.fluent.models.DatadogMonitorResourceInner object. * @@ -282,7 +289,7 @@ interface WithSku { * * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listApiKeys(); @@ -293,7 +300,7 @@ interface WithSku { * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listApiKeys(Context context); @@ -313,7 +320,7 @@ interface WithSku { * @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 the default api key. + * @return the default api key along with {@link Response}. */ Response getDefaultKeyWithResponse(Context context); @@ -333,7 +340,7 @@ interface WithSku { * @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 the response. + * @return the {@link Response}. */ Response setDefaultKeyWithResponse(DatadogApiKeyInner body, Context context); @@ -342,7 +349,7 @@ interface WithSku { * * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listHosts(); @@ -353,7 +360,7 @@ interface WithSku { * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listHosts(Context context); @@ -362,7 +369,7 @@ interface WithSku { * * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listLinkedResources(); @@ -373,7 +380,7 @@ interface WithSku { * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listLinkedResources(Context context); @@ -382,7 +389,7 @@ interface WithSku { * * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listMonitoredResources(); @@ -393,7 +400,7 @@ interface WithSku { * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listMonitoredResources(Context context); @@ -413,7 +420,7 @@ interface WithSku { * @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 the response. + * @return the response body along with {@link Response}. */ Response refreshSetPasswordLinkWithResponse(Context context); } diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogMonitorResourceListResponse.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogMonitorResourceListResponse.java index 5482e72b44d74..2a07f8e805b4e 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogMonitorResourceListResponse.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogMonitorResourceListResponse.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datadog.fluent.models.DatadogMonitorResourceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Response of a list operation. */ @Fluent public final class DatadogMonitorResourceListResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatadogMonitorResourceListResponse.class); - /* * Results of a list operation. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogMonitorResourceUpdateParameters.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogMonitorResourceUpdateParameters.java index bc3934d0835c6..a04ec221fa0ae 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogMonitorResourceUpdateParameters.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogMonitorResourceUpdateParameters.java @@ -5,19 +5,15 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** The parameters for a PATCH request to a monitor resource. */ @Fluent public final class DatadogMonitorResourceUpdateParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatadogMonitorResourceUpdateParameters.class); - /* - * The set of properties that can be update in a PATCH request to a monitor - * resource. + * The set of properties that can be update in a PATCH request to a monitor resource. */ @JsonProperty(value = "properties") private MonitorUpdateProperties properties; @@ -26,6 +22,7 @@ public final class DatadogMonitorResourceUpdateParameters { * The new tags of the monitor resource. */ @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; /* diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogOrganizationProperties.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogOrganizationProperties.java index 66ec67878bc77..1d8ec77b9c2b3 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogOrganizationProperties.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogOrganizationProperties.java @@ -5,25 +5,21 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Datadog organization properties. */ @Fluent public final class DatadogOrganizationProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatadogOrganizationProperties.class); - /* * Name of the Datadog organization. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "name") private String name; /* * Id of the Datadog organization. */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "id") private String id; /* @@ -33,8 +29,7 @@ public final class DatadogOrganizationProperties { private String linkingAuthCode; /* - * The client_id from an existing in exchange for an auth token to link - * organization. + * The client_id from an existing in exchange for an auth token to link organization. */ @JsonProperty(value = "linkingClientId") private String linkingClientId; @@ -72,6 +67,17 @@ public String name() { return this.name; } + /** + * Set the name property: Name of the Datadog organization. + * + * @param name the name value to set. + * @return the DatadogOrganizationProperties object itself. + */ + public DatadogOrganizationProperties withName(String name) { + this.name = name; + return this; + } + /** * Get the id property: Id of the Datadog organization. * @@ -81,6 +87,17 @@ public String id() { return this.id; } + /** + * Set the id property: Id of the Datadog organization. + * + * @param id the id value to set. + * @return the DatadogOrganizationProperties object itself. + */ + public DatadogOrganizationProperties withId(String id) { + this.id = id; + return this; + } + /** * Get the linkingAuthCode property: The auth code used to linking to an existing datadog organization. * diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogSingleSignOnProperties.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogSingleSignOnProperties.java index b358bb8b6da30..c367ed7cedf72 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogSingleSignOnProperties.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogSingleSignOnProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The DatadogSingleSignOnProperties model. */ @Fluent public final class DatadogSingleSignOnProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatadogSingleSignOnProperties.class); - /* * The provisioningState property. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogSingleSignOnResource.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogSingleSignOnResource.java index 4ddb31da18387..671c41d15b206 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogSingleSignOnResource.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogSingleSignOnResource.java @@ -45,6 +45,13 @@ public interface DatadogSingleSignOnResource { */ SystemData systemData(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.datadog.fluent.models.DatadogSingleSignOnResourceInner object. * diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogSingleSignOnResourceListResponse.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogSingleSignOnResourceListResponse.java index b932d0b53a126..4dc1b7d5bb3d9 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogSingleSignOnResourceListResponse.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/DatadogSingleSignOnResourceListResponse.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datadog.fluent.models.DatadogSingleSignOnResourceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Response of a list operation. */ @Fluent public final class DatadogSingleSignOnResourceListResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatadogSingleSignOnResourceListResponse.class); - /* * Results of a list operation. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/FilteringTag.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/FilteringTag.java index 9e23e3900c324..ab6622f40f151 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/FilteringTag.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/FilteringTag.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -15,8 +13,6 @@ */ @Fluent public final class FilteringTag { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FilteringTag.class); - /* * The name (also known as the key) of the tag. */ @@ -30,8 +26,7 @@ public final class FilteringTag { private String value; /* - * Valid actions for a filtering tag. Exclusion takes priority over - * inclusion. + * Valid actions for a filtering tag. Exclusion takes priority over inclusion. */ @JsonProperty(value = "action") private TagAction action; diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/IdentityProperties.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/IdentityProperties.java index 990d5636c311e..33262351f2e26 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/IdentityProperties.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/IdentityProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The IdentityProperties model. */ @Fluent public final class IdentityProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IdentityProperties.class); - /* * The identity ID. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/LiftrResourceCategories.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/LiftrResourceCategories.java index 36983168e7d95..a00777358fa3c 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/LiftrResourceCategories.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/LiftrResourceCategories.java @@ -27,7 +27,11 @@ public static LiftrResourceCategories fromString(String name) { return fromString(name, LiftrResourceCategories.class); } - /** @return known LiftrResourceCategories values. */ + /** + * Gets known LiftrResourceCategories values. + * + * @return known LiftrResourceCategories values. + */ public static Collection values() { return values(LiftrResourceCategories.class); } diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/LinkedResourceListResponse.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/LinkedResourceListResponse.java index e011780a86141..b112a0805dd18 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/LinkedResourceListResponse.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/LinkedResourceListResponse.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datadog.fluent.models.LinkedResourceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Response of a list operation. */ @Fluent public final class LinkedResourceListResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LinkedResourceListResponse.class); - /* * Results of a list operation. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/LogRules.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/LogRules.java index ff6bc2334e1fb..ea77260c73613 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/LogRules.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/LogRules.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Set of rules for sending logs for the Monitor resource. */ @Fluent public final class LogRules { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LogRules.class); - /* * Flag specifying if AAD logs should be sent for the Monitor resource. */ @@ -22,26 +18,22 @@ public final class LogRules { private Boolean sendAadLogs; /* - * Flag specifying if Azure subscription logs should be sent for the - * Monitor resource. + * Flag specifying if Azure subscription logs should be sent for the Monitor resource. */ @JsonProperty(value = "sendSubscriptionLogs") private Boolean sendSubscriptionLogs; /* - * Flag specifying if Azure resource logs should be sent for the Monitor - * resource. + * Flag specifying if Azure resource logs should be sent for the Monitor resource. */ @JsonProperty(value = "sendResourceLogs") private Boolean sendResourceLogs; /* - * List of filtering tags to be used for capturing logs. This only takes - * effect if SendResourceLogs flag is enabled. If empty, all resources will - * be captured. If only Exclude action is specified, the rules will apply - * to the list of all available resources. If Include actions are - * specified, the rules will only include resources with the associated - * tags. + * List of filtering tags to be used for capturing logs. This only takes effect if SendResourceLogs flag is + * enabled. If empty, all resources will be captured. If only Exclude action is specified, the rules will apply to + * the list of all available resources. If Include actions are specified, the rules will only include resources + * with the associated tags. */ @JsonProperty(value = "filteringTags") private List filteringTags; diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/ManagedIdentityTypes.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/ManagedIdentityTypes.java index e30aabf38ae17..a5644a454c797 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/ManagedIdentityTypes.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/ManagedIdentityTypes.java @@ -27,7 +27,11 @@ public static ManagedIdentityTypes fromString(String name) { return fromString(name, ManagedIdentityTypes.class); } - /** @return known ManagedIdentityTypes values. */ + /** + * Gets known ManagedIdentityTypes values. + * + * @return known ManagedIdentityTypes values. + */ public static Collection values() { return values(ManagedIdentityTypes.class); } diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MarketplaceAgreements.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MarketplaceAgreements.java index b541db60e6b33..074c26ed4a05e 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MarketplaceAgreements.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MarketplaceAgreements.java @@ -16,7 +16,7 @@ public interface MarketplaceAgreements { * * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -27,7 +27,7 @@ public interface MarketplaceAgreements { * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -48,7 +48,7 @@ public interface MarketplaceAgreements { * @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 the response. + * @return the response body along with {@link Response}. */ Response createOrUpdateWithResponse(DatadogAgreementResourceInner body, Context context); } diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MarketplaceSubscriptionStatus.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MarketplaceSubscriptionStatus.java index 7fff4186814c9..d0a1c76639d23 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MarketplaceSubscriptionStatus.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MarketplaceSubscriptionStatus.java @@ -33,7 +33,11 @@ public static MarketplaceSubscriptionStatus fromString(String name) { return fromString(name, MarketplaceSubscriptionStatus.class); } - /** @return known MarketplaceSubscriptionStatus values. */ + /** + * Gets known MarketplaceSubscriptionStatus values. + * + * @return known MarketplaceSubscriptionStatus values. + */ public static Collection values() { return values(MarketplaceSubscriptionStatus.class); } diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MetricRules.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MetricRules.java index 992c7d9368f3d..c0d51f35d1900 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MetricRules.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MetricRules.java @@ -5,22 +5,16 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Set of rules for sending metrics for the Monitor resource. */ @Fluent public final class MetricRules { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetricRules.class); - /* - * List of filtering tags to be used for capturing metrics. If empty, all - * resources will be captured. If only Exclude action is specified, the - * rules will apply to the list of all available resources. If Include - * actions are specified, the rules will only include resources with the - * associated tags. + * List of filtering tags to be used for capturing metrics. If empty, all resources will be captured. If only + * Exclude action is specified, the rules will apply to the list of all available resources. If Include actions are + * specified, the rules will only include resources with the associated tags. */ @JsonProperty(value = "filteringTags") private List filteringTags; diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitorProperties.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitorProperties.java index fcc927e9333e9..4b013019c47f2 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitorProperties.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitorProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties specific to the monitor resource. */ @Fluent public final class MonitorProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MonitorProperties.class); - /* * The provisioningState property. */ @@ -27,8 +23,8 @@ public final class MonitorProperties { private MonitoringStatus monitoringStatus; /* - * Flag specifying the Marketplace Subscription Status of the resource. If - * payment is not made in time, the resource will go in Suspended state. + * Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the + * resource will go in Suspended state. */ @JsonProperty(value = "marketplaceSubscriptionStatus", access = JsonProperty.Access.WRITE_ONLY) private MarketplaceSubscriptionStatus marketplaceSubscriptionStatus; diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitorUpdateProperties.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitorUpdateProperties.java index ac871e6031773..cce4e21c50934 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitorUpdateProperties.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitorUpdateProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The set of properties that can be update in a PATCH request to a monitor resource. */ @Fluent public final class MonitorUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MonitorUpdateProperties.class); - /* * Flag specifying if the resource monitoring is enabled or disabled. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoredResourceListResponse.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoredResourceListResponse.java index 83c6ebe791bf2..c8f510dbf3f77 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoredResourceListResponse.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoredResourceListResponse.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datadog.fluent.models.MonitoredResourceInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Response of a list operation. */ @Fluent public final class MonitoredResourceListResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MonitoredResourceListResponse.class); - /* * Results of a list operation. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoringStatus.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoringStatus.java index 01f83050ac414..f0f9d5f6ffd53 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoringStatus.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoringStatus.java @@ -27,7 +27,11 @@ public static MonitoringStatus fromString(String name) { return fromString(name, MonitoringStatus.class); } - /** @return known MonitoringStatus values. */ + /** + * Gets known MonitoringStatus values. + * + * @return known MonitoringStatus values. + */ public static Collection values() { return values(MonitoringStatus.class); } diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoringTagRules.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoringTagRules.java index 2919459cb0ce1..ae719b2fb5dfb 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoringTagRules.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoringTagRules.java @@ -45,6 +45,13 @@ public interface MonitoringTagRules { */ SystemData systemData(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.datadog.fluent.models.MonitoringTagRulesInner object. * diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoringTagRulesListResponse.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoringTagRulesListResponse.java index 3a676963a9ca3..83b4dc3d19aa1 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoringTagRulesListResponse.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/MonitoringTagRulesListResponse.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datadog.fluent.models.MonitoringTagRulesInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Response of a list operation. */ @Fluent public final class MonitoringTagRulesListResponse { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MonitoringTagRulesListResponse.class); - /* * Results of a list operation. */ 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 611338afc3593..7439b8fd607e3 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Definition of the properties for a TagRules resource. */ @Fluent public final class MonitoringTagRulesProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MonitoringTagRulesProperties.class); - /* * The provisioningState property. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/Monitors.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/Monitors.java index a9cad58859483..c98d69ec1676f 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/Monitors.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/Monitors.java @@ -19,7 +19,7 @@ public interface Monitors { * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listApiKeys(String resourceGroupName, String monitorName); @@ -32,7 +32,7 @@ public interface Monitors { * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listApiKeys(String resourceGroupName, String monitorName, Context context); @@ -57,7 +57,7 @@ public interface Monitors { * @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 the default api key. + * @return the default api key along with {@link Response}. */ Response getDefaultKeyWithResponse(String resourceGroupName, String monitorName, Context context); @@ -82,7 +82,7 @@ public interface Monitors { * @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 the response. + * @return the {@link Response}. */ Response setDefaultKeyWithResponse( String resourceGroupName, String monitorName, DatadogApiKeyInner body, Context context); @@ -95,7 +95,7 @@ Response setDefaultKeyWithResponse( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listHosts(String resourceGroupName, String monitorName); @@ -108,7 +108,7 @@ Response setDefaultKeyWithResponse( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listHosts(String resourceGroupName, String monitorName, Context context); @@ -120,7 +120,7 @@ Response setDefaultKeyWithResponse( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listLinkedResources(String resourceGroupName, String monitorName); @@ -133,7 +133,7 @@ Response setDefaultKeyWithResponse( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listLinkedResources(String resourceGroupName, String monitorName, Context context); @@ -145,7 +145,7 @@ Response setDefaultKeyWithResponse( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listMonitoredResources(String resourceGroupName, String monitorName); @@ -158,7 +158,7 @@ Response setDefaultKeyWithResponse( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listMonitoredResources( String resourceGroupName, String monitorName, Context context); @@ -168,7 +168,7 @@ PagedIterable listMonitoredResources( * * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -179,7 +179,7 @@ PagedIterable listMonitoredResources( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -190,7 +190,7 @@ PagedIterable listMonitoredResources( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -202,7 +202,7 @@ PagedIterable listMonitoredResources( * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -227,7 +227,7 @@ PagedIterable listMonitoredResources( * @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 the properties of a specific monitor resource. + * @return the properties of a specific monitor resource along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String monitorName, Context context); @@ -276,7 +276,7 @@ Response getByResourceGroupWithResponse( * @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 the response. + * @return the response body along with {@link Response}. */ Response refreshSetPasswordLinkWithResponse( String resourceGroupName, String monitorName, Context context); @@ -288,7 +288,7 @@ Response refreshSetPasswordLinkWithResponse( * @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 the properties of a specific monitor resource. + * @return the properties of a specific monitor resource along with {@link Response}. */ DatadogMonitorResource getById(String id); @@ -300,7 +300,7 @@ Response refreshSetPasswordLinkWithResponse( * @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 the properties of a specific monitor resource. + * @return the properties of a specific monitor resource along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/OperationDisplay.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/OperationDisplay.java index 6f0941189c5e7..ddd26a6311524 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/OperationDisplay.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/OperationDisplay.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The object that represents the operation. */ @Fluent public final class OperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - /* * Service provider, i.e., Microsoft.Datadog. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/OperationListResult.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/OperationListResult.java index 4f7608447f67b..bf3ef20b45bbe 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/OperationListResult.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/OperationListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.datadog.fluent.models.OperationResultInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Result of GET request to list the Microsoft.Datadog operations. */ @Fluent public final class OperationListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResult.class); - /* * List of operations supported by the Microsoft.Datadog provider. */ diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/Operations.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/Operations.java index 1a75068c37164..e69a006013272 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/Operations.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/Operations.java @@ -10,22 +10,24 @@ /** Resource collection API of Operations. */ public interface Operations { /** - * List all operations provided by Microsoft.Datadog for the 2021-03-01 api version. + * List all operations provided by Microsoft.Datadog for the 2022-06-01 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. - * @return result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations as paginated response with {@link + * PagedIterable}. */ PagedIterable list(); /** - * List all operations provided by Microsoft.Datadog for the 2021-03-01 api version. + * List all operations provided by Microsoft.Datadog for the 2022-06-01 api version. * * @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 result of GET request to list the Microsoft. + * @return result of GET request to list the Microsoft.Datadog operations as paginated response with {@link + * PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/ProvisioningState.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/ProvisioningState.java index 08f3d59dcdc8e..26fca1f4b9762 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/ProvisioningState.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/ProvisioningState.java @@ -48,7 +48,11 @@ public static ProvisioningState fromString(String name) { return fromString(name, ProvisioningState.class); } - /** @return known ProvisioningState values. */ + /** + * Gets known ProvisioningState values. + * + * @return known ProvisioningState values. + */ public static Collection values() { return values(ProvisioningState.class); } 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 d5d761a78fb3b..61c263c725fde 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 @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The ResourceSku model. */ @Fluent public final class ResourceSku { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSku.class); - /* * Name of the SKU. */ @@ -47,9 +44,11 @@ public ResourceSku withName(String name) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property name in model ResourceSku")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceSku.class); } diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/SingleSignOnConfigurations.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/SingleSignOnConfigurations.java index bac719a9888fd..3767a8f903288 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/SingleSignOnConfigurations.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/SingleSignOnConfigurations.java @@ -18,7 +18,7 @@ public interface SingleSignOnConfigurations { * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String monitorName); @@ -31,7 +31,7 @@ public interface SingleSignOnConfigurations { * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String monitorName, Context context); @@ -58,7 +58,7 @@ public interface SingleSignOnConfigurations { * @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 the datadog single sign-on resource for the given Monitor. + * @return the datadog single sign-on resource for the given Monitor along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String monitorName, String configurationName, Context context); @@ -70,7 +70,7 @@ Response getWithResponse( * @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 the datadog single sign-on resource for the given Monitor. + * @return the datadog single sign-on resource for the given Monitor along with {@link Response}. */ DatadogSingleSignOnResource getById(String id); @@ -82,7 +82,7 @@ Response getWithResponse( * @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 the datadog single sign-on resource for the given Monitor. + * @return the datadog single sign-on resource for the given Monitor along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/SingleSignOnStates.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/SingleSignOnStates.java index b51493fdb0b26..e17be447c8155 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/SingleSignOnStates.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/SingleSignOnStates.java @@ -33,7 +33,11 @@ public static SingleSignOnStates fromString(String name) { return fromString(name, SingleSignOnStates.class); } - /** @return known SingleSignOnStates values. */ + /** + * Gets known SingleSignOnStates values. + * + * @return known SingleSignOnStates values. + */ public static Collection values() { return values(SingleSignOnStates.class); } diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/TagAction.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/TagAction.java index fda11239edb3d..b178c9faa853a 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/TagAction.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/TagAction.java @@ -27,7 +27,11 @@ public static TagAction fromString(String name) { return fromString(name, TagAction.class); } - /** @return known TagAction values. */ + /** + * Gets known TagAction values. + * + * @return known TagAction values. + */ public static Collection values() { return values(TagAction.class); } diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/TagRules.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/TagRules.java index 72157a2c9f160..8213868e4adb6 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/TagRules.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/TagRules.java @@ -18,7 +18,7 @@ public interface TagRules { * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String monitorName); @@ -31,7 +31,7 @@ public interface TagRules { * @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 response of a list operation. + * @return response of a list operation as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String monitorName, Context context); @@ -58,7 +58,7 @@ public interface TagRules { * @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 a tag rule set for a given monitor resource. + * @return a tag rule set for a given monitor resource along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String monitorName, String ruleSetName, Context context); @@ -70,7 +70,7 @@ Response getWithResponse( * @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 a tag rule set for a given monitor resource. + * @return a tag rule set for a given monitor resource along with {@link Response}. */ MonitoringTagRules getById(String id); @@ -82,7 +82,7 @@ Response getWithResponse( * @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 a tag rule set for a given monitor resource. + * @return a tag rule set for a given monitor resource along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/UserInfo.java b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/UserInfo.java index 5a70beffb3c45..337ebd88d6ae2 100644 --- a/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/UserInfo.java +++ b/sdk/datadog/azure-resourcemanager-datadog/src/main/java/com/azure/resourcemanager/datadog/models/UserInfo.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.datadog.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** User info. */ @Fluent public final class UserInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserInfo.class); - /* * Name of the user */ 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 new file mode 100644 index 0000000000000..fd24dba8a94fb --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsCreateOrUpdateSamples.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; + +import com.azure.core.util.Context; + +/** Samples for MarketplaceAgreements CreateOrUpdate. */ +public final class MarketplaceAgreementsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/MarketplaceAgreements_Create.json + */ + /** + * Sample code: MarketplaceAgreements_CreateOrUpdate. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void marketplaceAgreementsCreateOrUpdate( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.marketplaceAgreements().createOrUpdateWithResponse(null, Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..bfb916f0f515e --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MarketplaceAgreementsListSamples.java @@ -0,0 +1,22 @@ +// 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.Context; + +/** Samples for MarketplaceAgreements List. */ +public final class MarketplaceAgreementsListSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/MarketplaceAgreements_List.json + */ + /** + * Sample code: MarketplaceAgreements_List. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void marketplaceAgreementsList(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.marketplaceAgreements().list(Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..435fe9ea631cb --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsCreateSamples.java @@ -0,0 +1,25 @@ +// 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 Monitors Create. */ +public final class MonitorsCreateSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/Monitors_Create.json + */ + /** + * Sample code: Monitors_Create. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsCreate(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager + .monitors() + .define("myMonitor") + .withRegion((String) null) + .withExistingResourceGroup("myResourceGroup") + .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 new file mode 100644 index 0000000000000..d09412340d826 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsDeleteSamples.java @@ -0,0 +1,22 @@ +// 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.Context; + +/** Samples for Monitors Delete. */ +public final class MonitorsDeleteSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/Monitors_Delete.json + */ + /** + * Sample code: Monitors_Delete. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsDelete(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().delete("myResourceGroup", "myMonitor", Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..2d400bb9a84af --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsGetByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// 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.Context; + +/** Samples for Monitors GetByResourceGroup. */ +public final class MonitorsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/Monitors_Get.json + */ + /** + * Sample code: Monitors_Get. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsGet(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().getByResourceGroupWithResponse("myResourceGroup", "myMonitor", Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..bae9e2110937e --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsGetDefaultKeySamples.java @@ -0,0 +1,22 @@ +// 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.Context; + +/** Samples for Monitors GetDefaultKey. */ +public final class MonitorsGetDefaultKeySamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/ApiKeys_GetDefaultKey.json + */ + /** + * Sample code: Monitors_GetDefaultKey. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsGetDefaultKey(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().getDefaultKeyWithResponse("myResourceGroup", "myMonitor", Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..24f7c4d55d99f --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListApiKeysSamples.java @@ -0,0 +1,22 @@ +// 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.Context; + +/** Samples for Monitors ListApiKeys. */ +public final class MonitorsListApiKeysSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/ApiKeys_List.json + */ + /** + * Sample code: Monitors_ListApiKeys. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsListApiKeys(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().listApiKeys("myResourceGroup", "myMonitor", Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..adf90213d5e7b --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListByResourceGroupSamples.java @@ -0,0 +1,22 @@ +// 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.Context; + +/** Samples for Monitors ListByResourceGroup. */ +public final class MonitorsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/Monitors_ListByResourceGroup.json + */ + /** + * Sample code: Monitors_ListByResourceGroup. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsListByResourceGroup(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().listByResourceGroup("myResourceGroup", Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..a6bb67c283f47 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListHostsSamples.java @@ -0,0 +1,22 @@ +// 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.Context; + +/** Samples for Monitors ListHosts. */ +public final class MonitorsListHostsSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/Hosts_List.json + */ + /** + * Sample code: Monitors_ListHosts. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsListHosts(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().listHosts("myResourceGroup", "myMonitor", Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..382079068d0d3 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListLinkedResourcesSamples.java @@ -0,0 +1,22 @@ +// 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.Context; + +/** Samples for Monitors ListLinkedResources. */ +public final class MonitorsListLinkedResourcesSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/LinkedResources_List.json + */ + /** + * Sample code: Monitors_ListLinkedResources. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsListLinkedResources(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().listLinkedResources("myResourceGroup", "myMonitor", Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..8aea0fb3a929e --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListMonitoredResourcesSamples.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; + +import com.azure.core.util.Context; + +/** Samples for Monitors ListMonitoredResources. */ +public final class MonitorsListMonitoredResourcesSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/MonitoredResources_List.json + */ + /** + * Sample code: Monitors_ListMonitoredResources. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsListMonitoredResources( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().listMonitoredResources("myResourceGroup", "myMonitor", Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..3c7051609c8ca --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsListSamples.java @@ -0,0 +1,22 @@ +// 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.Context; + +/** Samples for Monitors List. */ +public final class MonitorsListSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/Monitors_List.json + */ + /** + * Sample code: Monitors_List. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsList(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().list(Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..f1ecc4aa20697 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsRefreshSetPasswordLinkSamples.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; + +import com.azure.core.util.Context; + +/** Samples for Monitors RefreshSetPasswordLink. */ +public final class MonitorsRefreshSetPasswordLinkSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/RefreshSetPassword_Get.json + */ + /** + * Sample code: Monitors_RefreshSetPasswordLink. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsRefreshSetPasswordLink( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().refreshSetPasswordLinkWithResponse("myResourceGroup", "myMonitor", Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..6ec8bddd0992f --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsSetDefaultKeySamples.java @@ -0,0 +1,22 @@ +// 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.Context; + +/** Samples for Monitors SetDefaultKey. */ +public final class MonitorsSetDefaultKeySamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/ApiKeys_SetDefaultKey.json + */ + /** + * Sample code: Monitors_SetDefaultKey. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsSetDefaultKey(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.monitors().setDefaultKeyWithResponse("myResourceGroup", "myMonitor", null, Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..8f8f2475c6b4c --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/MonitorsUpdateSamples.java @@ -0,0 +1,25 @@ +// 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.Context; +import com.azure.resourcemanager.datadog.models.DatadogMonitorResource; + +/** Samples for Monitors Update. */ +public final class MonitorsUpdateSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/Monitors_Update.json + */ + /** + * Sample code: Monitors_Update. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void monitorsUpdate(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + DatadogMonitorResource resource = + manager.monitors().getByResourceGroupWithResponse("myResourceGroup", "myMonitor", Context.NONE).getValue(); + resource.update().apply(); + } +} 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 new file mode 100644 index 0000000000000..f976f6bbb63ca --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/OperationsListSamples.java @@ -0,0 +1,22 @@ +// 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.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/Operations_List.json + */ + /** + * Sample code: Operations_List. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void operationsList(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.operations().list(Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..eed619e272b4b --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsCreateOrUpdateSamples.java @@ -0,0 +1,25 @@ +// 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 SingleSignOnConfigurations CreateOrUpdate. */ +public final class SingleSignOnConfigurationsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/SingleSignOnConfigurations_CreateOrUpdate.json + */ + /** + * Sample code: SingleSignOnConfigurations_CreateOrUpdate. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void singleSignOnConfigurationsCreateOrUpdate( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager + .singleSignOnConfigurations() + .define("default") + .withExistingMonitor("myResourceGroup", "myMonitor") + .create(); + } +} 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 new file mode 100644 index 0000000000000..2239612132780 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsGetSamples.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; + +import com.azure.core.util.Context; + +/** Samples for SingleSignOnConfigurations Get. */ +public final class SingleSignOnConfigurationsGetSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/SingleSignOnConfigurations_Get.json + */ + /** + * Sample code: SingleSignOnConfigurations_Get. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void singleSignOnConfigurationsGet( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.singleSignOnConfigurations().getWithResponse("myResourceGroup", "myMonitor", "default", Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..99fdd351bc217 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/SingleSignOnConfigurationsListSamples.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; + +import com.azure.core.util.Context; + +/** Samples for SingleSignOnConfigurations List. */ +public final class SingleSignOnConfigurationsListSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/SingleSignOnConfigurations_List.json + */ + /** + * Sample code: SingleSignOnConfigurations_List. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void singleSignOnConfigurationsList( + com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.singleSignOnConfigurations().list("myResourceGroup", "myMonitor", Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..19504a2594a12 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesCreateOrUpdateSamples.java @@ -0,0 +1,20 @@ +// 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 TagRules CreateOrUpdate. */ +public final class TagRulesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/TagRules_CreateOrUpdate.json + */ + /** + * Sample code: TagRules_CreateOrUpdate. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void tagRulesCreateOrUpdate(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.tagRules().define("default").withExistingMonitor("myResourceGroup", "myMonitor").create(); + } +} 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 new file mode 100644 index 0000000000000..51df0e22076f5 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesGetSamples.java @@ -0,0 +1,22 @@ +// 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.Context; + +/** Samples for TagRules Get. */ +public final class TagRulesGetSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/TagRules_Get.json + */ + /** + * Sample code: TagRules_Get. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void tagRulesGet(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.tagRules().getWithResponse("myResourceGroup", "myMonitor", "default", Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..b9c844de9fad0 --- /dev/null +++ b/sdk/datadog/azure-resourcemanager-datadog/src/samples/java/com/azure/resourcemanager/datadog/generated/TagRulesListSamples.java @@ -0,0 +1,22 @@ +// 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.Context; + +/** Samples for TagRules List. */ +public final class TagRulesListSamples { + /* + * x-ms-original-file: specification/datadog/resource-manager/Microsoft.Datadog/stable/2022-06-01/examples/TagRules_List.json + */ + /** + * Sample code: TagRules_List. + * + * @param manager Entry point to MicrosoftDatadogManager. + */ + public static void tagRulesList(com.azure.resourcemanager.datadog.MicrosoftDatadogManager manager) { + manager.tagRules().list("myResourceGroup", "myMonitor", Context.NONE); + } +}