From 41bbfada0469d782bcb4ee464bbcca2763418f67 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 31 Oct 2024 05:14:28 -0700 Subject: [PATCH] [Automation] Generate Fluent Lite from Swagger dynatrace#package-2023-04-27 (#42727) --- .../CHANGELOG.md | 119 +++- .../azure-resourcemanager-dynatrace/README.md | 15 +- .../azure-resourcemanager-dynatrace/SAMPLE.md | 562 +++++++++--------- .../azure-resourcemanager-dynatrace/pom.xml | 3 +- .../dynatrace/DynatraceManager.java | 30 +- .../fluent/DynatraceObservability.java | 22 +- .../dynatrace/fluent/MonitorsClient.java | 100 ++-- .../dynatrace/fluent/OperationsClient.java | 16 +- .../dynatrace/fluent/SingleSignOnsClient.java | 28 +- .../dynatrace/fluent/TagRulesClient.java | 28 +- .../fluent/models/AppServiceInfoInner.java | 128 +++- .../DynatraceSingleSignOnProperties.java | 93 ++- .../DynatraceSingleSignOnResourceInner.java | 136 ++++- .../LinkableEnvironmentResponseInner.java | 76 ++- ...placeSaaSResourceDetailsResponseInner.java | 80 ++- .../models/MetricsStatusResponseInner.java | 61 +- .../fluent/models/MonitorProperties.java | 111 +++- .../fluent/models/MonitorResourceInner.java | 165 ++++- .../fluent/models/MonitoredResourceInner.java | 93 ++- .../models/MonitoringTagRulesProperties.java | 73 ++- .../fluent/models/OperationInner.java | 79 ++- .../models/SsoDetailsResponseInner.java | 93 ++- .../dynatrace/fluent/models/TagRuleInner.java | 125 +++- .../models/VMExtensionPayloadInner.java | 67 ++- .../dynatrace/fluent/models/VMInfoInner.java | 126 +++- .../dynatrace/fluent/models/package-info.java | 5 +- .../dynatrace/fluent/package-info.java | 5 +- .../DynatraceObservabilityBuilder.java | 18 +- .../DynatraceObservabilityImpl.java | 77 ++- .../DynatraceSingleSignOnResourceImpl.java | 7 +- .../implementation/MonitorResourceImpl.java | 4 +- .../implementation/MonitorsClientImpl.java | 356 ++++++----- .../implementation/MonitorsImpl.java | 42 +- .../implementation/OperationsClientImpl.java | 60 +- .../implementation/OperationsImpl.java | 4 +- .../{Utils.java => ResourceManagerUtils.java} | 24 +- .../SingleSignOnsClientImpl.java | 94 +-- .../implementation/SingleSignOnsImpl.java | 18 +- .../dynatrace/implementation/TagRuleImpl.java | 6 +- .../implementation/TagRulesClientImpl.java | 94 +-- .../implementation/TagRulesImpl.java | 28 +- .../implementation/package-info.java | 5 +- .../dynatrace/models/AccountInfo.java | 67 ++- .../dynatrace/models/ActionType.java | 16 +- .../dynatrace/models/AppServiceInfo.java | 24 +- .../models/AppServiceListResponse.java | 69 ++- .../dynatrace/models/AutoUpdateSetting.java | 20 +- .../dynatrace/models/AvailabilityState.java | 44 +- .../DynatraceEnvironmentProperties.java | 85 ++- .../models/DynatraceSingleSignOnResource.java | 114 ++-- ...natraceSingleSignOnResourceListResult.java | 77 ++- .../dynatrace/models/EnvironmentInfo.java | 85 ++- .../dynatrace/models/FilteringTag.java | 71 ++- .../dynatrace/models/IdentityProperties.java | 87 ++- .../models/LiftrResourceCategories.java | 20 +- .../LinkableEnvironmentListResponse.java | 70 ++- .../models/LinkableEnvironmentRequest.java | 91 ++- .../models/LinkableEnvironmentResponse.java | 12 +- .../dynatrace/models/LogModule.java | 20 +- .../dynatrace/models/LogRules.java | 103 +++- .../dynatrace/models/ManagedIdentityType.java | 24 +- ...MarketplaceSaaSResourceDetailsRequest.java | 67 ++- ...arketplaceSaaSResourceDetailsResponse.java | 12 +- .../models/MarketplaceSubscriptionStatus.java | 16 +- .../dynatrace/models/MetricRules.java | 69 ++- .../models/MetricsStatusResponse.java | 8 +- .../dynatrace/models/MonitorResource.java | 194 +++--- .../models/MonitorResourceListResult.java | 75 ++- .../models/MonitorResourceUpdate.java | 62 +- .../dynatrace/models/MonitoredResource.java | 16 +- .../models/MonitoredResourceListResponse.java | 70 ++- .../dynatrace/models/MonitoringStatus.java | 20 +- .../dynatrace/models/MonitoringType.java | 20 +- .../dynatrace/models/Monitors.java | 94 +-- .../dynatrace/models/Operation.java | 16 +- .../dynatrace/models/OperationDisplay.java | 83 ++- .../dynatrace/models/OperationListResult.java | 58 +- .../dynatrace/models/Operations.java | 16 +- .../dynatrace/models/Origin.java | 20 +- .../dynatrace/models/PlanData.java | 87 ++- .../dynatrace/models/ProvisioningState.java | 48 +- .../dynatrace/models/SendAadLogsStatus.java | 20 +- .../models/SendActivityLogsStatus.java | 20 +- .../models/SendSubscriptionLogsStatus.java | 20 +- .../dynatrace/models/SendingLogsStatus.java | 20 +- .../models/SendingMetricsStatus.java | 20 +- .../dynatrace/models/SingleSignOnStates.java | 28 +- .../dynatrace/models/SingleSignOns.java | 26 +- .../dynatrace/models/SsoDetailsRequest.java | 65 +- .../dynatrace/models/SsoDetailsResponse.java | 16 +- .../dynatrace/models/SsoStatus.java | 20 +- .../dynatrace/models/TagAction.java | 20 +- .../dynatrace/models/TagRule.java | 86 ++- .../dynatrace/models/TagRuleListResult.java | 73 ++- .../dynatrace/models/TagRules.java | 26 +- .../dynatrace/models/UpdateStatus.java | 48 +- .../models/UserAssignedIdentity.java | 77 ++- .../dynatrace/models/UserInfo.java | 93 ++- .../dynatrace/models/VMExtensionPayload.java | 10 +- .../dynatrace/models/VMHostsListResponse.java | 68 ++- .../dynatrace/models/VMInfo.java | 24 +- .../dynatrace/models/package-info.java | 5 +- .../dynatrace/package-info.java | 5 +- .../src/main/java/module-info.java | 4 +- .../proxy-config.json | 1 + .../reflect-config.json | 1 + .../MonitorsCreateOrUpdateSamples.java | 58 +- .../generated/MonitorsDeleteSamples.java | 14 +- .../MonitorsGetByResourceGroupSamples.java | 20 +- ...MarketplaceSaaSResourceDetailsSamples.java | 20 +- .../MonitorsGetMetricStatusSamples.java | 28 +- .../MonitorsGetSsoDetailsSamples.java | 42 +- .../MonitorsGetVMHostPayloadSamples.java | 28 +- .../MonitorsListAppServicesSamples.java | 22 +- .../MonitorsListByResourceGroupSamples.java | 22 +- .../generated/MonitorsListHostsSamples.java | 14 +- ...nitorsListLinkableEnvironmentsSamples.java | 42 +- ...MonitorsListMonitoredResourcesSamples.java | 22 +- .../generated/MonitorsListSamples.java | 22 +- .../generated/MonitorsUpdateSamples.java | 30 +- .../generated/OperationsListSamples.java | 14 +- .../SingleSignOnCreateOrUpdateSamples.java | 28 +- .../generated/SingleSignOnGetSamples.java | 20 +- .../generated/SingleSignOnListSamples.java | 14 +- .../TagRulesCreateOrUpdateSamples.java | 60 +- .../generated/TagRulesDeleteSamples.java | 14 +- .../generated/TagRulesGetSamples.java | 14 +- .../generated/TagRulesListSamples.java | 14 +- .../generated/MonitorsDeleteMockTests.java | 26 +- ...SResourceDetailsWithResponseMockTests.java | 25 +- ...sGetMetricStatusWithResponseMockTests.java | 25 +- ...orsGetSsoDetailsWithResponseMockTests.java | 25 +- .../MonitorsListAppServicesMockTests.java | 25 +- .../generated/MonitorsListHostsMockTests.java | 25 +- ...torsListLinkableEnvironmentsMockTests.java | 25 +- ...nitorsListMonitoredResourcesMockTests.java | 25 +- .../generated/OperationsListMockTests.java | 26 +- .../SingleSignOnsCreateOrUpdateMockTests.java | 25 +- ...SingleSignOnsGetWithResponseMockTests.java | 25 +- .../generated/SingleSignOnsListMockTests.java | 25 +- .../TagRulesCreateOrUpdateMockTests.java | 25 +- .../generated/TagRulesDeleteMockTests.java | 26 +- .../TagRulesGetWithResponseMockTests.java | 25 +- .../generated/TagRulesListMockTests.java | 25 +- 144 files changed, 4690 insertions(+), 2497 deletions(-) rename sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/{Utils.java => ResourceManagerUtils.java} (88%) create mode 100644 sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-dynatrace/proxy-config.json create mode 100644 sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-dynatrace/reflect-config.json diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/CHANGELOG.md b/sdk/dynatrace/azure-resourcemanager-dynatrace/CHANGELOG.md index d1e9b5a279b9c..158d8785def00 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/CHANGELOG.md +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/CHANGELOG.md @@ -1,14 +1,125 @@ # Release History -## 1.0.0-beta.4 (Unreleased) +## 1.0.0-beta.4 (2024-10-31) + +- Azure Resource Manager Dynatrace client library for Java. This package contains Microsoft Azure SDK for Dynatrace Management SDK. Package tag package-2023-04-27. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added -### Breaking Changes +#### `models.UserAssignedIdentity` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.LinkableEnvironmentListResponse` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.AppServiceListResponse` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.FilteringTag` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.UserInfo` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.DynatraceEnvironmentProperties` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.OperationDisplay` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.TagRuleListResult` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.SsoDetailsRequest` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.LogRules` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.MonitorResourceListResult` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added -### Bugs Fixed +#### `models.LinkableEnvironmentRequest` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.EnvironmentInfo` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.IdentityProperties` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.VMHostsListResponse` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.MonitorResourceUpdate` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.AccountInfo` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.PlanData` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.MarketplaceSaaSResourceDetailsRequest` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.OperationListResult` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.DynatraceSingleSignOnResourceListResult` was modified + +* `toJson(com.azure.json.JsonWriter)` was added +* `fromJson(com.azure.json.JsonReader)` was added + +#### `models.MonitoredResourceListResponse` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.MetricRules` was modified -### Other Changes +* `fromJson(com.azure.json.JsonReader)` was added +* `toJson(com.azure.json.JsonWriter)` was added ## 1.0.0-beta.3 (2023-08-22) diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/README.md b/sdk/dynatrace/azure-resourcemanager-dynatrace/README.md index ac2496040649a..622e4aa5ca0b2 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/README.md +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-dynatrace - 1.0.0-beta.3 + 1.0.0-beta.4 ``` [//]: # ({x-version-update-end}) @@ -45,15 +45,11 @@ Azure Management Libraries require a `TokenCredential` implementation for authen ### Authentication -By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. +Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package. -- `AZURE_CLIENT_ID` for Azure client ID. -- `AZURE_TENANT_ID` for Azure tenant ID. -- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. +Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. -In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. - -With above configuration, `azure` client can be authenticated using the following code: +Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); @@ -94,9 +90,10 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS [docs]: https://azure.github.io/azure-sdk-for-java/ -[jdk]: https://docs.microsoft.com/java/azure/jdk/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ [azure_subscription]: https://azure.microsoft.com/free/ [azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity +[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty [authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md [design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/SAMPLE.md b/sdk/dynatrace/azure-resourcemanager-dynatrace/SAMPLE.md index 74992734c3766..d27192d5bd6e2 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/SAMPLE.md +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/SAMPLE.md @@ -51,20 +51,22 @@ import java.time.OffsetDateTime; import java.util.HashMap; import java.util.Map; -/** Samples for Monitors CreateOrUpdate. */ +/** + * Samples for Monitors CreateOrUpdate. + */ public final class MonitorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: Monitors_CreateOrUpdate_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsCreateOrUpdateMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() + public static void + monitorsCreateOrUpdateMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.monitors() .define("myMonitor") .withRegion("West US 2") .withExistingResourceGroup("myResourceGroup") @@ -72,39 +74,33 @@ public final class MonitorsCreateOrUpdateSamples { .withIdentity(new IdentityProperties().withType(ManagedIdentityType.SYSTEM_ASSIGNED)) .withMonitoringStatus(MonitoringStatus.ENABLED) .withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus.ACTIVE) - .withDynatraceEnvironmentProperties( - new DynatraceEnvironmentProperties() - .withAccountInfo(new AccountInfo()) - .withEnvironmentInfo(new EnvironmentInfo()) - .withSingleSignOnProperties(new DynatraceSingleSignOnProperties())) - .withUserInfo( - new UserInfo() - .withFirstName("Alice") - .withLastName("Bobab") - .withEmailAddress("alice@microsoft.com") - .withPhoneNumber("123456") - .withCountry("westus2")) - .withPlanData( - new PlanData() - .withUsageType("Committed") - .withBillingCycle("Monthly") - .withPlanDetails("dynatraceapitestplan") - .withEffectiveDate(OffsetDateTime.parse("2019-08-30T15:14:33+02:00"))) + .withDynatraceEnvironmentProperties(new DynatraceEnvironmentProperties().withAccountInfo(new AccountInfo()) + .withEnvironmentInfo(new EnvironmentInfo()) + .withSingleSignOnProperties(new DynatraceSingleSignOnProperties())) + .withUserInfo(new UserInfo().withFirstName("Alice") + .withLastName("Bobab") + .withEmailAddress("alice@microsoft.com") + .withPhoneNumber("123456") + .withCountry("westus2")) + .withPlanData(new PlanData().withUsageType("Committed") + .withBillingCycle("Monthly") + .withPlanDetails("dynatraceapitestplan") + .withEffectiveDate(OffsetDateTime.parse("2019-08-30T15:14:33+02:00"))) .create(); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_CreateOrUpdate_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_CreateOrUpdate_MinimumSet_Gen.json */ /** * Sample code: Monitors_CreateOrUpdate_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsCreateOrUpdateMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() + public static void + monitorsCreateOrUpdateMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.monitors() .define("myMonitor") .withRegion("West US 2") .withExistingResourceGroup("myResourceGroup") @@ -128,14 +124,17 @@ public final class MonitorsCreateOrUpdateSamples { ### Monitors_Delete ```java -/** Samples for Monitors Delete. */ +/** + * Samples for Monitors Delete. + */ public final class MonitorsDeleteSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Delete_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_Delete_MinimumSet_Gen.json */ /** * Sample code: Monitors_Delete_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void monitorsDeleteMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { @@ -143,11 +142,12 @@ public final class MonitorsDeleteSamples { } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_Delete_MaximumSet_Gen.json */ /** * Sample code: Monitors_Delete_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void monitorsDeleteMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { @@ -159,33 +159,35 @@ public final class MonitorsDeleteSamples { ### Monitors_GetByResourceGroup ```java -/** Samples for Monitors GetByResourceGroup. */ +/** + * Samples for Monitors GetByResourceGroup. + */ public final class MonitorsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_Get_MinimumSet_Gen.json */ /** * Sample code: Monitors_Get_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void monitorsGetMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() + manager.monitors() .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_Get_MaximumSet_Gen.json */ /** * Sample code: Monitors_Get_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void monitorsGetMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() + manager.monitors() .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } @@ -196,37 +198,39 @@ public final class MonitorsGetByResourceGroupSamples { ```java import com.azure.resourcemanager.dynatrace.models.MarketplaceSaaSResourceDetailsRequest; -/** Samples for Monitors GetMarketplaceSaaSResourceDetails. */ +/** + * Samples for Monitors GetMarketplaceSaaSResourceDetails. + */ public final class MonitorsGetMarketplaceSaaSResourceDetailsSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetMarketplaceSaaSResourceDetails_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_GetMarketplaceSaaSResourceDetails_MinimumSet_Gen.json */ /** * Sample code: Monitors_GetMarketplaceSaaSResourceDetails_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void monitorsGetMarketplaceSaaSResourceDetailsMinimumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() + manager.monitors() .getMarketplaceSaaSResourceDetailsWithResponse( new MarketplaceSaaSResourceDetailsRequest().withTenantId("urnmattojzhktcfw"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetMarketplaceSaaSResourceDetails_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_GetMarketplaceSaaSResourceDetails_MaximumSet_Gen.json */ /** * Sample code: Monitors_GetMarketplaceSaaSResourceDetails_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void monitorsGetMarketplaceSaaSResourceDetailsMaximumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() + manager.monitors() .getMarketplaceSaaSResourceDetailsWithResponse( new MarketplaceSaaSResourceDetailsRequest().withTenantId("urnmattojzhktcfw"), com.azure.core.util.Context.NONE); @@ -237,35 +241,37 @@ public final class MonitorsGetMarketplaceSaaSResourceDetailsSamples { ### Monitors_GetMetricStatus ```java -/** Samples for Monitors GetMetricStatus. */ +/** + * Samples for Monitors GetMetricStatus. + */ public final class MonitorsGetMetricStatusSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetMetricStatus_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_GetMetricStatus_MinimumSet_Gen.json */ /** * Sample code: Monitors_GetMetricStatus_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsGetMetricStatusMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() + public static void + monitorsGetMetricStatusMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.monitors() .getMetricStatusWithResponse("rgDynatrace", "fhcjxnxumkdlgpwanewtkdnyuz", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetMetricStatus_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_GetMetricStatus_MaximumSet_Gen.json */ /** * Sample code: Monitors_GetMetricStatus_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsGetMetricStatusMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() + public static void + monitorsGetMetricStatusMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.monitors() .getMetricStatusWithResponse("rgDynatrace", "fhcjxnxumkdlgpwanewtkdnyuz", com.azure.core.util.Context.NONE); } } @@ -276,44 +282,40 @@ public final class MonitorsGetMetricStatusSamples { ```java import com.azure.resourcemanager.dynatrace.models.SsoDetailsRequest; -/** Samples for Monitors GetSsoDetails. */ +/** + * Samples for Monitors GetSsoDetails. + */ public final class MonitorsGetSsoDetailsSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetSSODetails_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_GetSSODetails_MaximumSet_Gen.json */ /** * Sample code: Monitors_GetSSODetails_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsGetSSODetailsMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() - .getSsoDetailsWithResponse( - "myResourceGroup", - "myMonitor", - new SsoDetailsRequest().withUserPrincipal("alice@microsoft.com"), - com.azure.core.util.Context.NONE); + public static void + monitorsGetSSODetailsMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.monitors() + .getSsoDetailsWithResponse("myResourceGroup", "myMonitor", + new SsoDetailsRequest().withUserPrincipal("alice@microsoft.com"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetSSODetails_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_GetSSODetails_MinimumSet_Gen.json */ /** * Sample code: Monitors_GetSSODetails_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsGetSSODetailsMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() - .getSsoDetailsWithResponse( - "myResourceGroup", - "myMonitor", - new SsoDetailsRequest().withUserPrincipal("alice@microsoft.com"), - com.azure.core.util.Context.NONE); + public static void + monitorsGetSSODetailsMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.monitors() + .getSsoDetailsWithResponse("myResourceGroup", "myMonitor", + new SsoDetailsRequest().withUserPrincipal("alice@microsoft.com"), com.azure.core.util.Context.NONE); } } ``` @@ -321,35 +323,37 @@ public final class MonitorsGetSsoDetailsSamples { ### Monitors_GetVMHostPayload ```java -/** Samples for Monitors GetVMHostPayload. */ +/** + * Samples for Monitors GetVMHostPayload. + */ public final class MonitorsGetVMHostPayloadSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetVMHostPayload_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_GetVMHostPayload_MinimumSet_Gen.json */ /** * Sample code: Monitors_GetVMHostPayload_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsGetVMHostPayloadMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() + public static void + monitorsGetVMHostPayloadMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.monitors() .getVMHostPayloadWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetVMHostPayload_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_GetVMHostPayload_MaximumSet_Gen.json */ /** * Sample code: Monitors_GetVMHostPayload_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsGetVMHostPayloadMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() + public static void + monitorsGetVMHostPayloadMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.monitors() .getVMHostPayloadWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } @@ -358,31 +362,35 @@ public final class MonitorsGetVMHostPayloadSamples { ### Monitors_List ```java -/** Samples for Monitors List. */ +/** + * Samples for Monitors List. + */ public final class MonitorsListSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListBySubscriptionId_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListBySubscriptionId_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListBySubscriptionId_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsListBySubscriptionIdMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + public static void + monitorsListBySubscriptionIdMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { manager.monitors().list(com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListBySubscriptionId_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListBySubscriptionId_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListBySubscriptionId_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsListBySubscriptionIdMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + public static void + monitorsListBySubscriptionIdMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { manager.monitors().list(com.azure.core.util.Context.NONE); } } @@ -391,31 +399,35 @@ public final class MonitorsListSamples { ### Monitors_ListAppServices ```java -/** Samples for Monitors ListAppServices. */ +/** + * Samples for Monitors ListAppServices. + */ public final class MonitorsListAppServicesSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListAppServices_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListAppServices_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListAppServices_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsListAppServicesMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + public static void + monitorsListAppServicesMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { manager.monitors().listAppServices("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListAppServices_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListAppServices_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListAppServices_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsListAppServicesMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + public static void + monitorsListAppServicesMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { manager.monitors().listAppServices("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } @@ -424,31 +436,35 @@ public final class MonitorsListAppServicesSamples { ### Monitors_ListByResourceGroup ```java -/** Samples for Monitors ListByResourceGroup. */ +/** + * Samples for Monitors ListByResourceGroup. + */ public final class MonitorsListByResourceGroupSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListByResourceGroup_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListByResourceGroup_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListByResourceGroup_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsListByResourceGroupMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + public static void + monitorsListByResourceGroupMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { manager.monitors().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListByResourceGroup_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + public static void + monitorsListByResourceGroupMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { manager.monitors().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); } } @@ -457,14 +473,17 @@ public final class MonitorsListByResourceGroupSamples { ### Monitors_ListHosts ```java -/** Samples for Monitors ListHosts. */ +/** + * Samples for Monitors ListHosts. + */ public final class MonitorsListHostsSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListHosts_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListHosts_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListHosts_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void monitorsListHostsMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { @@ -472,11 +491,12 @@ public final class MonitorsListHostsSamples { } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListHosts_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListHosts_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListHosts_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void monitorsListHostsMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { @@ -490,47 +510,43 @@ public final class MonitorsListHostsSamples { ```java import com.azure.resourcemanager.dynatrace.models.LinkableEnvironmentRequest; -/** Samples for Monitors ListLinkableEnvironments. */ +/** + * Samples for Monitors ListLinkableEnvironments. + */ public final class MonitorsListLinkableEnvironmentsSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListLinkableEnvironments_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListLinkableEnvironments_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListLinkableEnvironments_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsListLinkableEnvironmentsMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() - .listLinkableEnvironments( - "myResourceGroup", - "myMonitor", - new LinkableEnvironmentRequest() - .withTenantId("00000000-0000-0000-0000-000000000000") + public static void + monitorsListLinkableEnvironmentsMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.monitors() + .listLinkableEnvironments("myResourceGroup", "myMonitor", + new LinkableEnvironmentRequest().withTenantId("00000000-0000-0000-0000-000000000000") .withUserPrincipal("alice@microsoft.com") .withRegion("East US"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListLinkableEnvironments_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListLinkableEnvironments_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListLinkableEnvironments_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsListLinkableEnvironmentsMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() - .listLinkableEnvironments( - "myResourceGroup", - "myMonitor", - new LinkableEnvironmentRequest() - .withTenantId("00000000-0000-0000-0000-000000000000") + public static void + monitorsListLinkableEnvironmentsMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.monitors() + .listLinkableEnvironments("myResourceGroup", "myMonitor", + new LinkableEnvironmentRequest().withTenantId("00000000-0000-0000-0000-000000000000") .withUserPrincipal("alice@microsoft.com") .withRegion("East US"), com.azure.core.util.Context.NONE); @@ -541,31 +557,35 @@ public final class MonitorsListLinkableEnvironmentsSamples { ### Monitors_ListMonitoredResources ```java -/** Samples for Monitors ListMonitoredResources. */ +/** + * Samples for Monitors ListMonitoredResources. + */ public final class MonitorsListMonitoredResourcesSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListMonitoredResources_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListMonitoredResources_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListMonitoredResources_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsListMonitoredResourcesMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + public static void + monitorsListMonitoredResourcesMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { manager.monitors().listMonitoredResources("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListMonitoredResources_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListMonitoredResources_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListMonitoredResources_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsListMonitoredResourcesMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + public static void + monitorsListMonitoredResourcesMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { manager.monitors().listMonitoredResources("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } @@ -578,39 +598,39 @@ import com.azure.resourcemanager.dynatrace.models.MonitorResource; import java.util.HashMap; import java.util.Map; -/** Samples for Monitors Update. */ +/** + * Samples for Monitors Update. + */ public final class MonitorsUpdateSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Update_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_Update_MinimumSet_Gen.json */ /** * Sample code: Monitors_Update_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void monitorsUpdateMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - MonitorResource resource = - manager - .monitors() - .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE) - .getValue(); + MonitorResource resource = manager.monitors() + .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE) + .getValue(); resource.update().apply(); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_Update_MaximumSet_Gen.json */ /** * Sample code: Monitors_Update_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void monitorsUpdateMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - MonitorResource resource = - manager - .monitors() - .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE) - .getValue(); + MonitorResource resource = manager.monitors() + .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("Environment", "Dev")).apply(); } @@ -631,14 +651,17 @@ public final class MonitorsUpdateSamples { ### Operations_List ```java -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Operations_List_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Operations_List_MinimumSet_Gen.json */ /** * Sample code: Operations_List_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void operationsListMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { @@ -646,11 +669,12 @@ public final class OperationsListSamples { } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Operations_List_MaximumSet_Gen.json */ /** * Sample code: Operations_List_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void operationsListMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { @@ -665,20 +689,22 @@ public final class OperationsListSamples { import com.azure.resourcemanager.dynatrace.models.SingleSignOnStates; import java.util.Arrays; -/** Samples for SingleSignOn CreateOrUpdate. */ +/** + * Samples for SingleSignOn CreateOrUpdate. + */ public final class SingleSignOnCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * SingleSignOn_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: SingleSignOn_CreateOrUpdate_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void singleSignOnCreateOrUpdateMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .singleSignOns() + public static void + singleSignOnCreateOrUpdateMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.singleSignOns() .define("default") .withExistingMonitor("myResourceGroup", "myMonitor") .withSingleSignOnState(SingleSignOnStates.ENABLE) @@ -689,17 +715,17 @@ public final class SingleSignOnCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_CreateOrUpdate_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * SingleSignOn_CreateOrUpdate_MinimumSet_Gen.json */ /** * Sample code: SingleSignOn_CreateOrUpdate_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void singleSignOnCreateOrUpdateMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .singleSignOns() + public static void + singleSignOnCreateOrUpdateMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.singleSignOns() .define("default") .withExistingMonitor("myResourceGroup", "myMonitor") .withSingleSignOnUrl("https://www.dynatrace.io") @@ -712,33 +738,35 @@ public final class SingleSignOnCreateOrUpdateSamples { ### SingleSignOn_Get ```java -/** Samples for SingleSignOn Get. */ +/** + * Samples for SingleSignOn Get. + */ public final class SingleSignOnGetSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * SingleSignOn_Get_MinimumSet_Gen.json */ /** * Sample code: SingleSignOn_Get_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void singleSignOnGetMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .singleSignOns() + manager.singleSignOns() .getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * SingleSignOn_Get_MaximumSet_Gen.json */ /** * Sample code: SingleSignOn_Get_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void singleSignOnGetMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .singleSignOns() + manager.singleSignOns() .getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); } } @@ -747,14 +775,17 @@ public final class SingleSignOnGetSamples { ### SingleSignOn_List ```java -/** Samples for SingleSignOn List. */ +/** + * Samples for SingleSignOn List. + */ public final class SingleSignOnListSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_List_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * SingleSignOn_List_MaximumSet_Gen.json */ /** * Sample code: SingleSignOn_List_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void singleSignOnListMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { @@ -762,11 +793,12 @@ public final class SingleSignOnListSamples { } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_List_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * SingleSignOn_List_MinimumSet_Gen.json */ /** * Sample code: SingleSignOn_List_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void singleSignOnListMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { @@ -788,61 +820,47 @@ import com.azure.resourcemanager.dynatrace.models.SendingMetricsStatus; import com.azure.resourcemanager.dynatrace.models.TagAction; import java.util.Arrays; -/** Samples for TagRules CreateOrUpdate. */ +/** + * Samples for TagRules CreateOrUpdate. + */ public final class TagRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * TagRules_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: TagRules_CreateOrUpdate_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void tagRulesCreateOrUpdateMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .tagRules() + public static void + tagRulesCreateOrUpdateMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.tagRules() .define("default") .withExistingMonitor("myResourceGroup", "myMonitor") - .withLogRules( - new LogRules() - .withSendAadLogs(SendAadLogsStatus.ENABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) - .withSendActivityLogs(SendActivityLogsStatus.ENABLED) - .withFilteringTags( - Arrays - .asList( - new FilteringTag() - .withName("Environment") - .withValue("Prod") - .withAction(TagAction.INCLUDE), - new FilteringTag() - .withName("Environment") - .withValue("Dev") - .withAction(TagAction.EXCLUDE)))) - .withMetricRules( - new MetricRules() - .withSendingMetrics(SendingMetricsStatus.ENABLED) - .withFilteringTags( - Arrays - .asList( - new FilteringTag() - .withName("Environment") - .withValue("Prod") - .withAction(TagAction.INCLUDE)))) + .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.ENABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) + .withSendActivityLogs(SendActivityLogsStatus.ENABLED) + .withFilteringTags(Arrays.asList( + new FilteringTag().withName("Environment").withValue("Prod").withAction(TagAction.INCLUDE), + new FilteringTag().withName("Environment").withValue("Dev").withAction(TagAction.EXCLUDE)))) + .withMetricRules(new MetricRules().withSendingMetrics(SendingMetricsStatus.ENABLED) + .withFilteringTags(Arrays.asList( + new FilteringTag().withName("Environment").withValue("Prod").withAction(TagAction.INCLUDE)))) .create(); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_CreateOrUpdate_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * TagRules_CreateOrUpdate_MinimumSet_Gen.json */ /** * Sample code: TagRules_CreateOrUpdate_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void tagRulesCreateOrUpdateMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + public static void + tagRulesCreateOrUpdateMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { manager.tagRules().define("default").withExistingMonitor("myResourceGroup", "myMonitor").create(); } } @@ -851,14 +869,17 @@ public final class TagRulesCreateOrUpdateSamples { ### TagRules_Delete ```java -/** Samples for TagRules Delete. */ +/** + * Samples for TagRules Delete. + */ public final class TagRulesDeleteSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_Delete_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * TagRules_Delete_MinimumSet_Gen.json */ /** * Sample code: TagRules_Delete_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void tagRulesDeleteMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { @@ -866,11 +887,12 @@ public final class TagRulesDeleteSamples { } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * TagRules_Delete_MaximumSet_Gen.json */ /** * Sample code: TagRules_Delete_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void tagRulesDeleteMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { @@ -882,14 +904,17 @@ public final class TagRulesDeleteSamples { ### TagRules_Get ```java -/** Samples for TagRules Get. */ +/** + * Samples for TagRules Get. + */ public final class TagRulesGetSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * TagRules_Get_MinimumSet_Gen.json */ /** * Sample code: TagRules_Get_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void tagRulesGetMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { @@ -897,11 +922,12 @@ public final class TagRulesGetSamples { } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * TagRules_Get_MaximumSet_Gen.json */ /** * Sample code: TagRules_Get_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void tagRulesGetMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { @@ -913,14 +939,17 @@ public final class TagRulesGetSamples { ### TagRules_List ```java -/** Samples for TagRules List. */ +/** + * Samples for TagRules List. + */ public final class TagRulesListSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_List_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * TagRules_List_MaximumSet_Gen.json */ /** * Sample code: TagRules_List_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void tagRulesListMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { @@ -928,11 +957,12 @@ public final class TagRulesListSamples { } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_List_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * TagRules_List_MinimumSet_Gen.json */ /** * Sample code: TagRules_List_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void tagRulesListMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/pom.xml b/sdk/dynatrace/azure-resourcemanager-dynatrace/pom.xml index 60eb5bb1c6b08..00a20bfae1f0e 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/pom.xml +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/pom.xml @@ -46,6 +46,7 @@ 0 0 true + false @@ -76,8 +77,6 @@ 4.11.0 test - - net.bytebuddy byte-buddy diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/DynatraceManager.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/DynatraceManager.java index 471551162285c..cf1c749b5116b 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/DynatraceManager.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/DynatraceManager.java @@ -40,7 +40,9 @@ import java.util.Objects; import java.util.stream.Collectors; -/** Entry point to DynatraceManager. */ +/** + * Entry point to DynatraceManager. + */ public final class DynatraceManager { private Monitors monitors; @@ -64,7 +66,7 @@ private DynatraceManager(HttpPipeline httpPipeline, AzureProfile profile, Durati /** * Creates an instance of Dynatrace service API entry point. - * + * * @param credential the credential to use. * @param profile the Azure profile for client. * @return the Dynatrace service API instance. @@ -77,7 +79,7 @@ public static DynatraceManager authenticate(TokenCredential credential, AzurePro /** * Creates an instance of Dynatrace service API entry point. - * + * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. * @return the Dynatrace service API instance. @@ -90,14 +92,16 @@ public static DynatraceManager authenticate(HttpPipeline httpPipeline, AzureProf /** * Gets a Configurable instance that can be used to create DynatraceManager with optional configuration. - * + * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { return new DynatraceManager.Configurable(); } - /** The Configurable allowing configurations to be set. */ + /** + * The Configurable allowing configurations to be set. + */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); @@ -169,8 +173,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { /** * Sets the retry options for the HTTP pipeline retry policy. - * - *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + *

+ * 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. @@ -212,7 +216,7 @@ public DynatraceManager authenticate(TokenCredential credential, AzureProfile pr .append("-") .append("com.azure.resourcemanager.dynatrace") .append("/") - .append("1.0.0-beta.3"); + .append("1.0.0-beta.4"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -260,7 +264,7 @@ public DynatraceManager authenticate(TokenCredential credential, AzureProfile pr /** * Gets the resource collection API of Monitors. It manages MonitorResource. - * + * * @return Resource collection API of Monitors. */ public Monitors monitors() { @@ -272,7 +276,7 @@ public Monitors monitors() { /** * Gets the resource collection API of Operations. - * + * * @return Resource collection API of Operations. */ public Operations operations() { @@ -284,7 +288,7 @@ public Operations operations() { /** * Gets the resource collection API of TagRules. It manages TagRule. - * + * * @return Resource collection API of TagRules. */ public TagRules tagRules() { @@ -296,7 +300,7 @@ public TagRules tagRules() { /** * Gets the resource collection API of SingleSignOns. It manages DynatraceSingleSignOnResource. - * + * * @return Resource collection API of SingleSignOns. */ public SingleSignOns singleSignOns() { @@ -309,7 +313,7 @@ public SingleSignOns singleSignOns() { /** * Gets wrapped service client DynatraceObservability providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. - * + * * @return Wrapped service client DynatraceObservability. */ public DynatraceObservability serviceClient() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/DynatraceObservability.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/DynatraceObservability.java index 4e03dd3edbd7d..33d2bbea44e78 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/DynatraceObservability.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/DynatraceObservability.java @@ -7,67 +7,69 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for DynatraceObservability class. */ +/** + * The interface for DynatraceObservability class. + */ public interface DynatraceObservability { /** * Gets The ID of the target subscription. - * + * * @return the subscriptionId value. */ String getSubscriptionId(); /** * Gets server parameter. - * + * * @return the endpoint value. */ String getEndpoint(); /** * Gets Api Version. - * + * * @return the apiVersion value. */ String getApiVersion(); /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ HttpPipeline getHttpPipeline(); /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ Duration getDefaultPollInterval(); /** * Gets the MonitorsClient object to access its operations. - * + * * @return the MonitorsClient object. */ MonitorsClient getMonitors(); /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ OperationsClient getOperations(); /** * Gets the TagRulesClient object to access its operations. - * + * * @return the TagRulesClient object. */ TagRulesClient getTagRules(); /** * Gets the SingleSignOnsClient object to access its operations. - * + * * @return the SingleSignOnsClient object. */ SingleSignOnsClient getSingleSignOns(); diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/MonitorsClient.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/MonitorsClient.java index 4d7fb6f2776b0..c60b6d15340f2 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/MonitorsClient.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/MonitorsClient.java @@ -25,33 +25,35 @@ import com.azure.resourcemanager.dynatrace.models.MonitorResourceUpdate; import com.azure.resourcemanager.dynatrace.models.SsoDetailsRequest; -/** An instance of this class provides access to all the operations defined in MonitorsClient. */ +/** + * An instance of this class provides access to all the operations defined in MonitorsClient. + */ public interface MonitorsClient { /** * List the resources currently being monitored by the Dynatrace monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the resources being monitored by Dynatrace monitor resource as paginated response with {@link - * PagedIterable}. + * @return list of all the resources being monitored by Dynatrace monitor resource as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listMonitoredResources(String resourceGroupName, String monitorName); /** * List the resources currently being monitored by the Dynatrace monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the resources being monitored by Dynatrace monitor resource as paginated response with {@link - * PagedIterable}. + * @return list of all the resources being monitored by Dynatrace monitor resource as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, @@ -59,7 +61,7 @@ PagedIterable listMonitoredResources(String resourceGrou /** * Returns the payload that needs to be passed in the request body for installing Dynatrace agent on a VM. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -74,7 +76,7 @@ Response getVMHostPayloadWithResponse(String resourceGr /** * Returns the payload that needs to be passed in the request body for installing Dynatrace agent on a VM. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -87,7 +89,7 @@ Response getVMHostPayloadWithResponse(String resourceGr /** * Get a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -102,7 +104,7 @@ Response getByResourceGroupWithResponse(String resourceGro /** * Get a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -115,7 +117,7 @@ Response getByResourceGroupWithResponse(String resourceGro /** * Create a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource Resource create parameters. @@ -130,7 +132,7 @@ SyncPoller, MonitorResourceInner> beginCreateOr /** * Create a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource Resource create parameters. @@ -146,7 +148,7 @@ SyncPoller, MonitorResourceInner> beginCreateOr /** * Create a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource Resource create parameters. @@ -160,7 +162,7 @@ SyncPoller, MonitorResourceInner> beginCreateOr /** * Create a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource Resource create parameters. @@ -176,7 +178,7 @@ MonitorResourceInner createOrUpdate(String resourceGroupName, String monitorName /** * Update a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource The resource properties to be updated. @@ -192,7 +194,7 @@ Response updateWithResponse(String resourceGroupName, Stri /** * Update a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource The resource properties to be updated. @@ -206,7 +208,7 @@ Response updateWithResponse(String resourceGroupName, Stri /** * Delete a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -219,7 +221,7 @@ Response updateWithResponse(String resourceGroupName, Stri /** * Delete a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -233,7 +235,7 @@ Response updateWithResponse(String resourceGroupName, Stri /** * Delete a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -245,7 +247,7 @@ Response updateWithResponse(String resourceGroupName, Stri /** * Delete a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -258,7 +260,7 @@ Response updateWithResponse(String resourceGroupName, Stri /** * List all MonitorResource by subscriptionId. - * + * * @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 of a MonitorResource list operation as paginated response with {@link PagedIterable}. @@ -268,7 +270,7 @@ Response updateWithResponse(String resourceGroupName, Stri /** * List all MonitorResource by subscriptionId. - * + * * @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. @@ -280,7 +282,7 @@ Response updateWithResponse(String resourceGroupName, Stri /** * List MonitorResource resources by resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -292,7 +294,7 @@ Response updateWithResponse(String resourceGroupName, Stri /** * List MonitorResource resources by resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -305,13 +307,13 @@ Response updateWithResponse(String resourceGroupName, Stri /** * Get Marketplace SaaS resource details of a tenant under a specific subscription. - * + * * @param request Tenant Id. * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return marketplace SaaS resource details of a tenant under a specific subscription along with {@link Response}. */ @@ -321,12 +323,12 @@ Response updateWithResponse(String resourceGroupName, Stri /** * Get Marketplace SaaS resource details of a tenant under a specific subscription. - * + * * @param request Tenant Id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return marketplace SaaS resource details of a tenant under a specific subscription. */ @@ -336,7 +338,7 @@ Response updateWithResponse(String resourceGroupName, Stri /** * List the VM/VMSS resources currently being monitored by the Dynatrace resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -349,7 +351,7 @@ Response updateWithResponse(String resourceGroupName, Stri /** * List the VM/VMSS resources currently being monitored by the Dynatrace resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -363,7 +365,7 @@ Response updateWithResponse(String resourceGroupName, Stri /** * Get metric status. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitor resource. * @param context The context to associate with this operation. @@ -378,7 +380,7 @@ Response getMetricStatusWithResponse(String resource /** * Get metric status. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitor resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -391,36 +393,36 @@ Response getMetricStatusWithResponse(String resource /** * Gets list of App Services with Dynatrace PaaS OneAgent enabled. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of App Services with Dynatrace PaaS OneAgent enabled as paginated response with {@link - * PagedIterable}. + * @return list of App Services with Dynatrace PaaS OneAgent enabled as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listAppServices(String resourceGroupName, String monitorName); /** * Gets list of App Services with Dynatrace PaaS OneAgent enabled. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of App Services with Dynatrace PaaS OneAgent enabled as paginated response with {@link - * PagedIterable}. + * @return list of App Services with Dynatrace PaaS OneAgent enabled as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listAppServices(String resourceGroupName, String monitorName, Context context); /** * Gets the SSO configuration details from the partner. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param request The details of the get sso details request. @@ -428,7 +430,7 @@ Response getMetricStatusWithResponse(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 401. + * status code 401. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the SSO configuration details from the partner along with {@link Response}. */ @@ -438,13 +440,13 @@ Response getSsoDetailsWithResponse(String resourceGroup /** * Gets the SSO configuration details from the partner. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 401. + * status code 401. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the SSO configuration details from the partner. */ @@ -453,15 +455,15 @@ Response getSsoDetailsWithResponse(String resourceGroup /** * Gets all the Dynatrace environments that a user can link a azure resource to. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param request The details of the linkable environment request. * @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 all the Dynatrace environments that a user can link a azure resource to as paginated response with {@link - * PagedIterable}. + * @return all the Dynatrace environments that a user can link a azure resource to as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listLinkableEnvironments(String resourceGroupName, @@ -469,7 +471,7 @@ PagedIterable listLinkableEnvironments(String /** * Gets all the Dynatrace environments that a user can link a azure resource to. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param request The details of the linkable environment request. @@ -477,8 +479,8 @@ PagedIterable listLinkableEnvironments(String * @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 all the Dynatrace environments that a user can link a azure resource to as paginated response with {@link - * PagedIterable}. + * @return all the Dynatrace environments that a user can link a azure resource to as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listLinkableEnvironments(String resourceGroupName, diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/OperationsClient.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/OperationsClient.java index f6fa59626caa2..29d965b006ecb 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/OperationsClient.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/OperationsClient.java @@ -10,28 +10,30 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.dynatrace.fluent.models.OperationInner; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public interface OperationsClient { /** * List the operations for Dynatrace.Observability. - * + * * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** * List the operations for Dynatrace.Observability. - * + * * @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 a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/SingleSignOnsClient.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/SingleSignOnsClient.java index 81038f6a14e74..23cb7af98da7a 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/SingleSignOnsClient.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/SingleSignOnsClient.java @@ -13,11 +13,13 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.dynatrace.fluent.models.DynatraceSingleSignOnResourceInner; -/** An instance of this class provides access to all the operations defined in SingleSignOnsClient. */ +/** + * An instance of this class provides access to all the operations defined in SingleSignOnsClient. + */ public interface SingleSignOnsClient { /** * Create a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -34,7 +36,7 @@ SyncPoller, DynatraceSingleSignOn /** * Create a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -52,7 +54,7 @@ SyncPoller, DynatraceSingleSignOn /** * Create a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -68,7 +70,7 @@ DynatraceSingleSignOnResourceInner createOrUpdate(String resourceGroupName, Stri /** * Create a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -85,7 +87,7 @@ DynatraceSingleSignOnResourceInner createOrUpdate(String resourceGroupName, Stri /** * Get a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -101,7 +103,7 @@ Response getWithResponse(String resourceGrou /** * Get a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -115,29 +117,29 @@ Response getWithResponse(String resourceGrou /** * List all DynatraceSingleSignOnResource by monitorName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DynatraceSingleSignOnResource list operation as paginated response with {@link - * PagedIterable}. + * @return the response of a DynatraceSingleSignOnResource list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String monitorName); /** * List all DynatraceSingleSignOnResource by monitorName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DynatraceSingleSignOnResource list operation as paginated response with {@link - * PagedIterable}. + * @return the response of a DynatraceSingleSignOnResource list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String monitorName, diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/TagRulesClient.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/TagRulesClient.java index dd1b6a8514e28..11048575a0ca3 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/TagRulesClient.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/TagRulesClient.java @@ -13,11 +13,13 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.dynatrace.fluent.models.TagRuleInner; -/** An instance of this class provides access to all the operations defined in TagRulesClient. */ +/** + * An instance of this class provides access to all the operations defined in TagRulesClient. + */ public interface TagRulesClient { /** * Get a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -33,7 +35,7 @@ Response getWithResponse(String resourceGroupName, String monitorN /** * Get a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -47,7 +49,7 @@ Response getWithResponse(String resourceGroupName, String monitorN /** * Create a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -63,7 +65,7 @@ SyncPoller, TagRuleInner> beginCreateOrUpdate(String re /** * Create a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -80,7 +82,7 @@ SyncPoller, TagRuleInner> beginCreateOrUpdate(String re /** * Create a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -96,7 +98,7 @@ TagRuleInner createOrUpdate(String resourceGroupName, String monitorName, String /** * Create a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -113,7 +115,7 @@ TagRuleInner createOrUpdate(String resourceGroupName, String monitorName, String /** * Delete a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -127,7 +129,7 @@ TagRuleInner createOrUpdate(String resourceGroupName, String monitorName, String /** * Delete a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -143,7 +145,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Delete a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -156,7 +158,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Delete a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -170,7 +172,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * List all TagRule by monitorName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -183,7 +185,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * List all TagRule by monitorName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/AppServiceInfoInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/AppServiceInfoInner.java index b98b37db7c1a6..33bf00f291f67 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/AppServiceInfoInner.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/AppServiceInfoInner.java @@ -5,77 +5,76 @@ package com.azure.resourcemanager.dynatrace.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.dynatrace.models.AutoUpdateSetting; import com.azure.resourcemanager.dynatrace.models.AvailabilityState; import com.azure.resourcemanager.dynatrace.models.LogModule; import com.azure.resourcemanager.dynatrace.models.MonitoringType; import com.azure.resourcemanager.dynatrace.models.UpdateStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Details of App Services having Dynatrace OneAgent installed. */ +/** + * Details of App Services having Dynatrace OneAgent installed. + */ @Fluent -public final class AppServiceInfoInner { +public final class AppServiceInfoInner implements JsonSerializable { /* * App service resource ID */ - @JsonProperty(value = "resourceId") private String resourceId; /* * Version of the Dynatrace agent installed on the App Service. */ - @JsonProperty(value = "version") private String version; /* * The monitoring mode of OneAgent */ - @JsonProperty(value = "monitoringType") private MonitoringType monitoringType; /* * Update settings of OneAgent. */ - @JsonProperty(value = "autoUpdateSetting") private AutoUpdateSetting autoUpdateSetting; /* * The current update status of OneAgent. */ - @JsonProperty(value = "updateStatus") private UpdateStatus updateStatus; /* * The availability state of OneAgent. */ - @JsonProperty(value = "availabilityState") private AvailabilityState availabilityState; /* * Tells whether log modules are enabled or not */ - @JsonProperty(value = "logModule") private LogModule logModule; /* * The name of the host group */ - @JsonProperty(value = "hostGroup") private String hostGroup; /* * The name of the host */ - @JsonProperty(value = "hostName") private String hostname; - /** Creates an instance of AppServiceInfoInner class. */ + /** + * Creates an instance of AppServiceInfoInner class. + */ public AppServiceInfoInner() { } /** * Get the resourceId property: App service resource ID. - * + * * @return the resourceId value. */ public String resourceId() { @@ -84,7 +83,7 @@ public String resourceId() { /** * Set the resourceId property: App service resource ID. - * + * * @param resourceId the resourceId value to set. * @return the AppServiceInfoInner object itself. */ @@ -95,7 +94,7 @@ public AppServiceInfoInner withResourceId(String resourceId) { /** * Get the version property: Version of the Dynatrace agent installed on the App Service. - * + * * @return the version value. */ public String version() { @@ -104,7 +103,7 @@ public String version() { /** * Set the version property: Version of the Dynatrace agent installed on the App Service. - * + * * @param version the version value to set. * @return the AppServiceInfoInner object itself. */ @@ -115,7 +114,7 @@ public AppServiceInfoInner withVersion(String version) { /** * Get the monitoringType property: The monitoring mode of OneAgent. - * + * * @return the monitoringType value. */ public MonitoringType monitoringType() { @@ -124,7 +123,7 @@ public MonitoringType monitoringType() { /** * Set the monitoringType property: The monitoring mode of OneAgent. - * + * * @param monitoringType the monitoringType value to set. * @return the AppServiceInfoInner object itself. */ @@ -135,7 +134,7 @@ public AppServiceInfoInner withMonitoringType(MonitoringType monitoringType) { /** * Get the autoUpdateSetting property: Update settings of OneAgent. - * + * * @return the autoUpdateSetting value. */ public AutoUpdateSetting autoUpdateSetting() { @@ -144,7 +143,7 @@ public AutoUpdateSetting autoUpdateSetting() { /** * Set the autoUpdateSetting property: Update settings of OneAgent. - * + * * @param autoUpdateSetting the autoUpdateSetting value to set. * @return the AppServiceInfoInner object itself. */ @@ -155,7 +154,7 @@ public AppServiceInfoInner withAutoUpdateSetting(AutoUpdateSetting autoUpdateSet /** * Get the updateStatus property: The current update status of OneAgent. - * + * * @return the updateStatus value. */ public UpdateStatus updateStatus() { @@ -164,7 +163,7 @@ public UpdateStatus updateStatus() { /** * Set the updateStatus property: The current update status of OneAgent. - * + * * @param updateStatus the updateStatus value to set. * @return the AppServiceInfoInner object itself. */ @@ -175,7 +174,7 @@ public AppServiceInfoInner withUpdateStatus(UpdateStatus updateStatus) { /** * Get the availabilityState property: The availability state of OneAgent. - * + * * @return the availabilityState value. */ public AvailabilityState availabilityState() { @@ -184,7 +183,7 @@ public AvailabilityState availabilityState() { /** * Set the availabilityState property: The availability state of OneAgent. - * + * * @param availabilityState the availabilityState value to set. * @return the AppServiceInfoInner object itself. */ @@ -195,7 +194,7 @@ public AppServiceInfoInner withAvailabilityState(AvailabilityState availabilityS /** * Get the logModule property: Tells whether log modules are enabled or not. - * + * * @return the logModule value. */ public LogModule logModule() { @@ -204,7 +203,7 @@ public LogModule logModule() { /** * Set the logModule property: Tells whether log modules are enabled or not. - * + * * @param logModule the logModule value to set. * @return the AppServiceInfoInner object itself. */ @@ -215,7 +214,7 @@ public AppServiceInfoInner withLogModule(LogModule logModule) { /** * Get the hostGroup property: The name of the host group. - * + * * @return the hostGroup value. */ public String hostGroup() { @@ -224,7 +223,7 @@ public String hostGroup() { /** * Set the hostGroup property: The name of the host group. - * + * * @param hostGroup the hostGroup value to set. * @return the AppServiceInfoInner object itself. */ @@ -235,7 +234,7 @@ public AppServiceInfoInner withHostGroup(String hostGroup) { /** * Get the hostname property: The name of the host. - * + * * @return the hostname value. */ public String hostname() { @@ -244,7 +243,7 @@ public String hostname() { /** * Set the hostname property: The name of the host. - * + * * @param hostname the hostname value to set. * @return the AppServiceInfoInner object itself. */ @@ -255,9 +254,74 @@ public AppServiceInfoInner withHostname(String hostname) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + jsonWriter.writeStringField("version", this.version); + jsonWriter.writeStringField("monitoringType", + this.monitoringType == null ? null : this.monitoringType.toString()); + jsonWriter.writeStringField("autoUpdateSetting", + this.autoUpdateSetting == null ? null : this.autoUpdateSetting.toString()); + jsonWriter.writeStringField("updateStatus", this.updateStatus == null ? null : this.updateStatus.toString()); + jsonWriter.writeStringField("availabilityState", + this.availabilityState == null ? null : this.availabilityState.toString()); + jsonWriter.writeStringField("logModule", this.logModule == null ? null : this.logModule.toString()); + jsonWriter.writeStringField("hostGroup", this.hostGroup); + jsonWriter.writeStringField("hostName", this.hostname); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AppServiceInfoInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AppServiceInfoInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the AppServiceInfoInner. + */ + public static AppServiceInfoInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AppServiceInfoInner deserializedAppServiceInfoInner = new AppServiceInfoInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedAppServiceInfoInner.resourceId = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedAppServiceInfoInner.version = reader.getString(); + } else if ("monitoringType".equals(fieldName)) { + deserializedAppServiceInfoInner.monitoringType = MonitoringType.fromString(reader.getString()); + } else if ("autoUpdateSetting".equals(fieldName)) { + deserializedAppServiceInfoInner.autoUpdateSetting + = AutoUpdateSetting.fromString(reader.getString()); + } else if ("updateStatus".equals(fieldName)) { + deserializedAppServiceInfoInner.updateStatus = UpdateStatus.fromString(reader.getString()); + } else if ("availabilityState".equals(fieldName)) { + deserializedAppServiceInfoInner.availabilityState + = AvailabilityState.fromString(reader.getString()); + } else if ("logModule".equals(fieldName)) { + deserializedAppServiceInfoInner.logModule = LogModule.fromString(reader.getString()); + } else if ("hostGroup".equals(fieldName)) { + deserializedAppServiceInfoInner.hostGroup = reader.getString(); + } else if ("hostName".equals(fieldName)) { + deserializedAppServiceInfoInner.hostname = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAppServiceInfoInner; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/DynatraceSingleSignOnProperties.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/DynatraceSingleSignOnProperties.java index 0df68d016c334..f5c531f9fcb89 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/DynatraceSingleSignOnProperties.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/DynatraceSingleSignOnProperties.java @@ -5,51 +5,54 @@ package com.azure.resourcemanager.dynatrace.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.dynatrace.models.ProvisioningState; import com.azure.resourcemanager.dynatrace.models.SingleSignOnStates; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** The details of a Dynatrace single sign-on. */ +/** + * The details of a Dynatrace single sign-on. + */ @Fluent -public final class DynatraceSingleSignOnProperties { +public final class DynatraceSingleSignOnProperties implements JsonSerializable { /* * State of Single Sign On */ - @JsonProperty(value = "singleSignOnState") private SingleSignOnStates singleSignOnState; /* * Version of the Dynatrace agent installed on the VM. */ - @JsonProperty(value = "enterpriseAppId") private String enterpriseAppId; /* * The login URL specific to this Dynatrace Environment */ - @JsonProperty(value = "singleSignOnUrl") private String singleSignOnUrl; /* * array of Aad(azure active directory) domains */ - @JsonProperty(value = "aadDomains") private List aadDomains; /* * Provisioning state of the resource. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; - /** Creates an instance of DynatraceSingleSignOnProperties class. */ + /** + * Creates an instance of DynatraceSingleSignOnProperties class. + */ public DynatraceSingleSignOnProperties() { } /** * Get the singleSignOnState property: State of Single Sign On. - * + * * @return the singleSignOnState value. */ public SingleSignOnStates singleSignOnState() { @@ -58,7 +61,7 @@ public SingleSignOnStates singleSignOnState() { /** * Set the singleSignOnState property: State of Single Sign On. - * + * * @param singleSignOnState the singleSignOnState value to set. * @return the DynatraceSingleSignOnProperties object itself. */ @@ -69,7 +72,7 @@ public DynatraceSingleSignOnProperties withSingleSignOnState(SingleSignOnStates /** * Get the enterpriseAppId property: Version of the Dynatrace agent installed on the VM. - * + * * @return the enterpriseAppId value. */ public String enterpriseAppId() { @@ -78,7 +81,7 @@ public String enterpriseAppId() { /** * Set the enterpriseAppId property: Version of the Dynatrace agent installed on the VM. - * + * * @param enterpriseAppId the enterpriseAppId value to set. * @return the DynatraceSingleSignOnProperties object itself. */ @@ -89,7 +92,7 @@ public DynatraceSingleSignOnProperties withEnterpriseAppId(String enterpriseAppI /** * Get the singleSignOnUrl property: The login URL specific to this Dynatrace Environment. - * + * * @return the singleSignOnUrl value. */ public String singleSignOnUrl() { @@ -98,7 +101,7 @@ public String singleSignOnUrl() { /** * Set the singleSignOnUrl property: The login URL specific to this Dynatrace Environment. - * + * * @param singleSignOnUrl the singleSignOnUrl value to set. * @return the DynatraceSingleSignOnProperties object itself. */ @@ -109,7 +112,7 @@ public DynatraceSingleSignOnProperties withSingleSignOnUrl(String singleSignOnUr /** * Get the aadDomains property: array of Aad(azure active directory) domains. - * + * * @return the aadDomains value. */ public List aadDomains() { @@ -118,7 +121,7 @@ public List aadDomains() { /** * Set the aadDomains property: array of Aad(azure active directory) domains. - * + * * @param aadDomains the aadDomains value to set. * @return the DynatraceSingleSignOnProperties object itself. */ @@ -129,7 +132,7 @@ public DynatraceSingleSignOnProperties withAadDomains(List aadDomains) { /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -138,9 +141,61 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("singleSignOnState", + this.singleSignOnState == null ? null : this.singleSignOnState.toString()); + jsonWriter.writeStringField("enterpriseAppId", this.enterpriseAppId); + jsonWriter.writeStringField("singleSignOnUrl", this.singleSignOnUrl); + jsonWriter.writeArrayField("aadDomains", this.aadDomains, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DynatraceSingleSignOnProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DynatraceSingleSignOnProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DynatraceSingleSignOnProperties. + */ + public static DynatraceSingleSignOnProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DynatraceSingleSignOnProperties deserializedDynatraceSingleSignOnProperties + = new DynatraceSingleSignOnProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("singleSignOnState".equals(fieldName)) { + deserializedDynatraceSingleSignOnProperties.singleSignOnState + = SingleSignOnStates.fromString(reader.getString()); + } else if ("enterpriseAppId".equals(fieldName)) { + deserializedDynatraceSingleSignOnProperties.enterpriseAppId = reader.getString(); + } else if ("singleSignOnUrl".equals(fieldName)) { + deserializedDynatraceSingleSignOnProperties.singleSignOnUrl = reader.getString(); + } else if ("aadDomains".equals(fieldName)) { + List aadDomains = reader.readArray(reader1 -> reader1.getString()); + deserializedDynatraceSingleSignOnProperties.aadDomains = aadDomains; + } else if ("provisioningState".equals(fieldName)) { + deserializedDynatraceSingleSignOnProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedDynatraceSingleSignOnProperties; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/DynatraceSingleSignOnResourceInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/DynatraceSingleSignOnResourceInner.java index e3a3126105cca..18fac1b715574 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/DynatraceSingleSignOnResourceInner.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/DynatraceSingleSignOnResourceInner.java @@ -8,33 +8,53 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.dynatrace.models.ProvisioningState; import com.azure.resourcemanager.dynatrace.models.SingleSignOnStates; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** Single sign-on configurations for a given monitor resource. */ +/** + * Single sign-on configurations for a given monitor resource. + */ @Fluent public final class DynatraceSingleSignOnResourceInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties", required = true) private DynatraceSingleSignOnProperties innerProperties = new DynatraceSingleSignOnProperties(); /* * System metadata for this resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of DynatraceSingleSignOnResourceInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of DynatraceSingleSignOnResourceInner class. + */ public DynatraceSingleSignOnResourceInner() { } /** * Get the innerProperties property: The resource-specific properties for this resource. - * + * * @return the innerProperties value. */ private DynatraceSingleSignOnProperties innerProperties() { @@ -43,16 +63,46 @@ private DynatraceSingleSignOnProperties innerProperties() { /** * Get the systemData property: System metadata for this resource. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the singleSignOnState property: State of Single Sign On. - * + * * @return the singleSignOnState value. */ public SingleSignOnStates singleSignOnState() { @@ -61,7 +111,7 @@ public SingleSignOnStates singleSignOnState() { /** * Set the singleSignOnState property: State of Single Sign On. - * + * * @param singleSignOnState the singleSignOnState value to set. * @return the DynatraceSingleSignOnResourceInner object itself. */ @@ -75,7 +125,7 @@ public DynatraceSingleSignOnResourceInner withSingleSignOnState(SingleSignOnStat /** * Get the enterpriseAppId property: Version of the Dynatrace agent installed on the VM. - * + * * @return the enterpriseAppId value. */ public String enterpriseAppId() { @@ -84,7 +134,7 @@ public String enterpriseAppId() { /** * Set the enterpriseAppId property: Version of the Dynatrace agent installed on the VM. - * + * * @param enterpriseAppId the enterpriseAppId value to set. * @return the DynatraceSingleSignOnResourceInner object itself. */ @@ -98,7 +148,7 @@ public DynatraceSingleSignOnResourceInner withEnterpriseAppId(String enterpriseA /** * Get the singleSignOnUrl property: The login URL specific to this Dynatrace Environment. - * + * * @return the singleSignOnUrl value. */ public String singleSignOnUrl() { @@ -107,7 +157,7 @@ public String singleSignOnUrl() { /** * Set the singleSignOnUrl property: The login URL specific to this Dynatrace Environment. - * + * * @param singleSignOnUrl the singleSignOnUrl value to set. * @return the DynatraceSingleSignOnResourceInner object itself. */ @@ -121,7 +171,7 @@ public DynatraceSingleSignOnResourceInner withSingleSignOnUrl(String singleSignO /** * Get the aadDomains property: array of Aad(azure active directory) domains. - * + * * @return the aadDomains value. */ public List aadDomains() { @@ -130,7 +180,7 @@ public List aadDomains() { /** * Set the aadDomains property: array of Aad(azure active directory) domains. - * + * * @param aadDomains the aadDomains value to set. * @return the DynatraceSingleSignOnResourceInner object itself. */ @@ -144,7 +194,7 @@ public DynatraceSingleSignOnResourceInner withAadDomains(List aadDomains /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -153,17 +203,65 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (innerProperties() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property innerProperties in model DynatraceSingleSignOnResourceInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model DynatraceSingleSignOnResourceInner")); } else { innerProperties().validate(); } } private static final ClientLogger LOGGER = new ClientLogger(DynatraceSingleSignOnResourceInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DynatraceSingleSignOnResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DynatraceSingleSignOnResourceInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DynatraceSingleSignOnResourceInner. + */ + public static DynatraceSingleSignOnResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DynatraceSingleSignOnResourceInner deserializedDynatraceSingleSignOnResourceInner + = new DynatraceSingleSignOnResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDynatraceSingleSignOnResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDynatraceSingleSignOnResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedDynatraceSingleSignOnResourceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDynatraceSingleSignOnResourceInner.innerProperties + = DynatraceSingleSignOnProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedDynatraceSingleSignOnResourceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDynatraceSingleSignOnResourceInner; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/LinkableEnvironmentResponseInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/LinkableEnvironmentResponseInner.java index bb6c2d21d3e5b..c61386b855dc2 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/LinkableEnvironmentResponseInner.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/LinkableEnvironmentResponseInner.java @@ -5,37 +5,42 @@ package com.azure.resourcemanager.dynatrace.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.dynatrace.models.PlanData; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Response for getting all the linkable environments. */ +/** + * Response for getting all the linkable environments. + */ @Fluent -public final class LinkableEnvironmentResponseInner { +public final class LinkableEnvironmentResponseInner implements JsonSerializable { /* * environment id for which user is an admin */ - @JsonProperty(value = "environmentId") private String environmentId; /* * Name of the environment */ - @JsonProperty(value = "environmentName") private String environmentName; /* * Billing plan information. */ - @JsonProperty(value = "planData") private PlanData planData; - /** Creates an instance of LinkableEnvironmentResponseInner class. */ + /** + * Creates an instance of LinkableEnvironmentResponseInner class. + */ public LinkableEnvironmentResponseInner() { } /** * Get the environmentId property: environment id for which user is an admin. - * + * * @return the environmentId value. */ public String environmentId() { @@ -44,7 +49,7 @@ public String environmentId() { /** * Set the environmentId property: environment id for which user is an admin. - * + * * @param environmentId the environmentId value to set. * @return the LinkableEnvironmentResponseInner object itself. */ @@ -55,7 +60,7 @@ public LinkableEnvironmentResponseInner withEnvironmentId(String environmentId) /** * Get the environmentName property: Name of the environment. - * + * * @return the environmentName value. */ public String environmentName() { @@ -64,7 +69,7 @@ public String environmentName() { /** * Set the environmentName property: Name of the environment. - * + * * @param environmentName the environmentName value to set. * @return the LinkableEnvironmentResponseInner object itself. */ @@ -75,7 +80,7 @@ public LinkableEnvironmentResponseInner withEnvironmentName(String environmentNa /** * Get the planData property: Billing plan information. - * + * * @return the planData value. */ public PlanData planData() { @@ -84,7 +89,7 @@ public PlanData planData() { /** * Set the planData property: Billing plan information. - * + * * @param planData the planData value to set. * @return the LinkableEnvironmentResponseInner object itself. */ @@ -95,7 +100,7 @@ public LinkableEnvironmentResponseInner withPlanData(PlanData planData) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -103,4 +108,47 @@ public void validate() { planData().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("environmentId", this.environmentId); + jsonWriter.writeStringField("environmentName", this.environmentName); + jsonWriter.writeJsonField("planData", this.planData); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LinkableEnvironmentResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LinkableEnvironmentResponseInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LinkableEnvironmentResponseInner. + */ + public static LinkableEnvironmentResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LinkableEnvironmentResponseInner deserializedLinkableEnvironmentResponseInner + = new LinkableEnvironmentResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("environmentId".equals(fieldName)) { + deserializedLinkableEnvironmentResponseInner.environmentId = reader.getString(); + } else if ("environmentName".equals(fieldName)) { + deserializedLinkableEnvironmentResponseInner.environmentName = reader.getString(); + } else if ("planData".equals(fieldName)) { + deserializedLinkableEnvironmentResponseInner.planData = PlanData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLinkableEnvironmentResponseInner; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MarketplaceSaaSResourceDetailsResponseInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MarketplaceSaaSResourceDetailsResponseInner.java index 05d8e00b552fc..1f371c300ac10 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MarketplaceSaaSResourceDetailsResponseInner.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MarketplaceSaaSResourceDetailsResponseInner.java @@ -5,37 +5,43 @@ package com.azure.resourcemanager.dynatrace.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.dynatrace.models.MarketplaceSubscriptionStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Marketplace SaaS resource details linked to the given tenant Id. */ +/** + * Marketplace SaaS resource details linked to the given tenant Id. + */ @Fluent -public final class MarketplaceSaaSResourceDetailsResponseInner { +public final class MarketplaceSaaSResourceDetailsResponseInner + implements JsonSerializable { /* * Id of the Marketplace SaaS Resource */ - @JsonProperty(value = "marketplaceSaaSResourceId") private String marketplaceSaaSResourceId; /* * Id of the plan */ - @JsonProperty(value = "planId") private String planId; /* * Marketplace subscription status */ - @JsonProperty(value = "marketplaceSubscriptionStatus") private MarketplaceSubscriptionStatus marketplaceSubscriptionStatus; - /** Creates an instance of MarketplaceSaaSResourceDetailsResponseInner class. */ + /** + * Creates an instance of MarketplaceSaaSResourceDetailsResponseInner class. + */ public MarketplaceSaaSResourceDetailsResponseInner() { } /** * Get the marketplaceSaaSResourceId property: Id of the Marketplace SaaS Resource. - * + * * @return the marketplaceSaaSResourceId value. */ public String marketplaceSaaSResourceId() { @@ -44,7 +50,7 @@ public String marketplaceSaaSResourceId() { /** * Set the marketplaceSaaSResourceId property: Id of the Marketplace SaaS Resource. - * + * * @param marketplaceSaaSResourceId the marketplaceSaaSResourceId value to set. * @return the MarketplaceSaaSResourceDetailsResponseInner object itself. */ @@ -55,7 +61,7 @@ public MarketplaceSaaSResourceDetailsResponseInner withMarketplaceSaaSResourceId /** * Get the planId property: Id of the plan. - * + * * @return the planId value. */ public String planId() { @@ -64,7 +70,7 @@ public String planId() { /** * Set the planId property: Id of the plan. - * + * * @param planId the planId value to set. * @return the MarketplaceSaaSResourceDetailsResponseInner object itself. */ @@ -75,7 +81,7 @@ public MarketplaceSaaSResourceDetailsResponseInner withPlanId(String planId) { /** * Get the marketplaceSubscriptionStatus property: Marketplace subscription status. - * + * * @return the marketplaceSubscriptionStatus value. */ public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() { @@ -84,7 +90,7 @@ public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() { /** * Set the marketplaceSubscriptionStatus property: Marketplace subscription status. - * + * * @param marketplaceSubscriptionStatus the marketplaceSubscriptionStatus value to set. * @return the MarketplaceSaaSResourceDetailsResponseInner object itself. */ @@ -96,9 +102,55 @@ public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("marketplaceSaaSResourceId", this.marketplaceSaaSResourceId); + jsonWriter.writeStringField("planId", this.planId); + jsonWriter.writeStringField("marketplaceSubscriptionStatus", + this.marketplaceSubscriptionStatus == null ? null : this.marketplaceSubscriptionStatus.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MarketplaceSaaSResourceDetailsResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MarketplaceSaaSResourceDetailsResponseInner if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MarketplaceSaaSResourceDetailsResponseInner. + */ + public static MarketplaceSaaSResourceDetailsResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MarketplaceSaaSResourceDetailsResponseInner deserializedMarketplaceSaaSResourceDetailsResponseInner + = new MarketplaceSaaSResourceDetailsResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("marketplaceSaaSResourceId".equals(fieldName)) { + deserializedMarketplaceSaaSResourceDetailsResponseInner.marketplaceSaaSResourceId + = reader.getString(); + } else if ("planId".equals(fieldName)) { + deserializedMarketplaceSaaSResourceDetailsResponseInner.planId = reader.getString(); + } else if ("marketplaceSubscriptionStatus".equals(fieldName)) { + deserializedMarketplaceSaaSResourceDetailsResponseInner.marketplaceSubscriptionStatus + = MarketplaceSubscriptionStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedMarketplaceSaaSResourceDetailsResponseInner; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MetricsStatusResponseInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MetricsStatusResponseInner.java index adbaf8b77b89f..885f2d232e68a 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MetricsStatusResponseInner.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MetricsStatusResponseInner.java @@ -5,25 +5,32 @@ package com.azure.resourcemanager.dynatrace.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** Response of get metrics status operation. */ +/** + * Response of get metrics status operation. + */ @Fluent -public final class MetricsStatusResponseInner { +public final class MetricsStatusResponseInner implements JsonSerializable { /* * Azure resource IDs */ - @JsonProperty(value = "azureResourceIds") private List azureResourceIds; - /** Creates an instance of MetricsStatusResponseInner class. */ + /** + * Creates an instance of MetricsStatusResponseInner class. + */ public MetricsStatusResponseInner() { } /** * Get the azureResourceIds property: Azure resource IDs. - * + * * @return the azureResourceIds value. */ public List azureResourceIds() { @@ -32,7 +39,7 @@ public List azureResourceIds() { /** * Set the azureResourceIds property: Azure resource IDs. - * + * * @param azureResourceIds the azureResourceIds value to set. * @return the MetricsStatusResponseInner object itself. */ @@ -43,9 +50,47 @@ public MetricsStatusResponseInner withAzureResourceIds(List azureResourc /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("azureResourceIds", this.azureResourceIds, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MetricsStatusResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MetricsStatusResponseInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MetricsStatusResponseInner. + */ + public static MetricsStatusResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MetricsStatusResponseInner deserializedMetricsStatusResponseInner = new MetricsStatusResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("azureResourceIds".equals(fieldName)) { + List azureResourceIds = reader.readArray(reader1 -> reader1.getString()); + deserializedMetricsStatusResponseInner.azureResourceIds = azureResourceIds; + } else { + reader.skipChildren(); + } + } + + return deserializedMetricsStatusResponseInner; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitorProperties.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitorProperties.java index c3e8a9d84667d..bb30a2643652b 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitorProperties.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitorProperties.java @@ -5,6 +5,10 @@ package com.azure.resourcemanager.dynatrace.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.dynatrace.models.DynatraceEnvironmentProperties; import com.azure.resourcemanager.dynatrace.models.LiftrResourceCategories; import com.azure.resourcemanager.dynatrace.models.MarketplaceSubscriptionStatus; @@ -12,66 +16,62 @@ import com.azure.resourcemanager.dynatrace.models.PlanData; import com.azure.resourcemanager.dynatrace.models.ProvisioningState; import com.azure.resourcemanager.dynatrace.models.UserInfo; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Properties specific to the monitor resource. */ +/** + * Properties specific to the monitor resource. + */ @Fluent -public final class MonitorProperties { +public final class MonitorProperties implements JsonSerializable { /* * Status of the monitor. */ - @JsonProperty(value = "monitoringStatus") private MonitoringStatus monitoringStatus; /* * Marketplace subscription status. */ - @JsonProperty(value = "marketplaceSubscriptionStatus") private MarketplaceSubscriptionStatus marketplaceSubscriptionStatus; /* * Properties of the Dynatrace environment. */ - @JsonProperty(value = "dynatraceEnvironmentProperties") private DynatraceEnvironmentProperties dynatraceEnvironmentProperties; /* * User info. */ - @JsonProperty(value = "userInfo") private UserInfo userInfo; /* * Billing plan information. */ - @JsonProperty(value = "planData") private PlanData planData; /* * Liftr Resource category. */ - @JsonProperty(value = "liftrResourceCategory", access = JsonProperty.Access.WRITE_ONLY) private LiftrResourceCategories liftrResourceCategory; /* * The priority of the resource. */ - @JsonProperty(value = "liftrResourcePreference", access = JsonProperty.Access.WRITE_ONLY) private Integer liftrResourcePreference; /* * Provisioning state of the resource. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; - /** Creates an instance of MonitorProperties class. */ + /** + * Creates an instance of MonitorProperties class. + */ public MonitorProperties() { } /** * Get the monitoringStatus property: Status of the monitor. - * + * * @return the monitoringStatus value. */ public MonitoringStatus monitoringStatus() { @@ -80,7 +80,7 @@ public MonitoringStatus monitoringStatus() { /** * Set the monitoringStatus property: Status of the monitor. - * + * * @param monitoringStatus the monitoringStatus value to set. * @return the MonitorProperties object itself. */ @@ -91,7 +91,7 @@ public MonitorProperties withMonitoringStatus(MonitoringStatus monitoringStatus) /** * Get the marketplaceSubscriptionStatus property: Marketplace subscription status. - * + * * @return the marketplaceSubscriptionStatus value. */ public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() { @@ -100,7 +100,7 @@ public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() { /** * Set the marketplaceSubscriptionStatus property: Marketplace subscription status. - * + * * @param marketplaceSubscriptionStatus the marketplaceSubscriptionStatus value to set. * @return the MonitorProperties object itself. */ @@ -112,7 +112,7 @@ public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() { /** * Get the dynatraceEnvironmentProperties property: Properties of the Dynatrace environment. - * + * * @return the dynatraceEnvironmentProperties value. */ public DynatraceEnvironmentProperties dynatraceEnvironmentProperties() { @@ -121,7 +121,7 @@ public DynatraceEnvironmentProperties dynatraceEnvironmentProperties() { /** * Set the dynatraceEnvironmentProperties property: Properties of the Dynatrace environment. - * + * * @param dynatraceEnvironmentProperties the dynatraceEnvironmentProperties value to set. * @return the MonitorProperties object itself. */ @@ -133,7 +133,7 @@ public DynatraceEnvironmentProperties dynatraceEnvironmentProperties() { /** * Get the userInfo property: User info. - * + * * @return the userInfo value. */ public UserInfo userInfo() { @@ -142,7 +142,7 @@ public UserInfo userInfo() { /** * Set the userInfo property: User info. - * + * * @param userInfo the userInfo value to set. * @return the MonitorProperties object itself. */ @@ -153,7 +153,7 @@ public MonitorProperties withUserInfo(UserInfo userInfo) { /** * Get the planData property: Billing plan information. - * + * * @return the planData value. */ public PlanData planData() { @@ -162,7 +162,7 @@ public PlanData planData() { /** * Set the planData property: Billing plan information. - * + * * @param planData the planData value to set. * @return the MonitorProperties object itself. */ @@ -173,7 +173,7 @@ public MonitorProperties withPlanData(PlanData planData) { /** * Get the liftrResourceCategory property: Liftr Resource category. - * + * * @return the liftrResourceCategory value. */ public LiftrResourceCategories liftrResourceCategory() { @@ -182,7 +182,7 @@ public LiftrResourceCategories liftrResourceCategory() { /** * Get the liftrResourcePreference property: The priority of the resource. - * + * * @return the liftrResourcePreference value. */ public Integer liftrResourcePreference() { @@ -191,7 +191,7 @@ public Integer liftrResourcePreference() { /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -200,7 +200,7 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -214,4 +214,63 @@ public void validate() { planData().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("monitoringStatus", + this.monitoringStatus == null ? null : this.monitoringStatus.toString()); + jsonWriter.writeStringField("marketplaceSubscriptionStatus", + this.marketplaceSubscriptionStatus == null ? null : this.marketplaceSubscriptionStatus.toString()); + jsonWriter.writeJsonField("dynatraceEnvironmentProperties", this.dynatraceEnvironmentProperties); + jsonWriter.writeJsonField("userInfo", this.userInfo); + jsonWriter.writeJsonField("planData", this.planData); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MonitorProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MonitorProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the MonitorProperties. + */ + public static MonitorProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MonitorProperties deserializedMonitorProperties = new MonitorProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("monitoringStatus".equals(fieldName)) { + deserializedMonitorProperties.monitoringStatus = MonitoringStatus.fromString(reader.getString()); + } else if ("marketplaceSubscriptionStatus".equals(fieldName)) { + deserializedMonitorProperties.marketplaceSubscriptionStatus + = MarketplaceSubscriptionStatus.fromString(reader.getString()); + } else if ("dynatraceEnvironmentProperties".equals(fieldName)) { + deserializedMonitorProperties.dynatraceEnvironmentProperties + = DynatraceEnvironmentProperties.fromJson(reader); + } else if ("userInfo".equals(fieldName)) { + deserializedMonitorProperties.userInfo = UserInfo.fromJson(reader); + } else if ("planData".equals(fieldName)) { + deserializedMonitorProperties.planData = PlanData.fromJson(reader); + } else if ("liftrResourceCategory".equals(fieldName)) { + deserializedMonitorProperties.liftrResourceCategory + = LiftrResourceCategories.fromString(reader.getString()); + } else if ("liftrResourcePreference".equals(fieldName)) { + deserializedMonitorProperties.liftrResourcePreference = reader.getNullable(JsonReader::getInt); + } else if ("provisioningState".equals(fieldName)) { + deserializedMonitorProperties.provisioningState = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedMonitorProperties; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitorResourceInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitorResourceInner.java index 654ba6041fd02..753750f20870c 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitorResourceInner.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitorResourceInner.java @@ -8,6 +8,9 @@ import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.dynatrace.models.DynatraceEnvironmentProperties; import com.azure.resourcemanager.dynatrace.models.IdentityProperties; import com.azure.resourcemanager.dynatrace.models.LiftrResourceCategories; @@ -16,37 +19,53 @@ import com.azure.resourcemanager.dynatrace.models.PlanData; import com.azure.resourcemanager.dynatrace.models.ProvisioningState; import com.azure.resourcemanager.dynatrace.models.UserInfo; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.Map; -/** Dynatrace Monitor Resource. */ +/** + * Dynatrace Monitor Resource. + */ @Fluent public final class MonitorResourceInner extends Resource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties", required = true) private MonitorProperties innerProperties = new MonitorProperties(); /* * System metadata for this resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; /* * The managed service identities assigned to this resource. */ - @JsonProperty(value = "identity") private IdentityProperties identity; - /** Creates an instance of MonitorResourceInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of MonitorResourceInner class. + */ public MonitorResourceInner() { } /** * Get the innerProperties property: The resource-specific properties for this resource. - * + * * @return the innerProperties value. */ private MonitorProperties innerProperties() { @@ -55,7 +74,7 @@ private MonitorProperties innerProperties() { /** * Get the systemData property: System metadata for this resource. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -64,7 +83,7 @@ public SystemData systemData() { /** * Get the identity property: The managed service identities assigned to this resource. - * + * * @return the identity value. */ public IdentityProperties identity() { @@ -73,7 +92,7 @@ public IdentityProperties identity() { /** * Set the identity property: The managed service identities assigned to this resource. - * + * * @param identity the identity value to set. * @return the MonitorResourceInner object itself. */ @@ -82,14 +101,48 @@ public MonitorResourceInner withIdentity(IdentityProperties identity) { return this; } - /** {@inheritDoc} */ + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ @Override public MonitorResourceInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public MonitorResourceInner withTags(Map tags) { super.withTags(tags); @@ -98,7 +151,7 @@ public MonitorResourceInner withTags(Map tags) { /** * Get the monitoringStatus property: Status of the monitor. - * + * * @return the monitoringStatus value. */ public MonitoringStatus monitoringStatus() { @@ -107,7 +160,7 @@ public MonitoringStatus monitoringStatus() { /** * Set the monitoringStatus property: Status of the monitor. - * + * * @param monitoringStatus the monitoringStatus value to set. * @return the MonitorResourceInner object itself. */ @@ -121,7 +174,7 @@ public MonitorResourceInner withMonitoringStatus(MonitoringStatus monitoringStat /** * Get the marketplaceSubscriptionStatus property: Marketplace subscription status. - * + * * @return the marketplaceSubscriptionStatus value. */ public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() { @@ -130,7 +183,7 @@ public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() { /** * Set the marketplaceSubscriptionStatus property: Marketplace subscription status. - * + * * @param marketplaceSubscriptionStatus the marketplaceSubscriptionStatus value to set. * @return the MonitorResourceInner object itself. */ @@ -145,7 +198,7 @@ public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() { /** * Get the dynatraceEnvironmentProperties property: Properties of the Dynatrace environment. - * + * * @return the dynatraceEnvironmentProperties value. */ public DynatraceEnvironmentProperties dynatraceEnvironmentProperties() { @@ -154,7 +207,7 @@ public DynatraceEnvironmentProperties dynatraceEnvironmentProperties() { /** * Set the dynatraceEnvironmentProperties property: Properties of the Dynatrace environment. - * + * * @param dynatraceEnvironmentProperties the dynatraceEnvironmentProperties value to set. * @return the MonitorResourceInner object itself. */ @@ -169,7 +222,7 @@ public DynatraceEnvironmentProperties dynatraceEnvironmentProperties() { /** * Get the userInfo property: User info. - * + * * @return the userInfo value. */ public UserInfo userInfo() { @@ -178,7 +231,7 @@ public UserInfo userInfo() { /** * Set the userInfo property: User info. - * + * * @param userInfo the userInfo value to set. * @return the MonitorResourceInner object itself. */ @@ -192,7 +245,7 @@ public MonitorResourceInner withUserInfo(UserInfo userInfo) { /** * Get the planData property: Billing plan information. - * + * * @return the planData value. */ public PlanData planData() { @@ -201,7 +254,7 @@ public PlanData planData() { /** * Set the planData property: Billing plan information. - * + * * @param planData the planData value to set. * @return the MonitorResourceInner object itself. */ @@ -215,7 +268,7 @@ public MonitorResourceInner withPlanData(PlanData planData) { /** * Get the liftrResourceCategory property: Liftr Resource category. - * + * * @return the liftrResourceCategory value. */ public LiftrResourceCategories liftrResourceCategory() { @@ -224,7 +277,7 @@ public LiftrResourceCategories liftrResourceCategory() { /** * Get the liftrResourcePreference property: The priority of the resource. - * + * * @return the liftrResourcePreference value. */ public Integer liftrResourcePreference() { @@ -233,7 +286,7 @@ public Integer liftrResourcePreference() { /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -242,13 +295,14 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (innerProperties() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property innerProperties in model MonitorResourceInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model MonitorResourceInner")); } else { innerProperties().validate(); } @@ -258,4 +312,59 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(MonitorResourceInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MonitorResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MonitorResourceInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MonitorResourceInner. + */ + public static MonitorResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MonitorResourceInner deserializedMonitorResourceInner = new MonitorResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMonitorResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedMonitorResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedMonitorResourceInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedMonitorResourceInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedMonitorResourceInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedMonitorResourceInner.innerProperties = MonitorProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedMonitorResourceInner.systemData = SystemData.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedMonitorResourceInner.identity = IdentityProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMonitorResourceInner; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitoredResourceInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitoredResourceInner.java index 15d5d973c3c24..0bf19a182be60 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitoredResourceInner.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitoredResourceInner.java @@ -5,50 +5,53 @@ package com.azure.resourcemanager.dynatrace.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.dynatrace.models.SendingLogsStatus; import com.azure.resourcemanager.dynatrace.models.SendingMetricsStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Details of resource being monitored by Dynatrace monitor resource. */ +/** + * Details of resource being monitored by Dynatrace monitor resource. + */ @Fluent -public final class MonitoredResourceInner { +public final class MonitoredResourceInner implements JsonSerializable { /* * The ARM id of the resource. */ - @JsonProperty(value = "id") private String id; /* * Flag indicating if resource is sending metrics to Dynatrace. */ - @JsonProperty(value = "sendingMetrics") private SendingMetricsStatus sendingMetrics; /* * Reason for why the resource is sending metrics (or why it is not sending). */ - @JsonProperty(value = "reasonForMetricsStatus") private String reasonForMetricsStatus; /* * Flag indicating if resource is sending logs to Dynatrace. */ - @JsonProperty(value = "sendingLogs") private SendingLogsStatus sendingLogs; /* * Reason for why the resource is sending logs (or why it is not sending). */ - @JsonProperty(value = "reasonForLogsStatus") private String reasonForLogsStatus; - /** Creates an instance of MonitoredResourceInner class. */ + /** + * Creates an instance of MonitoredResourceInner class. + */ public MonitoredResourceInner() { } /** * Get the id property: The ARM id of the resource. - * + * * @return the id value. */ public String id() { @@ -57,7 +60,7 @@ public String id() { /** * Set the id property: The ARM id of the resource. - * + * * @param id the id value to set. * @return the MonitoredResourceInner object itself. */ @@ -68,7 +71,7 @@ public MonitoredResourceInner withId(String id) { /** * Get the sendingMetrics property: Flag indicating if resource is sending metrics to Dynatrace. - * + * * @return the sendingMetrics value. */ public SendingMetricsStatus sendingMetrics() { @@ -77,7 +80,7 @@ public SendingMetricsStatus sendingMetrics() { /** * Set the sendingMetrics property: Flag indicating if resource is sending metrics to Dynatrace. - * + * * @param sendingMetrics the sendingMetrics value to set. * @return the MonitoredResourceInner object itself. */ @@ -89,7 +92,7 @@ public MonitoredResourceInner withSendingMetrics(SendingMetricsStatus sendingMet /** * Get the reasonForMetricsStatus property: Reason for why the resource is sending metrics (or why it is not * sending). - * + * * @return the reasonForMetricsStatus value. */ public String reasonForMetricsStatus() { @@ -99,7 +102,7 @@ public String reasonForMetricsStatus() { /** * Set the reasonForMetricsStatus property: Reason for why the resource is sending metrics (or why it is not * sending). - * + * * @param reasonForMetricsStatus the reasonForMetricsStatus value to set. * @return the MonitoredResourceInner object itself. */ @@ -110,7 +113,7 @@ public MonitoredResourceInner withReasonForMetricsStatus(String reasonForMetrics /** * Get the sendingLogs property: Flag indicating if resource is sending logs to Dynatrace. - * + * * @return the sendingLogs value. */ public SendingLogsStatus sendingLogs() { @@ -119,7 +122,7 @@ public SendingLogsStatus sendingLogs() { /** * Set the sendingLogs property: Flag indicating if resource is sending logs to Dynatrace. - * + * * @param sendingLogs the sendingLogs value to set. * @return the MonitoredResourceInner object itself. */ @@ -130,7 +133,7 @@ public MonitoredResourceInner withSendingLogs(SendingLogsStatus sendingLogs) { /** * Get the reasonForLogsStatus property: Reason for why the resource is sending logs (or why it is not sending). - * + * * @return the reasonForLogsStatus value. */ public String reasonForLogsStatus() { @@ -139,7 +142,7 @@ public String reasonForLogsStatus() { /** * Set the reasonForLogsStatus property: Reason for why the resource is sending logs (or why it is not sending). - * + * * @param reasonForLogsStatus the reasonForLogsStatus value to set. * @return the MonitoredResourceInner object itself. */ @@ -150,9 +153,59 @@ public MonitoredResourceInner withReasonForLogsStatus(String reasonForLogsStatus /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("sendingMetrics", + this.sendingMetrics == null ? null : this.sendingMetrics.toString()); + jsonWriter.writeStringField("reasonForMetricsStatus", this.reasonForMetricsStatus); + jsonWriter.writeStringField("sendingLogs", this.sendingLogs == null ? null : this.sendingLogs.toString()); + jsonWriter.writeStringField("reasonForLogsStatus", this.reasonForLogsStatus); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MonitoredResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MonitoredResourceInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the MonitoredResourceInner. + */ + public static MonitoredResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MonitoredResourceInner deserializedMonitoredResourceInner = new MonitoredResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMonitoredResourceInner.id = reader.getString(); + } else if ("sendingMetrics".equals(fieldName)) { + deserializedMonitoredResourceInner.sendingMetrics + = SendingMetricsStatus.fromString(reader.getString()); + } else if ("reasonForMetricsStatus".equals(fieldName)) { + deserializedMonitoredResourceInner.reasonForMetricsStatus = reader.getString(); + } else if ("sendingLogs".equals(fieldName)) { + deserializedMonitoredResourceInner.sendingLogs = SendingLogsStatus.fromString(reader.getString()); + } else if ("reasonForLogsStatus".equals(fieldName)) { + deserializedMonitoredResourceInner.reasonForLogsStatus = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMonitoredResourceInner; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitoringTagRulesProperties.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitoringTagRulesProperties.java index ee1cf5f6aa682..5dc4a64343a70 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitoringTagRulesProperties.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/MonitoringTagRulesProperties.java @@ -5,39 +5,44 @@ package com.azure.resourcemanager.dynatrace.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.dynatrace.models.LogRules; import com.azure.resourcemanager.dynatrace.models.MetricRules; import com.azure.resourcemanager.dynatrace.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Properties for the Tag rules resource of a Monitor account. */ +/** + * Properties for the Tag rules resource of a Monitor account. + */ @Fluent -public final class MonitoringTagRulesProperties { +public final class MonitoringTagRulesProperties implements JsonSerializable { /* * Set of rules for sending logs for the Monitor resource. */ - @JsonProperty(value = "logRules") private LogRules logRules; /* * Set of rules for sending metrics for the Monitor resource. */ - @JsonProperty(value = "metricRules") private MetricRules metricRules; /* * Provisioning state of the resource. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; - /** Creates an instance of MonitoringTagRulesProperties class. */ + /** + * Creates an instance of MonitoringTagRulesProperties class. + */ public MonitoringTagRulesProperties() { } /** * Get the logRules property: Set of rules for sending logs for the Monitor resource. - * + * * @return the logRules value. */ public LogRules logRules() { @@ -46,7 +51,7 @@ public LogRules logRules() { /** * Set the logRules property: Set of rules for sending logs for the Monitor resource. - * + * * @param logRules the logRules value to set. * @return the MonitoringTagRulesProperties object itself. */ @@ -57,7 +62,7 @@ public MonitoringTagRulesProperties withLogRules(LogRules logRules) { /** * Get the metricRules property: Set of rules for sending metrics for the Monitor resource. - * + * * @return the metricRules value. */ public MetricRules metricRules() { @@ -66,7 +71,7 @@ public MetricRules metricRules() { /** * Set the metricRules property: Set of rules for sending metrics for the Monitor resource. - * + * * @param metricRules the metricRules value to set. * @return the MonitoringTagRulesProperties object itself. */ @@ -77,7 +82,7 @@ public MonitoringTagRulesProperties withMetricRules(MetricRules metricRules) { /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -86,7 +91,7 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -97,4 +102,46 @@ public void validate() { metricRules().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("logRules", this.logRules); + jsonWriter.writeJsonField("metricRules", this.metricRules); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MonitoringTagRulesProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MonitoringTagRulesProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MonitoringTagRulesProperties. + */ + public static MonitoringTagRulesProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MonitoringTagRulesProperties deserializedMonitoringTagRulesProperties = new MonitoringTagRulesProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("logRules".equals(fieldName)) { + deserializedMonitoringTagRulesProperties.logRules = LogRules.fromJson(reader); + } else if ("metricRules".equals(fieldName)) { + deserializedMonitoringTagRulesProperties.metricRules = MetricRules.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedMonitoringTagRulesProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedMonitoringTagRulesProperties; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/OperationInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/OperationInner.java index 990ee3022d44f..e9b2172a84188 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/OperationInner.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/OperationInner.java @@ -5,59 +5,60 @@ package com.azure.resourcemanager.dynatrace.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.dynatrace.models.ActionType; import com.azure.resourcemanager.dynatrace.models.OperationDisplay; import com.azure.resourcemanager.dynatrace.models.Origin; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; /** * REST API Operation - * - *

Details of a REST API operation, returned from the Resource Provider Operations API. + * + * Details of a REST API operation, returned from the Resource Provider Operations API. */ @Fluent -public final class OperationInner { +public final class OperationInner implements JsonSerializable { /* * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for * ARM/control-plane operations. */ - @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) private Boolean isDataAction; /* * Localized display information for this particular operation. */ - @JsonProperty(value = "display") private OperationDisplay display; /* * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default * value is "user,system" */ - @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) private Origin origin; /* * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ - @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) private ActionType actionType; - /** Creates an instance of OperationInner class. */ + /** + * Creates an instance of OperationInner class. + */ public OperationInner() { } /** * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * + * * @return the name value. */ public String name() { @@ -67,7 +68,7 @@ public String name() { /** * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane * operations and "false" for ARM/control-plane operations. - * + * * @return the isDataAction value. */ public Boolean isDataAction() { @@ -76,7 +77,7 @@ public Boolean isDataAction() { /** * Get the display property: Localized display information for this particular operation. - * + * * @return the display value. */ public OperationDisplay display() { @@ -85,7 +86,7 @@ public OperationDisplay display() { /** * Set the display property: Localized display information for this particular operation. - * + * * @param display the display value to set. * @return the OperationInner object itself. */ @@ -97,7 +98,7 @@ public OperationInner withDisplay(OperationDisplay display) { /** * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". - * + * * @return the origin value. */ public Origin origin() { @@ -107,7 +108,7 @@ public Origin origin() { /** * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal * only APIs. - * + * * @return the actionType value. */ public ActionType actionType() { @@ -116,7 +117,7 @@ public ActionType actionType() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -124,4 +125,48 @@ public void validate() { display().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("display", this.display); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationInner. + */ + public static OperationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationInner deserializedOperationInner = new OperationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedOperationInner.name = reader.getString(); + } else if ("isDataAction".equals(fieldName)) { + deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean); + } else if ("display".equals(fieldName)) { + deserializedOperationInner.display = OperationDisplay.fromJson(reader); + } else if ("origin".equals(fieldName)) { + deserializedOperationInner.origin = Origin.fromString(reader.getString()); + } else if ("actionType".equals(fieldName)) { + deserializedOperationInner.actionType = ActionType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationInner; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/SsoDetailsResponseInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/SsoDetailsResponseInner.java index 596d83bebb588..e71d14ddace47 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/SsoDetailsResponseInner.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/SsoDetailsResponseInner.java @@ -5,50 +5,53 @@ package com.azure.resourcemanager.dynatrace.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.dynatrace.models.SsoStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** SSO details from the Dynatrace partner. */ +/** + * SSO details from the Dynatrace partner. + */ @Fluent -public final class SsoDetailsResponseInner { +public final class SsoDetailsResponseInner implements JsonSerializable { /* * Whether the SSO is enabled for this resource or not. */ - @JsonProperty(value = "isSsoEnabled") private SsoStatus isSsoEnabled; /* * URL for Azure AD metadata */ - @JsonProperty(value = "metadataUrl") private String metadataUrl; /* * The login URL specific to this Dynatrace Environment */ - @JsonProperty(value = "singleSignOnUrl") private String singleSignOnUrl; /* * array of Aad(azure active directory) domains */ - @JsonProperty(value = "aadDomains") private List aadDomains; /* * Array of admin user emails. */ - @JsonProperty(value = "adminUsers") private List adminUsers; - /** Creates an instance of SsoDetailsResponseInner class. */ + /** + * Creates an instance of SsoDetailsResponseInner class. + */ public SsoDetailsResponseInner() { } /** * Get the isSsoEnabled property: Whether the SSO is enabled for this resource or not. - * + * * @return the isSsoEnabled value. */ public SsoStatus isSsoEnabled() { @@ -57,7 +60,7 @@ public SsoStatus isSsoEnabled() { /** * Set the isSsoEnabled property: Whether the SSO is enabled for this resource or not. - * + * * @param isSsoEnabled the isSsoEnabled value to set. * @return the SsoDetailsResponseInner object itself. */ @@ -68,7 +71,7 @@ public SsoDetailsResponseInner withIsSsoEnabled(SsoStatus isSsoEnabled) { /** * Get the metadataUrl property: URL for Azure AD metadata. - * + * * @return the metadataUrl value. */ public String metadataUrl() { @@ -77,7 +80,7 @@ public String metadataUrl() { /** * Set the metadataUrl property: URL for Azure AD metadata. - * + * * @param metadataUrl the metadataUrl value to set. * @return the SsoDetailsResponseInner object itself. */ @@ -88,7 +91,7 @@ public SsoDetailsResponseInner withMetadataUrl(String metadataUrl) { /** * Get the singleSignOnUrl property: The login URL specific to this Dynatrace Environment. - * + * * @return the singleSignOnUrl value. */ public String singleSignOnUrl() { @@ -97,7 +100,7 @@ public String singleSignOnUrl() { /** * Set the singleSignOnUrl property: The login URL specific to this Dynatrace Environment. - * + * * @param singleSignOnUrl the singleSignOnUrl value to set. * @return the SsoDetailsResponseInner object itself. */ @@ -108,7 +111,7 @@ public SsoDetailsResponseInner withSingleSignOnUrl(String singleSignOnUrl) { /** * Get the aadDomains property: array of Aad(azure active directory) domains. - * + * * @return the aadDomains value. */ public List aadDomains() { @@ -117,7 +120,7 @@ public List aadDomains() { /** * Set the aadDomains property: array of Aad(azure active directory) domains. - * + * * @param aadDomains the aadDomains value to set. * @return the SsoDetailsResponseInner object itself. */ @@ -128,7 +131,7 @@ public SsoDetailsResponseInner withAadDomains(List aadDomains) { /** * Get the adminUsers property: Array of admin user emails. - * + * * @return the adminUsers value. */ public List adminUsers() { @@ -137,7 +140,7 @@ public List adminUsers() { /** * Set the adminUsers property: Array of admin user emails. - * + * * @param adminUsers the adminUsers value to set. * @return the SsoDetailsResponseInner object itself. */ @@ -148,9 +151,59 @@ public SsoDetailsResponseInner withAdminUsers(List adminUsers) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("isSsoEnabled", this.isSsoEnabled == null ? null : this.isSsoEnabled.toString()); + jsonWriter.writeStringField("metadataUrl", this.metadataUrl); + jsonWriter.writeStringField("singleSignOnUrl", this.singleSignOnUrl); + jsonWriter.writeArrayField("aadDomains", this.aadDomains, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("adminUsers", this.adminUsers, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SsoDetailsResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SsoDetailsResponseInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the SsoDetailsResponseInner. + */ + public static SsoDetailsResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SsoDetailsResponseInner deserializedSsoDetailsResponseInner = new SsoDetailsResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("isSsoEnabled".equals(fieldName)) { + deserializedSsoDetailsResponseInner.isSsoEnabled = SsoStatus.fromString(reader.getString()); + } else if ("metadataUrl".equals(fieldName)) { + deserializedSsoDetailsResponseInner.metadataUrl = reader.getString(); + } else if ("singleSignOnUrl".equals(fieldName)) { + deserializedSsoDetailsResponseInner.singleSignOnUrl = reader.getString(); + } else if ("aadDomains".equals(fieldName)) { + List aadDomains = reader.readArray(reader1 -> reader1.getString()); + deserializedSsoDetailsResponseInner.aadDomains = aadDomains; + } else if ("adminUsers".equals(fieldName)) { + List adminUsers = reader.readArray(reader1 -> reader1.getString()); + deserializedSsoDetailsResponseInner.adminUsers = adminUsers; + } else { + reader.skipChildren(); + } + } + + return deserializedSsoDetailsResponseInner; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/TagRuleInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/TagRuleInner.java index 59373c86fb8f3..4f7fee4c47c69 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/TagRuleInner.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/TagRuleInner.java @@ -8,33 +8,53 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.dynatrace.models.LogRules; import com.azure.resourcemanager.dynatrace.models.MetricRules; import com.azure.resourcemanager.dynatrace.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Tag rules for a monitor resource. */ +/** + * Tag rules for a monitor resource. + */ @Fluent public final class TagRuleInner extends ProxyResource { /* * The resource-specific properties for this resource. */ - @JsonProperty(value = "properties", required = true) private MonitoringTagRulesProperties innerProperties = new MonitoringTagRulesProperties(); /* * System metadata for this resource. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of TagRuleInner class. */ + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of TagRuleInner class. + */ public TagRuleInner() { } /** * Get the innerProperties property: The resource-specific properties for this resource. - * + * * @return the innerProperties value. */ private MonitoringTagRulesProperties innerProperties() { @@ -43,16 +63,46 @@ private MonitoringTagRulesProperties innerProperties() { /** * Get the systemData property: System metadata for this resource. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + /** * Get the logRules property: Set of rules for sending logs for the Monitor resource. - * + * * @return the logRules value. */ public LogRules logRules() { @@ -61,7 +111,7 @@ public LogRules logRules() { /** * Set the logRules property: Set of rules for sending logs for the Monitor resource. - * + * * @param logRules the logRules value to set. * @return the TagRuleInner object itself. */ @@ -75,7 +125,7 @@ public TagRuleInner withLogRules(LogRules logRules) { /** * Get the metricRules property: Set of rules for sending metrics for the Monitor resource. - * + * * @return the metricRules value. */ public MetricRules metricRules() { @@ -84,7 +134,7 @@ public MetricRules metricRules() { /** * Set the metricRules property: Set of rules for sending metrics for the Monitor resource. - * + * * @param metricRules the metricRules value to set. * @return the TagRuleInner object itself. */ @@ -98,7 +148,7 @@ public TagRuleInner withMetricRules(MetricRules metricRules) { /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -107,17 +157,62 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (innerProperties() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property innerProperties in model TagRuleInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property innerProperties in model TagRuleInner")); } else { innerProperties().validate(); } } private static final ClientLogger LOGGER = new ClientLogger(TagRuleInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TagRuleInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TagRuleInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TagRuleInner. + */ + public static TagRuleInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TagRuleInner deserializedTagRuleInner = new TagRuleInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedTagRuleInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedTagRuleInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedTagRuleInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedTagRuleInner.innerProperties = MonitoringTagRulesProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedTagRuleInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedTagRuleInner; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/VMExtensionPayloadInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/VMExtensionPayloadInner.java index 33f961351fd4d..9adb55aeb6711 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/VMExtensionPayloadInner.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/VMExtensionPayloadInner.java @@ -5,30 +5,36 @@ package com.azure.resourcemanager.dynatrace.fluent.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Response of payload to be passed while installing VM agent. */ +/** + * Response of payload to be passed while installing VM agent. + */ @Fluent -public final class VMExtensionPayloadInner { +public final class VMExtensionPayloadInner implements JsonSerializable { /* * Ingestion key of the environment */ - @JsonProperty(value = "ingestionKey") private String ingestionKey; /* * Id of the environment created */ - @JsonProperty(value = "environmentId") private String environmentId; - /** Creates an instance of VMExtensionPayloadInner class. */ + /** + * Creates an instance of VMExtensionPayloadInner class. + */ public VMExtensionPayloadInner() { } /** * Get the ingestionKey property: Ingestion key of the environment. - * + * * @return the ingestionKey value. */ public String ingestionKey() { @@ -37,7 +43,7 @@ public String ingestionKey() { /** * Set the ingestionKey property: Ingestion key of the environment. - * + * * @param ingestionKey the ingestionKey value to set. * @return the VMExtensionPayloadInner object itself. */ @@ -48,7 +54,7 @@ public VMExtensionPayloadInner withIngestionKey(String ingestionKey) { /** * Get the environmentId property: Id of the environment created. - * + * * @return the environmentId value. */ public String environmentId() { @@ -57,7 +63,7 @@ public String environmentId() { /** * Set the environmentId property: Id of the environment created. - * + * * @param environmentId the environmentId value to set. * @return the VMExtensionPayloadInner object itself. */ @@ -68,9 +74,48 @@ public VMExtensionPayloadInner withEnvironmentId(String environmentId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ingestionKey", this.ingestionKey); + jsonWriter.writeStringField("environmentId", this.environmentId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VMExtensionPayloadInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VMExtensionPayloadInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the VMExtensionPayloadInner. + */ + public static VMExtensionPayloadInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VMExtensionPayloadInner deserializedVMExtensionPayloadInner = new VMExtensionPayloadInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ingestionKey".equals(fieldName)) { + deserializedVMExtensionPayloadInner.ingestionKey = reader.getString(); + } else if ("environmentId".equals(fieldName)) { + deserializedVMExtensionPayloadInner.environmentId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVMExtensionPayloadInner; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/VMInfoInner.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/VMInfoInner.java index 6f54fb2c58e13..28a3bf4f62667 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/VMInfoInner.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/VMInfoInner.java @@ -5,77 +5,76 @@ package com.azure.resourcemanager.dynatrace.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.dynatrace.models.AutoUpdateSetting; import com.azure.resourcemanager.dynatrace.models.AvailabilityState; import com.azure.resourcemanager.dynatrace.models.LogModule; import com.azure.resourcemanager.dynatrace.models.MonitoringType; import com.azure.resourcemanager.dynatrace.models.UpdateStatus; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Details of VM Resource having Dynatrace OneAgent installed. */ +/** + * Details of VM Resource having Dynatrace OneAgent installed. + */ @Fluent -public final class VMInfoInner { +public final class VMInfoInner implements JsonSerializable { /* * Azure VM resource ID */ - @JsonProperty(value = "resourceId") private String resourceId; /* * Version of the Dynatrace agent installed on the VM. */ - @JsonProperty(value = "version") private String version; /* * The monitoring mode of OneAgent */ - @JsonProperty(value = "monitoringType") private MonitoringType monitoringType; /* * Update settings of OneAgent. */ - @JsonProperty(value = "autoUpdateSetting") private AutoUpdateSetting autoUpdateSetting; /* * The current update status of OneAgent. */ - @JsonProperty(value = "updateStatus") private UpdateStatus updateStatus; /* * The availability state of OneAgent. */ - @JsonProperty(value = "availabilityState") private AvailabilityState availabilityState; /* * Tells whether log modules are enabled or not */ - @JsonProperty(value = "logModule") private LogModule logModule; /* * The name of the host group */ - @JsonProperty(value = "hostGroup") private String hostGroup; /* * The name of the host */ - @JsonProperty(value = "hostName") private String hostname; - /** Creates an instance of VMInfoInner class. */ + /** + * Creates an instance of VMInfoInner class. + */ public VMInfoInner() { } /** * Get the resourceId property: Azure VM resource ID. - * + * * @return the resourceId value. */ public String resourceId() { @@ -84,7 +83,7 @@ public String resourceId() { /** * Set the resourceId property: Azure VM resource ID. - * + * * @param resourceId the resourceId value to set. * @return the VMInfoInner object itself. */ @@ -95,7 +94,7 @@ public VMInfoInner withResourceId(String resourceId) { /** * Get the version property: Version of the Dynatrace agent installed on the VM. - * + * * @return the version value. */ public String version() { @@ -104,7 +103,7 @@ public String version() { /** * Set the version property: Version of the Dynatrace agent installed on the VM. - * + * * @param version the version value to set. * @return the VMInfoInner object itself. */ @@ -115,7 +114,7 @@ public VMInfoInner withVersion(String version) { /** * Get the monitoringType property: The monitoring mode of OneAgent. - * + * * @return the monitoringType value. */ public MonitoringType monitoringType() { @@ -124,7 +123,7 @@ public MonitoringType monitoringType() { /** * Set the monitoringType property: The monitoring mode of OneAgent. - * + * * @param monitoringType the monitoringType value to set. * @return the VMInfoInner object itself. */ @@ -135,7 +134,7 @@ public VMInfoInner withMonitoringType(MonitoringType monitoringType) { /** * Get the autoUpdateSetting property: Update settings of OneAgent. - * + * * @return the autoUpdateSetting value. */ public AutoUpdateSetting autoUpdateSetting() { @@ -144,7 +143,7 @@ public AutoUpdateSetting autoUpdateSetting() { /** * Set the autoUpdateSetting property: Update settings of OneAgent. - * + * * @param autoUpdateSetting the autoUpdateSetting value to set. * @return the VMInfoInner object itself. */ @@ -155,7 +154,7 @@ public VMInfoInner withAutoUpdateSetting(AutoUpdateSetting autoUpdateSetting) { /** * Get the updateStatus property: The current update status of OneAgent. - * + * * @return the updateStatus value. */ public UpdateStatus updateStatus() { @@ -164,7 +163,7 @@ public UpdateStatus updateStatus() { /** * Set the updateStatus property: The current update status of OneAgent. - * + * * @param updateStatus the updateStatus value to set. * @return the VMInfoInner object itself. */ @@ -175,7 +174,7 @@ public VMInfoInner withUpdateStatus(UpdateStatus updateStatus) { /** * Get the availabilityState property: The availability state of OneAgent. - * + * * @return the availabilityState value. */ public AvailabilityState availabilityState() { @@ -184,7 +183,7 @@ public AvailabilityState availabilityState() { /** * Set the availabilityState property: The availability state of OneAgent. - * + * * @param availabilityState the availabilityState value to set. * @return the VMInfoInner object itself. */ @@ -195,7 +194,7 @@ public VMInfoInner withAvailabilityState(AvailabilityState availabilityState) { /** * Get the logModule property: Tells whether log modules are enabled or not. - * + * * @return the logModule value. */ public LogModule logModule() { @@ -204,7 +203,7 @@ public LogModule logModule() { /** * Set the logModule property: Tells whether log modules are enabled or not. - * + * * @param logModule the logModule value to set. * @return the VMInfoInner object itself. */ @@ -215,7 +214,7 @@ public VMInfoInner withLogModule(LogModule logModule) { /** * Get the hostGroup property: The name of the host group. - * + * * @return the hostGroup value. */ public String hostGroup() { @@ -224,7 +223,7 @@ public String hostGroup() { /** * Set the hostGroup property: The name of the host group. - * + * * @param hostGroup the hostGroup value to set. * @return the VMInfoInner object itself. */ @@ -235,7 +234,7 @@ public VMInfoInner withHostGroup(String hostGroup) { /** * Get the hostname property: The name of the host. - * + * * @return the hostname value. */ public String hostname() { @@ -244,7 +243,7 @@ public String hostname() { /** * Set the hostname property: The name of the host. - * + * * @param hostname the hostname value to set. * @return the VMInfoInner object itself. */ @@ -255,9 +254,72 @@ public VMInfoInner withHostname(String hostname) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + jsonWriter.writeStringField("version", this.version); + jsonWriter.writeStringField("monitoringType", + this.monitoringType == null ? null : this.monitoringType.toString()); + jsonWriter.writeStringField("autoUpdateSetting", + this.autoUpdateSetting == null ? null : this.autoUpdateSetting.toString()); + jsonWriter.writeStringField("updateStatus", this.updateStatus == null ? null : this.updateStatus.toString()); + jsonWriter.writeStringField("availabilityState", + this.availabilityState == null ? null : this.availabilityState.toString()); + jsonWriter.writeStringField("logModule", this.logModule == null ? null : this.logModule.toString()); + jsonWriter.writeStringField("hostGroup", this.hostGroup); + jsonWriter.writeStringField("hostName", this.hostname); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VMInfoInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VMInfoInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the VMInfoInner. + */ + public static VMInfoInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VMInfoInner deserializedVMInfoInner = new VMInfoInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedVMInfoInner.resourceId = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedVMInfoInner.version = reader.getString(); + } else if ("monitoringType".equals(fieldName)) { + deserializedVMInfoInner.monitoringType = MonitoringType.fromString(reader.getString()); + } else if ("autoUpdateSetting".equals(fieldName)) { + deserializedVMInfoInner.autoUpdateSetting = AutoUpdateSetting.fromString(reader.getString()); + } else if ("updateStatus".equals(fieldName)) { + deserializedVMInfoInner.updateStatus = UpdateStatus.fromString(reader.getString()); + } else if ("availabilityState".equals(fieldName)) { + deserializedVMInfoInner.availabilityState = AvailabilityState.fromString(reader.getString()); + } else if ("logModule".equals(fieldName)) { + deserializedVMInfoInner.logModule = LogModule.fromString(reader.getString()); + } else if ("hostGroup".equals(fieldName)) { + deserializedVMInfoInner.hostGroup = reader.getString(); + } else if ("hostName".equals(fieldName)) { + deserializedVMInfoInner.hostname = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVMInfoInner; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/package-info.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/package-info.java index 9d36a27e190f7..798137b01a42c 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/package-info.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the inner data models for DynatraceObservability. null. */ +/** + * Package containing the inner data models for DynatraceObservability. + * null. + */ package com.azure.resourcemanager.dynatrace.fluent.models; diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/package-info.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/package-info.java index 205eb4e7b5333..a7fb99f963886 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/package-info.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/fluent/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the service clients for DynatraceObservability. null. */ +/** + * Package containing the service clients for DynatraceObservability. + * null. + */ package com.azure.resourcemanager.dynatrace.fluent; diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/DynatraceObservabilityBuilder.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/DynatraceObservabilityBuilder.java index 06170e0dc195d..d21876f9c5f9d 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/DynatraceObservabilityBuilder.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/DynatraceObservabilityBuilder.java @@ -14,7 +14,9 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the DynatraceObservabilityImpl type. */ +/** + * A builder for creating a new instance of the DynatraceObservabilityImpl type. + */ @ServiceClientBuilder(serviceClients = { DynatraceObservabilityImpl.class }) public final class DynatraceObservabilityBuilder { /* @@ -24,7 +26,7 @@ public final class DynatraceObservabilityBuilder { /** * Sets The ID of the target subscription. - * + * * @param subscriptionId the subscriptionId value. * @return the DynatraceObservabilityBuilder. */ @@ -40,7 +42,7 @@ public DynatraceObservabilityBuilder subscriptionId(String subscriptionId) { /** * Sets server parameter. - * + * * @param endpoint the endpoint value. * @return the DynatraceObservabilityBuilder. */ @@ -56,7 +58,7 @@ public DynatraceObservabilityBuilder endpoint(String endpoint) { /** * Sets The environment to connect to. - * + * * @param environment the environment value. * @return the DynatraceObservabilityBuilder. */ @@ -72,7 +74,7 @@ public DynatraceObservabilityBuilder environment(AzureEnvironment environment) { /** * Sets The HTTP pipeline to send requests through. - * + * * @param pipeline the pipeline value. * @return the DynatraceObservabilityBuilder. */ @@ -88,7 +90,7 @@ public DynatraceObservabilityBuilder pipeline(HttpPipeline pipeline) { /** * Sets The default poll interval for long-running operation. - * + * * @param defaultPollInterval the defaultPollInterval value. * @return the DynatraceObservabilityBuilder. */ @@ -104,7 +106,7 @@ public DynatraceObservabilityBuilder defaultPollInterval(Duration defaultPollInt /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the DynatraceObservabilityBuilder. */ @@ -115,7 +117,7 @@ public DynatraceObservabilityBuilder serializerAdapter(SerializerAdapter seriali /** * Builds an instance of DynatraceObservabilityImpl with the provided parameters. - * + * * @return an instance of DynatraceObservabilityImpl. */ public DynatraceObservabilityImpl buildClient() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/DynatraceObservabilityImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/DynatraceObservabilityImpl.java index 0a8c2f57880ea..44ab05081d9fd 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/DynatraceObservabilityImpl.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/DynatraceObservabilityImpl.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.dynatrace.implementation; import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpResponse; @@ -36,123 +37,145 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the DynatraceObservabilityImpl type. */ +/** + * Initializes a new instance of the DynatraceObservabilityImpl type. + */ @ServiceClient(builder = DynatraceObservabilityBuilder.class) public final class DynatraceObservabilityImpl implements DynatraceObservability { - /** The ID of the target subscription. */ + /** + * The ID of the target subscription. + */ private final String subscriptionId; /** * Gets The ID of the target subscription. - * + * * @return the subscriptionId value. */ public String getSubscriptionId() { return this.subscriptionId; } - /** server parameter. */ + /** + * server parameter. + */ private final String endpoint; /** * Gets server parameter. - * + * * @return the endpoint value. */ public String getEndpoint() { return this.endpoint; } - /** Api Version. */ + /** + * Api Version. + */ private final String apiVersion; /** * Gets Api Version. - * + * * @return the apiVersion value. */ public String getApiVersion() { return this.apiVersion; } - /** The HTTP pipeline to send requests through. */ + /** + * The HTTP pipeline to send requests through. + */ private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The serializer to serialize an object into a string. */ + /** + * The serializer to serialize an object into a string. + */ private final SerializerAdapter serializerAdapter; /** * Gets The serializer to serialize an object into a string. - * + * * @return the serializerAdapter value. */ SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** The default poll interval for long-running operation. */ + /** + * The default poll interval for long-running operation. + */ private final Duration defaultPollInterval; /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The MonitorsClient object to access its operations. */ + /** + * The MonitorsClient object to access its operations. + */ private final MonitorsClient monitors; /** * Gets the MonitorsClient object to access its operations. - * + * * @return the MonitorsClient object. */ public MonitorsClient getMonitors() { return this.monitors; } - /** The OperationsClient object to access its operations. */ + /** + * The OperationsClient object to access its operations. + */ private final OperationsClient operations; /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ public OperationsClient getOperations() { return this.operations; } - /** The TagRulesClient object to access its operations. */ + /** + * The TagRulesClient object to access its operations. + */ private final TagRulesClient tagRules; /** * Gets the TagRulesClient object to access its operations. - * + * * @return the TagRulesClient object. */ public TagRulesClient getTagRules() { return this.tagRules; } - /** The SingleSignOnsClient object to access its operations. */ + /** + * The SingleSignOnsClient object to access its operations. + */ private final SingleSignOnsClient singleSignOns; /** * Gets the SingleSignOnsClient object to access its operations. - * + * * @return the SingleSignOnsClient object. */ public SingleSignOnsClient getSingleSignOns() { @@ -161,7 +184,7 @@ public SingleSignOnsClient getSingleSignOns() { /** * Initializes an instance of DynatraceObservability client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. @@ -185,7 +208,7 @@ public SingleSignOnsClient getSingleSignOns() { /** * Gets default client context. - * + * * @return the default client context. */ public Context getContext() { @@ -194,7 +217,7 @@ public Context getContext() { /** * Merges default client context with provided context. - * + * * @param context the context to be merged with default client context. * @return the merged context. */ @@ -204,7 +227,7 @@ public Context mergeContext(Context context) { /** * Gets long running operation result. - * + * * @param activationResponse the response of activation operation. * @param httpPipeline the http pipeline. * @param pollResultType type of poll result. @@ -222,7 +245,7 @@ public PollerFlux, U> getLroResult(Mono type of poll result. * @param type of final result. @@ -285,7 +308,7 @@ public int getStatusCode() { } public String getHeaderValue(String s) { - return httpHeaders.getValue(s); + return httpHeaders.getValue(HttpHeaderName.fromString(s)); } public HttpHeaders getHeaders() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/DynatraceSingleSignOnResourceImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/DynatraceSingleSignOnResourceImpl.java index 20e8e6706a3ec..ccafb00fc6804 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/DynatraceSingleSignOnResourceImpl.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/DynatraceSingleSignOnResourceImpl.java @@ -127,9 +127,10 @@ public DynatraceSingleSignOnResource apply(Context context) { com.azure.resourcemanager.dynatrace.DynatraceManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.monitorName = Utils.getValueFromIdByName(innerObject.id(), "monitors"); - this.configurationName = Utils.getValueFromIdByName(innerObject.id(), "singleSignOnConfigurations"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.monitorName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "monitors"); + this.configurationName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "singleSignOnConfigurations"); } public DynatraceSingleSignOnResource refresh() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorResourceImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorResourceImpl.java index f47b8190b7f28..29037f0c59900 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorResourceImpl.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorResourceImpl.java @@ -178,8 +178,8 @@ public MonitorResource apply(Context context) { com.azure.resourcemanager.dynatrace.DynatraceManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.monitorName = Utils.getValueFromIdByName(innerObject.id(), "monitors"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.monitorName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "monitors"); } public MonitorResource refresh() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorsClientImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorsClientImpl.java index 5bfb9afc112a1..e4864f0db145d 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorsClientImpl.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorsClientImpl.java @@ -56,17 +56,23 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in MonitorsClient. */ +/** + * An instance of this class provides access to all the operations defined in MonitorsClient. + */ public final class MonitorsClientImpl implements MonitorsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final MonitorsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DynatraceObservabilityImpl client; /** * Initializes an instance of MonitorsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ MonitorsClientImpl(DynatraceObservabilityImpl client) { @@ -264,14 +270,14 @@ Mono> listLinkableEnvironmentsNext( /** * List the resources currently being monitored by the Dynatrace monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all the resources being monitored by Dynatrace monitor resource along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listMonitoredResourcesSinglePageAsync(String resourceGroupName, @@ -303,7 +309,7 @@ private Mono> listMonitoredResourcesSingle /** * List the resources currently being monitored by the Dynatrace monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -311,7 +317,7 @@ private Mono> listMonitoredResourcesSingle * @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 list of all the resources being monitored by Dynatrace monitor resource along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listMonitoredResourcesSinglePageAsync(String resourceGroupName, @@ -342,14 +348,14 @@ private Mono> listMonitoredResourcesSingle /** * List the resources currently being monitored by the Dynatrace monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the resources being monitored by Dynatrace monitor resource as paginated response with {@link - * PagedFlux}. + * @return list of all the resources being monitored by Dynatrace monitor resource as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listMonitoredResourcesAsync(String resourceGroupName, @@ -360,15 +366,15 @@ private PagedFlux listMonitoredResourcesAsync(String res /** * List the resources currently being monitored by the Dynatrace monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the resources being monitored by Dynatrace monitor resource as paginated response with {@link - * PagedFlux}. + * @return list of all the resources being monitored by Dynatrace monitor resource as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listMonitoredResourcesAsync(String resourceGroupName, String monitorName, @@ -379,14 +385,14 @@ private PagedFlux listMonitoredResourcesAsync(String res /** * List the resources currently being monitored by the Dynatrace monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the resources being monitored by Dynatrace monitor resource as paginated response with {@link - * PagedIterable}. + * @return list of all the resources being monitored by Dynatrace monitor resource as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName) { @@ -395,15 +401,15 @@ public PagedIterable listMonitoredResources(String resou /** * List the resources currently being monitored by the Dynatrace monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the resources being monitored by Dynatrace monitor resource as paginated response with {@link - * PagedIterable}. + * @return list of all the resources being monitored by Dynatrace monitor resource as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, @@ -413,14 +419,14 @@ public PagedIterable listMonitoredResources(String resou /** * Returns the payload that needs to be passed in the request body for installing Dynatrace agent on a VM. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of payload to be passed while installing VM agent along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getVMHostPayloadWithResponseAsync(String resourceGroupName, @@ -449,7 +455,7 @@ private Mono> getVMHostPayloadWithResponseAsyn /** * Returns the payload that needs to be passed in the request body for installing Dynatrace agent on a VM. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -457,7 +463,7 @@ private Mono> getVMHostPayloadWithResponseAsyn * @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 payload to be passed while installing VM agent along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getVMHostPayloadWithResponseAsync(String resourceGroupName, @@ -485,7 +491,7 @@ private Mono> getVMHostPayloadWithResponseAsyn /** * Returns the payload that needs to be passed in the request body for installing Dynatrace agent on a VM. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -501,7 +507,7 @@ private Mono getVMHostPayloadAsync(String resourceGroup /** * Returns the payload that needs to be passed in the request body for installing Dynatrace agent on a VM. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -518,7 +524,7 @@ public Response getVMHostPayloadWithResponse(String res /** * Returns the payload that needs to be passed in the request body for installing Dynatrace agent on a VM. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -533,7 +539,7 @@ public VMExtensionPayloadInner getVMHostPayload(String resourceGroupName, String /** * Get a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -568,7 +574,7 @@ private Mono> getByResourceGroupWithResponseAsync /** * Get a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -603,7 +609,7 @@ private Mono> getByResourceGroupWithResponseAsync /** * Get a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -619,7 +625,7 @@ private Mono getByResourceGroupAsync(String resourceGroupN /** * Get a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -636,7 +642,7 @@ public Response getByResourceGroupWithResponse(String reso /** * Get a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -651,7 +657,7 @@ public MonitorResourceInner getByResourceGroup(String resourceGroupName, String /** * Create a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource Resource create parameters. @@ -692,7 +698,7 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Create a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource Resource create parameters. @@ -733,7 +739,7 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Create a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource Resource create parameters. @@ -753,7 +759,7 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Create a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource Resource create parameters. @@ -775,7 +781,7 @@ private PollerFlux, MonitorResourceInner> begin /** * Create a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource Resource create parameters. @@ -792,7 +798,7 @@ private PollerFlux, MonitorResourceInner> begin /** * Create a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource Resource create parameters. @@ -810,7 +816,7 @@ public SyncPoller, MonitorResourceInner> beginC /** * Create a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource Resource create parameters. @@ -828,7 +834,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, /** * Create a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource Resource create parameters. @@ -847,7 +853,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, /** * Create a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource Resource create parameters. @@ -864,7 +870,7 @@ public MonitorResourceInner createOrUpdate(String resourceGroupName, String moni /** * Create a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource Resource create parameters. @@ -882,7 +888,7 @@ public MonitorResourceInner createOrUpdate(String resourceGroupName, String moni /** * Update a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource The resource properties to be updated. @@ -923,7 +929,7 @@ private Mono> updateWithResponseAsync(String reso /** * Update a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource The resource properties to be updated. @@ -964,7 +970,7 @@ private Mono> updateWithResponseAsync(String reso /** * Update a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource The resource properties to be updated. @@ -982,7 +988,7 @@ private Mono updateAsync(String resourceGroupName, String /** * Update a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource The resource properties to be updated. @@ -1000,7 +1006,7 @@ public Response updateWithResponse(String resourceGroupNam /** * Update a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param resource The resource properties to be updated. @@ -1016,7 +1022,7 @@ public MonitorResourceInner update(String resourceGroupName, String monitorName, /** * Delete a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1050,7 +1056,7 @@ private Mono>> deleteWithResponseAsync(String resource /** * Delete a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -1085,7 +1091,7 @@ private Mono>> deleteWithResponseAsync(String resource /** * Delete a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1102,7 +1108,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Delete a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -1122,7 +1128,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Delete a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1137,7 +1143,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Delete a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -1154,7 +1160,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Delete a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1169,7 +1175,7 @@ private Mono deleteAsync(String resourceGroupName, String monitorName) { /** * Delete a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -1186,7 +1192,7 @@ private Mono deleteAsync(String resourceGroupName, String monitorName, Con /** * Delete a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1200,7 +1206,7 @@ public void delete(String resourceGroupName, String monitorName) { /** * Delete a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -1215,11 +1221,11 @@ public void delete(String resourceGroupName, String monitorName, Context context /** * List all MonitorResource by subscriptionId. - * + * * @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 of a MonitorResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -1242,13 +1248,13 @@ private Mono> listSinglePageAsync() { /** * List all MonitorResource by subscriptionId. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a MonitorResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -1271,7 +1277,7 @@ private Mono> listSinglePageAsync(Context co /** * List all MonitorResource by subscriptionId. - * + * * @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 of a MonitorResource list operation as paginated response with {@link PagedFlux}. @@ -1284,7 +1290,7 @@ private PagedFlux listAsync() { /** * List all MonitorResource by subscriptionId. - * + * * @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. @@ -1299,7 +1305,7 @@ private PagedFlux listAsync(Context context) { /** * List all MonitorResource by subscriptionId. - * + * * @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 of a MonitorResource list operation as paginated response with {@link PagedIterable}. @@ -1311,7 +1317,7 @@ public PagedIterable list() { /** * List all MonitorResource by subscriptionId. - * + * * @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. @@ -1325,13 +1331,13 @@ public PagedIterable list(Context context) { /** * List MonitorResource resources by resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 of a MonitorResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { @@ -1358,14 +1364,14 @@ private Mono> listByResourceGroupSinglePageA /** * List MonitorResource resources by resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a MonitorResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, @@ -1393,7 +1399,7 @@ private Mono> listByResourceGroupSinglePageA /** * List MonitorResource resources by resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1408,7 +1414,7 @@ private PagedFlux listByResourceGroupAsync(String resource /** * List MonitorResource resources by resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1424,7 +1430,7 @@ private PagedFlux listByResourceGroupAsync(String resource /** * List MonitorResource resources by resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1438,7 +1444,7 @@ public PagedIterable listByResourceGroup(String resourceGr /** * List MonitorResource resources by resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1453,14 +1459,14 @@ public PagedIterable listByResourceGroup(String resourceGr /** * Get Marketplace SaaS resource details of a tenant under a specific subscription. - * + * * @param request Tenant Id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return marketplace SaaS resource details of a tenant under a specific subscription along with {@link Response} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -1487,7 +1493,7 @@ public PagedIterable listByResourceGroup(String resourceGr /** * Get Marketplace SaaS resource details of a tenant under a specific subscription. - * + * * @param request Tenant Id. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1495,7 +1501,7 @@ public PagedIterable listByResourceGroup(String resourceGr * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return marketplace SaaS resource details of a tenant under a specific subscription along with {@link Response} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -1522,14 +1528,14 @@ public PagedIterable listByResourceGroup(String resourceGr /** * Get Marketplace SaaS resource details of a tenant under a specific subscription. - * + * * @param request Tenant Id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return marketplace SaaS resource details of a tenant under a specific subscription on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono @@ -1540,7 +1546,7 @@ public PagedIterable listByResourceGroup(String resourceGr /** * Get Marketplace SaaS resource details of a tenant under a specific subscription. - * + * * @param request Tenant Id. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1557,7 +1563,7 @@ public PagedIterable listByResourceGroup(String resourceGr /** * Get Marketplace SaaS resource details of a tenant under a specific subscription. - * + * * @param request Tenant Id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1573,14 +1579,14 @@ public PagedIterable listByResourceGroup(String resourceGr /** * List the VM/VMSS resources currently being monitored by the Dynatrace resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list VM Host Operation along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return response of a list VM Host Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listHostsSinglePageAsync(String resourceGroupName, String monitorName) { @@ -1610,15 +1616,15 @@ private Mono> listHostsSinglePageAsync(String resourc /** * List the VM/VMSS resources currently being monitored by the Dynatrace resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list VM Host Operation along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return response of a list VM Host Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listHostsSinglePageAsync(String resourceGroupName, String monitorName, @@ -1649,7 +1655,7 @@ private Mono> listHostsSinglePageAsync(String resourc /** * List the VM/VMSS resources currently being monitored by the Dynatrace resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1665,7 +1671,7 @@ private PagedFlux listHostsAsync(String resourceGroupName, String m /** * List the VM/VMSS resources currently being monitored by the Dynatrace resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -1682,7 +1688,7 @@ private PagedFlux listHostsAsync(String resourceGroupName, String m /** * List the VM/VMSS resources currently being monitored by the Dynatrace resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1697,7 +1703,7 @@ public PagedIterable listHosts(String resourceGroupName, String mon /** * List the VM/VMSS resources currently being monitored by the Dynatrace resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -1713,7 +1719,7 @@ public PagedIterable listHosts(String resourceGroupName, String mon /** * Get metric status. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitor resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1748,7 +1754,7 @@ private Mono> getMetricStatusWithResponseAs /** * Get metric status. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitor resource. * @param context The context to associate with this operation. @@ -1783,7 +1789,7 @@ private Mono> getMetricStatusWithResponseAs /** * Get metric status. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitor resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1799,7 +1805,7 @@ private Mono getMetricStatusAsync(String resourceGro /** * Get metric status. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitor resource. * @param context The context to associate with this operation. @@ -1816,7 +1822,7 @@ public Response getMetricStatusWithResponse(String r /** * Get metric status. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitor resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1831,14 +1837,14 @@ public MetricsStatusResponseInner getMetricStatus(String resourceGroupName, Stri /** * Gets list of App Services with Dynatrace PaaS OneAgent enabled. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of App Services with Dynatrace PaaS OneAgent enabled along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAppServicesSinglePageAsync(String resourceGroupName, @@ -1869,7 +1875,7 @@ private Mono> listAppServicesSinglePageAsync( /** * Gets list of App Services with Dynatrace PaaS OneAgent enabled. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -1877,7 +1883,7 @@ private Mono> listAppServicesSinglePageAsync( * @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 list of App Services with Dynatrace PaaS OneAgent enabled along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAppServicesSinglePageAsync(String resourceGroupName, @@ -1908,7 +1914,7 @@ private Mono> listAppServicesSinglePageAsync( /** * Gets list of App Services with Dynatrace PaaS OneAgent enabled. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1924,7 +1930,7 @@ private PagedFlux listAppServicesAsync(String resourceGroup /** * Gets list of App Services with Dynatrace PaaS OneAgent enabled. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -1942,14 +1948,14 @@ private PagedFlux listAppServicesAsync(String resourceGroup /** * Gets list of App Services with Dynatrace PaaS OneAgent enabled. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of App Services with Dynatrace PaaS OneAgent enabled as paginated response with {@link - * PagedIterable}. + * @return list of App Services with Dynatrace PaaS OneAgent enabled as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listAppServices(String resourceGroupName, String monitorName) { @@ -1958,15 +1964,15 @@ public PagedIterable listAppServices(String resourceGroupNa /** * Gets list of App Services with Dynatrace PaaS OneAgent enabled. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of App Services with Dynatrace PaaS OneAgent enabled as paginated response with {@link - * PagedIterable}. + * @return list of App Services with Dynatrace PaaS OneAgent enabled as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listAppServices(String resourceGroupName, String monitorName, @@ -1976,7 +1982,7 @@ public PagedIterable listAppServices(String resourceGroupNa /** * Gets the SSO configuration details from the partner. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param request The details of the get sso details request. @@ -1985,7 +1991,7 @@ public PagedIterable listAppServices(String resourceGroupNa * @throws ManagementException thrown if the request is rejected by server on status code 401. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the SSO configuration details from the partner along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getSsoDetailsWithResponseAsync(String resourceGroupName, @@ -2017,7 +2023,7 @@ private Mono> getSsoDetailsWithResponseAsync(S /** * Gets the SSO configuration details from the partner. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param request The details of the get sso details request. @@ -2027,7 +2033,7 @@ private Mono> getSsoDetailsWithResponseAsync(S * @throws ManagementException thrown if the request is rejected by server on status code 401. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the SSO configuration details from the partner along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getSsoDetailsWithResponseAsync(String resourceGroupName, @@ -2058,7 +2064,7 @@ private Mono> getSsoDetailsWithResponseAsync(S /** * Gets the SSO configuration details from the partner. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2076,7 +2082,7 @@ private Mono getSsoDetailsAsync(String resourceGroupNam /** * Gets the SSO configuration details from the partner. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param request The details of the get sso details request. @@ -2095,7 +2101,7 @@ public Response getSsoDetailsWithResponse(String resour /** * Gets the SSO configuration details from the partner. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2112,7 +2118,7 @@ public SsoDetailsResponseInner getSsoDetails(String resourceGroupName, String mo /** * Gets all the Dynatrace environments that a user can link a azure resource to. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param request The details of the linkable environment request. @@ -2120,7 +2126,7 @@ public SsoDetailsResponseInner getSsoDetails(String resourceGroupName, String mo * @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 all the Dynatrace environments that a user can link a azure resource to along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listLinkableEnvironmentsSinglePageAsync( @@ -2157,7 +2163,7 @@ private Mono> listLinkableEnviro /** * Gets all the Dynatrace environments that a user can link a azure resource to. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param request The details of the linkable environment request. @@ -2166,7 +2172,7 @@ private Mono> listLinkableEnviro * @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 all the Dynatrace environments that a user can link a azure resource to along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listLinkableEnvironmentsSinglePageAsync( @@ -2202,15 +2208,15 @@ private Mono> listLinkableEnviro /** * Gets all the Dynatrace environments that a user can link a azure resource to. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param request The details of the linkable environment request. * @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 all the Dynatrace environments that a user can link a azure resource to as paginated response with {@link - * PagedFlux}. + * @return all the Dynatrace environments that a user can link a azure resource to as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listLinkableEnvironmentsAsync(String resourceGroupName, @@ -2221,7 +2227,7 @@ private PagedFlux listLinkableEnvironmentsAsyn /** * Gets all the Dynatrace environments that a user can link a azure resource to. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param request The details of the linkable environment request. @@ -2229,8 +2235,8 @@ private PagedFlux listLinkableEnvironmentsAsyn * @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 all the Dynatrace environments that a user can link a azure resource to as paginated response with {@link - * PagedFlux}. + * @return all the Dynatrace environments that a user can link a azure resource to as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listLinkableEnvironmentsAsync(String resourceGroupName, @@ -2242,15 +2248,15 @@ private PagedFlux listLinkableEnvironmentsAsyn /** * Gets all the Dynatrace environments that a user can link a azure resource to. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param request The details of the linkable environment request. * @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 all the Dynatrace environments that a user can link a azure resource to as paginated response with {@link - * PagedIterable}. + * @return all the Dynatrace environments that a user can link a azure resource to as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listLinkableEnvironments(String resourceGroupName, @@ -2260,7 +2266,7 @@ public PagedIterable listLinkableEnvironments( /** * Gets all the Dynatrace environments that a user can link a azure resource to. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param request The details of the linkable environment request. @@ -2268,8 +2274,8 @@ public PagedIterable listLinkableEnvironments( * @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 all the Dynatrace environments that a user can link a azure resource to as paginated response with {@link - * PagedIterable}. + * @return all the Dynatrace environments that a user can link a azure resource to as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listLinkableEnvironments(String resourceGroupName, @@ -2279,14 +2285,13 @@ public PagedIterable listLinkableEnvironments( /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all the resources being monitored by Dynatrace monitor resource along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listMonitoredResourcesNextSinglePageAsync(String nextLink) { @@ -2308,15 +2313,14 @@ private Mono> listMonitoredResourcesNextSi /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of all the resources being monitored by Dynatrace monitor resource along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listMonitoredResourcesNextSinglePageAsync(String nextLink, @@ -2337,14 +2341,13 @@ private Mono> listMonitoredResourcesNextSi /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a MonitorResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionIdNextSinglePageAsync(String nextLink) { @@ -2366,15 +2369,14 @@ private Mono> listBySubscriptionIdNextSingle /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a MonitorResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionIdNextSinglePageAsync(String nextLink, @@ -2395,14 +2397,13 @@ private Mono> listBySubscriptionIdNextSingle /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a MonitorResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -2424,15 +2425,14 @@ private Mono> listByResourceGroupNextSingleP /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a MonitorResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, @@ -2453,14 +2453,13 @@ private Mono> listByResourceGroupNextSingleP /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list VM Host Operation along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return response of a list VM Host Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listHostsNextSinglePageAsync(String nextLink) { @@ -2481,15 +2480,14 @@ private Mono> listHostsNextSinglePageAsync(String nex /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response of a list VM Host Operation along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return response of a list VM Host Operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listHostsNextSinglePageAsync(String nextLink, Context context) { @@ -2509,14 +2507,13 @@ private Mono> listHostsNextSinglePageAsync(String nex /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of a list App Services Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAppServicesNextSinglePageAsync(String nextLink) { @@ -2537,15 +2534,14 @@ private Mono> listAppServicesNextSinglePageAs /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of a list App Services Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAppServicesNextSinglePageAsync(String nextLink, @@ -2566,14 +2562,13 @@ private Mono> listAppServicesNextSinglePageAs /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response for getting all the linkable environments along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -2596,15 +2591,14 @@ private Mono> listAppServicesNextSinglePageAs /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response for getting all the linkable environments along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorsImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorsImpl.java index 6d49f34b954ac..d7e3be632d2d1 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorsImpl.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/MonitorsImpl.java @@ -49,14 +49,14 @@ public MonitorsImpl(MonitorsClient innerClient, public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName) { PagedIterable inner = this.serviceClient().listMonitoredResources(resourceGroupName, monitorName); - return Utils.mapPage(inner, inner1 -> new MonitoredResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MonitoredResourceImpl(inner1, this.manager())); } public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, Context context) { PagedIterable inner = this.serviceClient().listMonitoredResources(resourceGroupName, monitorName, context); - return Utils.mapPage(inner, inner1 -> new MonitoredResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MonitoredResourceImpl(inner1, this.manager())); } public Response getVMHostPayloadWithResponse(String resourceGroupName, String monitorName, @@ -111,23 +111,23 @@ public void delete(String resourceGroupName, String monitorName, Context context public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new MonitorResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MonitorResourceImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new MonitorResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MonitorResourceImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new MonitorResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MonitorResourceImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new MonitorResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MonitorResourceImpl(inner1, this.manager())); } public Response @@ -155,12 +155,12 @@ public PagedIterable listByResourceGroup(String resourceGroupNa public PagedIterable listHosts(String resourceGroupName, String monitorName) { PagedIterable inner = this.serviceClient().listHosts(resourceGroupName, monitorName); - return Utils.mapPage(inner, inner1 -> new VMInfoImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VMInfoImpl(inner1, this.manager())); } public PagedIterable listHosts(String resourceGroupName, String monitorName, Context context) { PagedIterable inner = this.serviceClient().listHosts(resourceGroupName, monitorName, context); - return Utils.mapPage(inner, inner1 -> new VMInfoImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new VMInfoImpl(inner1, this.manager())); } public Response getMetricStatusWithResponse(String resourceGroupName, String monitorName, @@ -186,14 +186,14 @@ public MetricsStatusResponse getMetricStatus(String resourceGroupName, String mo public PagedIterable listAppServices(String resourceGroupName, String monitorName) { PagedIterable inner = this.serviceClient().listAppServices(resourceGroupName, monitorName); - return Utils.mapPage(inner, inner1 -> new AppServiceInfoImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AppServiceInfoImpl(inner1, this.manager())); } public PagedIterable listAppServices(String resourceGroupName, String monitorName, Context context) { PagedIterable inner = this.serviceClient().listAppServices(resourceGroupName, monitorName, context); - return Utils.mapPage(inner, inner1 -> new AppServiceInfoImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AppServiceInfoImpl(inner1, this.manager())); } public Response getSsoDetailsWithResponse(String resourceGroupName, String monitorName, @@ -221,23 +221,25 @@ public PagedIterable listLinkableEnvironments(Strin String monitorName, LinkableEnvironmentRequest request) { PagedIterable inner = this.serviceClient().listLinkableEnvironments(resourceGroupName, monitorName, request); - return Utils.mapPage(inner, inner1 -> new LinkableEnvironmentResponseImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new LinkableEnvironmentResponseImpl(inner1, this.manager())); } public PagedIterable listLinkableEnvironments(String resourceGroupName, String monitorName, LinkableEnvironmentRequest request, Context context) { PagedIterable inner = this.serviceClient().listLinkableEnvironments(resourceGroupName, monitorName, request, context); - return Utils.mapPage(inner, inner1 -> new LinkableEnvironmentResponseImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new LinkableEnvironmentResponseImpl(inner1, this.manager())); } public MonitorResource getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String monitorName = Utils.getValueFromIdByName(id, "monitors"); + String monitorName = ResourceManagerUtils.getValueFromIdByName(id, "monitors"); if (monitorName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); @@ -246,12 +248,12 @@ public MonitorResource getById(String id) { } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String monitorName = Utils.getValueFromIdByName(id, "monitors"); + String monitorName = ResourceManagerUtils.getValueFromIdByName(id, "monitors"); if (monitorName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); @@ -260,12 +262,12 @@ public Response getByIdWithResponse(String id, Context context) } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String monitorName = Utils.getValueFromIdByName(id, "monitors"); + String monitorName = ResourceManagerUtils.getValueFromIdByName(id, "monitors"); if (monitorName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); @@ -274,12 +276,12 @@ public void deleteById(String id) { } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String monitorName = Utils.getValueFromIdByName(id, "monitors"); + String monitorName = ResourceManagerUtils.getValueFromIdByName(id, "monitors"); if (monitorName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/OperationsClientImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/OperationsClientImpl.java index fe890770885c7..424da59cc9c5c 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/OperationsClientImpl.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/OperationsClientImpl.java @@ -30,17 +30,23 @@ import com.azure.resourcemanager.dynatrace.models.OperationListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public final class OperationsClientImpl implements OperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DynatraceObservabilityImpl client; /** * Initializes an instance of OperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OperationsClientImpl(DynatraceObservabilityImpl client) { @@ -73,11 +79,11 @@ Mono> listNext(@PathParam(value = "nextLink", enco /** * List the operations for Dynatrace.Observability. - * + * * @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 list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -96,13 +102,13 @@ private Mono> listSinglePageAsync() { /** * List the operations for Dynatrace.Observability. - * + * * @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 a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -119,11 +125,11 @@ private Mono> listSinglePageAsync(Context context) /** * List the operations for Dynatrace.Observability. - * + * * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -132,13 +138,13 @@ private PagedFlux listAsync() { /** * List the operations for Dynatrace.Observability. - * + * * @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 a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -148,11 +154,11 @@ private PagedFlux listAsync(Context context) { /** * List the operations for Dynatrace.Observability. - * + * * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -161,13 +167,13 @@ public PagedIterable list() { /** * List the operations for Dynatrace.Observability. - * + * * @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 a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -176,14 +182,13 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -203,15 +208,14 @@ private Mono> listNextSinglePageAsync(String nextL /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/OperationsImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/OperationsImpl.java index 7f84932d48d43..3ca03216d9cc0 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/OperationsImpl.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/OperationsImpl.java @@ -27,12 +27,12 @@ public OperationsImpl(OperationsClient innerClient, public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } private OperationsClient serviceClient() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/Utils.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/ResourceManagerUtils.java similarity index 88% rename from sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/Utils.java rename to sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/ResourceManagerUtils.java index 7b23f54e1d171..c3620927a8e16 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/Utils.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/ResourceManagerUtils.java @@ -19,7 +19,10 @@ import java.util.stream.Stream; import reactor.core.publisher.Flux; -final class Utils { +final class ResourceManagerUtils { + private ResourceManagerUtils() { + } + static String getValueFromIdByName(String id, String name) { if (id == null) { return null; @@ -60,7 +63,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri segments.add(idSegment); idItrReverted.forEachRemaining(segments::add); Collections.reverse(segments); - if (segments.size() > 0 && segments.get(0).isEmpty()) { + if (!segments.isEmpty() && segments.get(0).isEmpty()) { segments.remove(0); } return String.join("/", segments); @@ -74,7 +77,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl(pageIterable, mapper); + return new PagedIterableImpl<>(pageIterable, mapper); } private static final class PagedIterableImpl extends PagedIterable { @@ -124,30 +127,27 @@ public Stream> streamByPage(String continuationToken, int prefe @Override public Iterator iterator() { - return new IteratorImpl(pagedIterable.iterator(), mapper); + return new IteratorImpl<>(pagedIterable.iterator(), mapper); } @Override public Iterable> iterableByPage() { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(continuationToken), - pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); } @Override public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(preferredPageSize), - pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); } } @@ -189,7 +189,7 @@ private IterableImpl(Iterable iterable, Function mapper) { @Override public Iterator iterator() { - return new IteratorImpl(iterable.iterator(), mapper); + return new IteratorImpl<>(iterable.iterator(), mapper); } } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/SingleSignOnsClientImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/SingleSignOnsClientImpl.java index da7cb75b2acbd..8292b9369c555 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/SingleSignOnsClientImpl.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/SingleSignOnsClientImpl.java @@ -37,17 +37,23 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SingleSignOnsClient. */ +/** + * An instance of this class provides access to all the operations defined in SingleSignOnsClient. + */ public final class SingleSignOnsClientImpl implements SingleSignOnsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SingleSignOnsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DynatraceObservabilityImpl client; /** * Initializes an instance of SingleSignOnsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SingleSignOnsClientImpl(DynatraceObservabilityImpl client) { @@ -104,7 +110,7 @@ Mono> listNext( /** * Create a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -113,7 +119,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 single sign-on configurations for a given monitor resource along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, @@ -152,7 +158,7 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Create a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -162,7 +168,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * @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 single sign-on configurations for a given monitor resource along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, @@ -200,7 +206,7 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Create a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -223,7 +229,7 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Create a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -248,7 +254,7 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Create a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -268,7 +274,7 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Create a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -289,7 +295,7 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Create a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -308,7 +314,7 @@ private Mono createOrUpdateAsync(String reso /** * Create a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -328,7 +334,7 @@ private Mono createOrUpdateAsync(String reso /** * Create a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -346,7 +352,7 @@ public DynatraceSingleSignOnResourceInner createOrUpdate(String resourceGroupNam /** * Create a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -365,7 +371,7 @@ public DynatraceSingleSignOnResourceInner createOrUpdate(String resourceGroupNam /** * Get a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -405,7 +411,7 @@ private Mono> getWithResponseAsync( /** * Get a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -445,7 +451,7 @@ private Mono> getWithResponseAsync( /** * Get a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -463,7 +469,7 @@ private Mono getAsync(String resourceGroupNa /** * Get a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -481,7 +487,7 @@ public Response getWithResponse(String resou /** * Get a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -498,14 +504,14 @@ public DynatraceSingleSignOnResourceInner get(String resourceGroupName, String m /** * List all DynatraceSingleSignOnResource by monitorName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a DynatraceSingleSignOnResource list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, @@ -536,7 +542,7 @@ private Mono> listSinglePageAs /** * List all DynatraceSingleSignOnResource by monitorName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -544,7 +550,7 @@ private Mono> listSinglePageAs * @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 of a DynatraceSingleSignOnResource list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, @@ -575,14 +581,14 @@ private Mono> listSinglePageAs /** * List all DynatraceSingleSignOnResource by monitorName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DynatraceSingleSignOnResource list operation as paginated response with {@link - * PagedFlux}. + * @return the response of a DynatraceSingleSignOnResource list operation as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String monitorName) { @@ -592,15 +598,15 @@ private PagedFlux listAsync(String resourceG /** * List all DynatraceSingleSignOnResource by monitorName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DynatraceSingleSignOnResource list operation as paginated response with {@link - * PagedFlux}. + * @return the response of a DynatraceSingleSignOnResource list operation as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String monitorName, @@ -611,14 +617,14 @@ private PagedFlux listAsync(String resourceG /** * List all DynatraceSingleSignOnResource by monitorName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DynatraceSingleSignOnResource list operation as paginated response with {@link - * PagedIterable}. + * @return the response of a DynatraceSingleSignOnResource list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String monitorName) { @@ -627,15 +633,15 @@ public PagedIterable list(String resourceGro /** * List all DynatraceSingleSignOnResource by monitorName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DynatraceSingleSignOnResource list operation as paginated response with {@link - * PagedIterable}. + * @return the response of a DynatraceSingleSignOnResource list operation as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String monitorName, @@ -645,14 +651,13 @@ public PagedIterable list(String resourceGro /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a DynatraceSingleSignOnResource list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -672,15 +677,14 @@ private Mono> listNextSinglePa /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a DynatraceSingleSignOnResource list operation along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/SingleSignOnsImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/SingleSignOnsImpl.java index aab0d72849877..ad7c7a418d1e0 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/SingleSignOnsImpl.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/SingleSignOnsImpl.java @@ -52,28 +52,30 @@ public DynatraceSingleSignOnResource get(String resourceGroupName, String monito public PagedIterable list(String resourceGroupName, String monitorName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, monitorName); - return Utils.mapPage(inner, inner1 -> new DynatraceSingleSignOnResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new DynatraceSingleSignOnResourceImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String monitorName, Context context) { PagedIterable inner = this.serviceClient().list(resourceGroupName, monitorName, context); - return Utils.mapPage(inner, inner1 -> new DynatraceSingleSignOnResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new DynatraceSingleSignOnResourceImpl(inner1, this.manager())); } public DynatraceSingleSignOnResource getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String monitorName = Utils.getValueFromIdByName(id, "monitors"); + String monitorName = ResourceManagerUtils.getValueFromIdByName(id, "monitors"); if (monitorName == null) { 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"); + String configurationName = ResourceManagerUtils.getValueFromIdByName(id, "singleSignOnConfigurations"); if (configurationName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException(String .format("The resource ID '%s' is not valid. Missing path segment 'singleSignOnConfigurations'.", id))); @@ -82,17 +84,17 @@ public DynatraceSingleSignOnResource getById(String id) { } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String monitorName = Utils.getValueFromIdByName(id, "monitors"); + String monitorName = ResourceManagerUtils.getValueFromIdByName(id, "monitors"); if (monitorName == null) { 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"); + String configurationName = ResourceManagerUtils.getValueFromIdByName(id, "singleSignOnConfigurations"); if (configurationName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException(String .format("The resource ID '%s' is not valid. Missing path segment 'singleSignOnConfigurations'.", id))); diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRuleImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRuleImpl.java index 02a75f69517de..c81f9b954724d 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRuleImpl.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRuleImpl.java @@ -110,9 +110,9 @@ public TagRule apply(Context context) { TagRuleImpl(TagRuleInner innerObject, com.azure.resourcemanager.dynatrace.DynatraceManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.monitorName = Utils.getValueFromIdByName(innerObject.id(), "monitors"); - this.ruleSetName = Utils.getValueFromIdByName(innerObject.id(), "tagRules"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.monitorName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "monitors"); + this.ruleSetName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "tagRules"); } public TagRule refresh() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRulesClientImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRulesClientImpl.java index 382f9b1360052..9b2757dda69ae 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRulesClientImpl.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRulesClientImpl.java @@ -38,17 +38,23 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in TagRulesClient. */ +/** + * An instance of this class provides access to all the operations defined in TagRulesClient. + */ public final class TagRulesClientImpl implements TagRulesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final TagRulesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DynatraceObservabilityImpl client; /** * Initializes an instance of TagRulesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ TagRulesClientImpl(DynatraceObservabilityImpl client) { @@ -110,7 +116,7 @@ Mono> listNext(@PathParam(value = "nextLink", encode /** * Get a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -149,7 +155,7 @@ private Mono> getWithResponseAsync(String resourceGroupNa /** * Get a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -188,7 +194,7 @@ private Mono> getWithResponseAsync(String resourceGroupNa /** * Get a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -205,7 +211,7 @@ private Mono getAsync(String resourceGroupName, String monitorName /** * Get a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -223,7 +229,7 @@ public Response getWithResponse(String resourceGroupName, String m /** * Get a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -239,7 +245,7 @@ public TagRuleInner get(String resourceGroupName, String monitorName, String rul /** * Create a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -285,7 +291,7 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Create a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -330,7 +336,7 @@ private Mono>> createOrUpdateWithResponseAsync(String /** * Create a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -351,7 +357,7 @@ private PollerFlux, TagRuleInner> beginCreateOrUpdateAs /** * Create a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -374,7 +380,7 @@ private PollerFlux, TagRuleInner> beginCreateOrUpdateAs /** * Create a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -392,7 +398,7 @@ public SyncPoller, TagRuleInner> beginCreateOrUpdate(St /** * Create a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -412,7 +418,7 @@ public SyncPoller, TagRuleInner> beginCreateOrUpdate(St /** * Create a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -431,7 +437,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, String /** * Create a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -451,7 +457,7 @@ private Mono createOrUpdateAsync(String resourceGroupName, String /** * Create a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -469,7 +475,7 @@ public TagRuleInner createOrUpdate(String resourceGroupName, String monitorName, /** * Create a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -488,7 +494,7 @@ public TagRuleInner createOrUpdate(String resourceGroupName, String monitorName, /** * Delete a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -527,7 +533,7 @@ private Mono>> deleteWithResponseAsync(String resource /** * Delete a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -566,7 +572,7 @@ private Mono>> deleteWithResponseAsync(String resource /** * Delete a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -585,7 +591,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Delete a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -607,7 +613,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup /** * Delete a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -624,7 +630,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Delete a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -642,7 +648,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Delete a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -659,7 +665,7 @@ private Mono deleteAsync(String resourceGroupName, String monitorName, Str /** * Delete a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -677,7 +683,7 @@ private Mono deleteAsync(String resourceGroupName, String monitorName, Str /** * Delete a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -692,7 +698,7 @@ public void delete(String resourceGroupName, String monitorName, String ruleSetN /** * Delete a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -708,14 +714,14 @@ public void delete(String resourceGroupName, String monitorName, String ruleSetN /** * List all TagRule by monitorName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a TagRule list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String monitorName) { @@ -745,7 +751,7 @@ private Mono> listSinglePageAsync(String resourceGro /** * List all TagRule by monitorName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -753,7 +759,7 @@ private Mono> listSinglePageAsync(String resourceGro * @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 of a TagRule list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String monitorName, @@ -784,7 +790,7 @@ private Mono> listSinglePageAsync(String resourceGro /** * List all TagRule by monitorName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -800,7 +806,7 @@ private PagedFlux listAsync(String resourceGroupName, String monit /** * List all TagRule by monitorName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -817,7 +823,7 @@ private PagedFlux listAsync(String resourceGroupName, String monit /** * List all TagRule by monitorName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -832,7 +838,7 @@ public PagedIterable list(String resourceGroupName, String monitor /** * List all TagRule by monitorName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -848,14 +854,13 @@ public PagedIterable list(String resourceGroupName, String monitor /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a TagRule list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -875,15 +880,14 @@ private Mono> listNextSinglePageAsync(String nextLin /** * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a TagRule list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRulesImpl.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRulesImpl.java index 4d5ea6f8a499a..a06324618f0ba 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRulesImpl.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/TagRulesImpl.java @@ -58,26 +58,26 @@ public void delete(String resourceGroupName, String monitorName, String ruleSetN public PagedIterable list(String resourceGroupName, String monitorName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, monitorName); - return Utils.mapPage(inner, inner1 -> new TagRuleImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TagRuleImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String monitorName, Context context) { PagedIterable inner = this.serviceClient().list(resourceGroupName, monitorName, context); - return Utils.mapPage(inner, inner1 -> new TagRuleImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new TagRuleImpl(inner1, this.manager())); } public TagRule getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String monitorName = Utils.getValueFromIdByName(id, "monitors"); + String monitorName = ResourceManagerUtils.getValueFromIdByName(id, "monitors"); if (monitorName == null) { 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"); + String ruleSetName = ResourceManagerUtils.getValueFromIdByName(id, "tagRules"); if (ruleSetName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'tagRules'.", id))); @@ -86,17 +86,17 @@ public TagRule getById(String id) { } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String monitorName = Utils.getValueFromIdByName(id, "monitors"); + String monitorName = ResourceManagerUtils.getValueFromIdByName(id, "monitors"); if (monitorName == null) { 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"); + String ruleSetName = ResourceManagerUtils.getValueFromIdByName(id, "tagRules"); if (ruleSetName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'tagRules'.", id))); @@ -105,17 +105,17 @@ public Response getByIdWithResponse(String id, Context context) { } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String monitorName = Utils.getValueFromIdByName(id, "monitors"); + String monitorName = ResourceManagerUtils.getValueFromIdByName(id, "monitors"); if (monitorName == null) { 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"); + String ruleSetName = ResourceManagerUtils.getValueFromIdByName(id, "tagRules"); if (ruleSetName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'tagRules'.", id))); @@ -124,17 +124,17 @@ public void deleteById(String id) { } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String monitorName = Utils.getValueFromIdByName(id, "monitors"); + String monitorName = ResourceManagerUtils.getValueFromIdByName(id, "monitors"); if (monitorName == null) { 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"); + String ruleSetName = ResourceManagerUtils.getValueFromIdByName(id, "tagRules"); if (ruleSetName == null) { throw LOGGER.logExceptionAsError(new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'tagRules'.", id))); diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/package-info.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/package-info.java index 6ec806d8373c9..3dac798c1c783 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/package-info.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/implementation/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the implementations for DynatraceObservability. null. */ +/** + * Package containing the implementations for DynatraceObservability. + * null. + */ package com.azure.resourcemanager.dynatrace.implementation; diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AccountInfo.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AccountInfo.java index 978b2920a87d6..bcd9cef4861d1 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AccountInfo.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AccountInfo.java @@ -5,30 +5,36 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Dynatrace Account Information. */ +/** + * Dynatrace Account Information. + */ @Fluent -public final class AccountInfo { +public final class AccountInfo implements JsonSerializable { /* * Account Id of the account this environment is linked to */ - @JsonProperty(value = "accountId") private String accountId; /* * Region in which the account is created */ - @JsonProperty(value = "regionId") private String regionId; - /** Creates an instance of AccountInfo class. */ + /** + * Creates an instance of AccountInfo class. + */ public AccountInfo() { } /** * Get the accountId property: Account Id of the account this environment is linked to. - * + * * @return the accountId value. */ public String accountId() { @@ -37,7 +43,7 @@ public String accountId() { /** * Set the accountId property: Account Id of the account this environment is linked to. - * + * * @param accountId the accountId value to set. * @return the AccountInfo object itself. */ @@ -48,7 +54,7 @@ public AccountInfo withAccountId(String accountId) { /** * Get the regionId property: Region in which the account is created. - * + * * @return the regionId value. */ public String regionId() { @@ -57,7 +63,7 @@ public String regionId() { /** * Set the regionId property: Region in which the account is created. - * + * * @param regionId the regionId value to set. * @return the AccountInfo object itself. */ @@ -68,9 +74,48 @@ public AccountInfo withRegionId(String regionId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("accountId", this.accountId); + jsonWriter.writeStringField("regionId", this.regionId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccountInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccountInfo if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the AccountInfo. + */ + public static AccountInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccountInfo deserializedAccountInfo = new AccountInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("accountId".equals(fieldName)) { + deserializedAccountInfo.accountId = reader.getString(); + } else if ("regionId".equals(fieldName)) { + deserializedAccountInfo.regionId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAccountInfo; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ActionType.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ActionType.java index f237ae3b3ea0a..2d396c4f242ae 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ActionType.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ActionType.java @@ -5,17 +5,20 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ +/** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ public final class ActionType extends ExpandableStringEnum { - /** Static value Internal for ActionType. */ + /** + * Static value Internal for ActionType. + */ public static final ActionType INTERNAL = fromString("Internal"); /** * Creates a new instance of ActionType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,18 +27,17 @@ public ActionType() { /** * Creates or finds a ActionType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ActionType. */ - @JsonCreator public static ActionType fromString(String name) { return fromString(name, ActionType.class); } /** * Gets known ActionType values. - * + * * @return known ActionType values. */ public static Collection values() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AppServiceInfo.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AppServiceInfo.java index 2d153cf0e0ad3..63ed9f7b74e3f 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AppServiceInfo.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AppServiceInfo.java @@ -6,74 +6,76 @@ import com.azure.resourcemanager.dynatrace.fluent.models.AppServiceInfoInner; -/** An immutable client-side representation of AppServiceInfo. */ +/** + * An immutable client-side representation of AppServiceInfo. + */ public interface AppServiceInfo { /** * Gets the resourceId property: App service resource ID. - * + * * @return the resourceId value. */ String resourceId(); /** * Gets the version property: Version of the Dynatrace agent installed on the App Service. - * + * * @return the version value. */ String version(); /** * Gets the monitoringType property: The monitoring mode of OneAgent. - * + * * @return the monitoringType value. */ MonitoringType monitoringType(); /** * Gets the autoUpdateSetting property: Update settings of OneAgent. - * + * * @return the autoUpdateSetting value. */ AutoUpdateSetting autoUpdateSetting(); /** * Gets the updateStatus property: The current update status of OneAgent. - * + * * @return the updateStatus value. */ UpdateStatus updateStatus(); /** * Gets the availabilityState property: The availability state of OneAgent. - * + * * @return the availabilityState value. */ AvailabilityState availabilityState(); /** * Gets the logModule property: Tells whether log modules are enabled or not. - * + * * @return the logModule value. */ LogModule logModule(); /** * Gets the hostGroup property: The name of the host group. - * + * * @return the hostGroup value. */ String hostGroup(); /** * Gets the hostname property: The name of the host. - * + * * @return the hostname value. */ String hostname(); /** * Gets the inner com.azure.resourcemanager.dynatrace.fluent.models.AppServiceInfoInner object. - * + * * @return the inner object. */ AppServiceInfoInner innerModel(); diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AppServiceListResponse.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AppServiceListResponse.java index 8f9800f2199a5..2c38534d36fdb 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AppServiceListResponse.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AppServiceListResponse.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.dynatrace.fluent.models.AppServiceInfoInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** Response of a list App Services Operation. */ +/** + * Response of a list App Services Operation. + */ @Fluent -public final class AppServiceListResponse { +public final class AppServiceListResponse implements JsonSerializable { /* * The items on this page */ - @JsonProperty(value = "value") private List value; /* * The link to the next page of items */ - @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of AppServiceListResponse class. */ + /** + * Creates an instance of AppServiceListResponse class. + */ public AppServiceListResponse() { } /** * Get the value property: The items on this page. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Set the value property: The items on this page. - * + * * @param value the value value to set. * @return the AppServiceListResponse object itself. */ @@ -50,7 +56,7 @@ public AppServiceListResponse withValue(List value) { /** * Get the nextLink property: The link to the next page of items. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +65,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of items. - * + * * @param nextLink the nextLink value to set. * @return the AppServiceListResponse object itself. */ @@ -70,7 +76,7 @@ public AppServiceListResponse withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -78,4 +84,45 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AppServiceListResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AppServiceListResponse if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the AppServiceListResponse. + */ + public static AppServiceListResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AppServiceListResponse deserializedAppServiceListResponse = new AppServiceListResponse(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> AppServiceInfoInner.fromJson(reader1)); + deserializedAppServiceListResponse.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedAppServiceListResponse.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAppServiceListResponse; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AutoUpdateSetting.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AutoUpdateSetting.java index 50fc1a7065c3d..01bb3d8d6c731 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AutoUpdateSetting.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AutoUpdateSetting.java @@ -5,20 +5,25 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Update settings of OneAgent. */ +/** + * Update settings of OneAgent. + */ public final class AutoUpdateSetting extends ExpandableStringEnum { - /** Static value ENABLED for AutoUpdateSetting. */ + /** + * Static value ENABLED for AutoUpdateSetting. + */ public static final AutoUpdateSetting ENABLED = fromString("ENABLED"); - /** Static value DISABLED for AutoUpdateSetting. */ + /** + * Static value DISABLED for AutoUpdateSetting. + */ public static final AutoUpdateSetting DISABLED = fromString("DISABLED"); /** * Creates a new instance of AutoUpdateSetting value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,18 +32,17 @@ public AutoUpdateSetting() { /** * Creates or finds a AutoUpdateSetting from its string representation. - * + * * @param name a name to look for. * @return the corresponding AutoUpdateSetting. */ - @JsonCreator public static AutoUpdateSetting fromString(String name) { return fromString(name, AutoUpdateSetting.class); } /** * Gets known AutoUpdateSetting values. - * + * * @return known AutoUpdateSetting values. */ public static Collection values() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AvailabilityState.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AvailabilityState.java index e0d7136608e6f..51dae4a86874d 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AvailabilityState.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/AvailabilityState.java @@ -5,38 +5,55 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The availability state of OneAgent. */ +/** + * The availability state of OneAgent. + */ public final class AvailabilityState extends ExpandableStringEnum { - /** Static value CRASHED for AvailabilityState. */ + /** + * Static value CRASHED for AvailabilityState. + */ public static final AvailabilityState CRASHED = fromString("CRASHED"); - /** Static value LOST for AvailabilityState. */ + /** + * Static value LOST for AvailabilityState. + */ public static final AvailabilityState LOST = fromString("LOST"); - /** Static value MONITORED for AvailabilityState. */ + /** + * Static value MONITORED for AvailabilityState. + */ public static final AvailabilityState MONITORED = fromString("MONITORED"); - /** Static value PRE_MONITORED for AvailabilityState. */ + /** + * Static value PRE_MONITORED for AvailabilityState. + */ public static final AvailabilityState PRE_MONITORED = fromString("PRE_MONITORED"); - /** Static value SHUTDOWN for AvailabilityState. */ + /** + * Static value SHUTDOWN for AvailabilityState. + */ public static final AvailabilityState SHUTDOWN = fromString("SHUTDOWN"); - /** Static value UNEXPECTED_SHUTDOWN for AvailabilityState. */ + /** + * Static value UNEXPECTED_SHUTDOWN for AvailabilityState. + */ public static final AvailabilityState UNEXPECTED_SHUTDOWN = fromString("UNEXPECTED_SHUTDOWN"); - /** Static value UNKNOWN for AvailabilityState. */ + /** + * Static value UNKNOWN for AvailabilityState. + */ public static final AvailabilityState UNKNOWN = fromString("UNKNOWN"); - /** Static value UNMONITORED for AvailabilityState. */ + /** + * Static value UNMONITORED for AvailabilityState. + */ public static final AvailabilityState UNMONITORED = fromString("UNMONITORED"); /** * Creates a new instance of AvailabilityState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -45,18 +62,17 @@ public AvailabilityState() { /** * Creates or finds a AvailabilityState from its string representation. - * + * * @param name a name to look for. * @return the corresponding AvailabilityState. */ - @JsonCreator public static AvailabilityState fromString(String name) { return fromString(name, AvailabilityState.class); } /** * Gets known AvailabilityState values. - * + * * @return known AvailabilityState values. */ public static Collection values() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/DynatraceEnvironmentProperties.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/DynatraceEnvironmentProperties.java index 26b1b4e0b9afb..e8acdbfaab5a0 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/DynatraceEnvironmentProperties.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/DynatraceEnvironmentProperties.java @@ -5,43 +5,47 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.dynatrace.fluent.models.DynatraceSingleSignOnProperties; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; -/** Properties of the Dynatrace environment. */ +/** + * Properties of the Dynatrace environment. + */ @Fluent -public final class DynatraceEnvironmentProperties { +public final class DynatraceEnvironmentProperties implements JsonSerializable { /* * User id */ - @JsonProperty(value = "userId") private String userId; /* * Dynatrace Account Information */ - @JsonProperty(value = "accountInfo") private AccountInfo accountInfo; /* * Dynatrace Environment Information */ - @JsonProperty(value = "environmentInfo") private EnvironmentInfo environmentInfo; /* * The details of a Dynatrace single sign-on. */ - @JsonProperty(value = "singleSignOnProperties") private DynatraceSingleSignOnProperties singleSignOnProperties; - /** Creates an instance of DynatraceEnvironmentProperties class. */ + /** + * Creates an instance of DynatraceEnvironmentProperties class. + */ public DynatraceEnvironmentProperties() { } /** * Get the userId property: User id. - * + * * @return the userId value. */ public String userId() { @@ -50,7 +54,7 @@ public String userId() { /** * Set the userId property: User id. - * + * * @param userId the userId value to set. * @return the DynatraceEnvironmentProperties object itself. */ @@ -61,7 +65,7 @@ public DynatraceEnvironmentProperties withUserId(String userId) { /** * Get the accountInfo property: Dynatrace Account Information. - * + * * @return the accountInfo value. */ public AccountInfo accountInfo() { @@ -70,7 +74,7 @@ public AccountInfo accountInfo() { /** * Set the accountInfo property: Dynatrace Account Information. - * + * * @param accountInfo the accountInfo value to set. * @return the DynatraceEnvironmentProperties object itself. */ @@ -81,7 +85,7 @@ public DynatraceEnvironmentProperties withAccountInfo(AccountInfo accountInfo) { /** * Get the environmentInfo property: Dynatrace Environment Information. - * + * * @return the environmentInfo value. */ public EnvironmentInfo environmentInfo() { @@ -90,7 +94,7 @@ public EnvironmentInfo environmentInfo() { /** * Set the environmentInfo property: Dynatrace Environment Information. - * + * * @param environmentInfo the environmentInfo value to set. * @return the DynatraceEnvironmentProperties object itself. */ @@ -101,7 +105,7 @@ public DynatraceEnvironmentProperties withEnvironmentInfo(EnvironmentInfo enviro /** * Get the singleSignOnProperties property: The details of a Dynatrace single sign-on. - * + * * @return the singleSignOnProperties value. */ public DynatraceSingleSignOnProperties singleSignOnProperties() { @@ -110,7 +114,7 @@ public DynatraceSingleSignOnProperties singleSignOnProperties() { /** * Set the singleSignOnProperties property: The details of a Dynatrace single sign-on. - * + * * @param singleSignOnProperties the singleSignOnProperties value to set. * @return the DynatraceEnvironmentProperties object itself. */ @@ -122,7 +126,7 @@ public DynatraceSingleSignOnProperties singleSignOnProperties() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -136,4 +140,51 @@ public void validate() { singleSignOnProperties().validate(); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("userId", this.userId); + jsonWriter.writeJsonField("accountInfo", this.accountInfo); + jsonWriter.writeJsonField("environmentInfo", this.environmentInfo); + jsonWriter.writeJsonField("singleSignOnProperties", this.singleSignOnProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DynatraceEnvironmentProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DynatraceEnvironmentProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DynatraceEnvironmentProperties. + */ + public static DynatraceEnvironmentProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DynatraceEnvironmentProperties deserializedDynatraceEnvironmentProperties + = new DynatraceEnvironmentProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("userId".equals(fieldName)) { + deserializedDynatraceEnvironmentProperties.userId = reader.getString(); + } else if ("accountInfo".equals(fieldName)) { + deserializedDynatraceEnvironmentProperties.accountInfo = AccountInfo.fromJson(reader); + } else if ("environmentInfo".equals(fieldName)) { + deserializedDynatraceEnvironmentProperties.environmentInfo = EnvironmentInfo.fromJson(reader); + } else if ("singleSignOnProperties".equals(fieldName)) { + deserializedDynatraceEnvironmentProperties.singleSignOnProperties + = DynatraceSingleSignOnProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDynatraceEnvironmentProperties; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/DynatraceSingleSignOnResource.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/DynatraceSingleSignOnResource.java index 1f716557ddc85..6dd2d80c77c05 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/DynatraceSingleSignOnResource.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/DynatraceSingleSignOnResource.java @@ -9,101 +9,111 @@ import com.azure.resourcemanager.dynatrace.fluent.models.DynatraceSingleSignOnResourceInner; import java.util.List; -/** An immutable client-side representation of DynatraceSingleSignOnResource. */ +/** + * An immutable client-side representation of DynatraceSingleSignOnResource. + */ public interface DynatraceSingleSignOnResource { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: System metadata for this resource. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the singleSignOnState property: State of Single Sign On. - * + * * @return the singleSignOnState value. */ SingleSignOnStates singleSignOnState(); /** * Gets the enterpriseAppId property: Version of the Dynatrace agent installed on the VM. - * + * * @return the enterpriseAppId value. */ String enterpriseAppId(); /** * Gets the singleSignOnUrl property: The login URL specific to this Dynatrace Environment. - * + * * @return the singleSignOnUrl value. */ String singleSignOnUrl(); /** * Gets the aadDomains property: array of Aad(azure active directory) domains. - * + * * @return the aadDomains value. */ List aadDomains(); /** * Gets the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ ProvisioningState provisioningState(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.dynatrace.fluent.models.DynatraceSingleSignOnResourceInner object. - * + * * @return the inner object. */ DynatraceSingleSignOnResourceInner innerModel(); - /** The entirety of the DynatraceSingleSignOnResource definition. */ + /** + * The entirety of the DynatraceSingleSignOnResource definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The DynatraceSingleSignOnResource definition stages. */ + /** + * The DynatraceSingleSignOnResource definition stages. + */ interface DefinitionStages { - /** The first stage of the DynatraceSingleSignOnResource definition. */ + /** + * The first stage of the DynatraceSingleSignOnResource definition. + */ interface Blank extends WithParentResource { } - /** The stage of the DynatraceSingleSignOnResource definition allowing to specify parent resource. */ + /** + * The stage of the DynatraceSingleSignOnResource definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, monitorName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @return the next definition stage. @@ -119,58 +129,66 @@ interface WithCreate extends DefinitionStages.WithSingleSignOnState, DefinitionS DefinitionStages.WithSingleSignOnUrl, DefinitionStages.WithAadDomains { /** * Executes the create request. - * + * * @return the created resource. */ DynatraceSingleSignOnResource create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ DynatraceSingleSignOnResource create(Context context); } - /** The stage of the DynatraceSingleSignOnResource definition allowing to specify singleSignOnState. */ + /** + * The stage of the DynatraceSingleSignOnResource definition allowing to specify singleSignOnState. + */ interface WithSingleSignOnState { /** * Specifies the singleSignOnState property: State of Single Sign On. - * + * * @param singleSignOnState State of Single Sign On. * @return the next definition stage. */ WithCreate withSingleSignOnState(SingleSignOnStates singleSignOnState); } - /** The stage of the DynatraceSingleSignOnResource definition allowing to specify enterpriseAppId. */ + /** + * The stage of the DynatraceSingleSignOnResource definition allowing to specify enterpriseAppId. + */ interface WithEnterpriseAppId { /** * Specifies the enterpriseAppId property: Version of the Dynatrace agent installed on the VM.. - * + * * @param enterpriseAppId Version of the Dynatrace agent installed on the VM. * @return the next definition stage. */ WithCreate withEnterpriseAppId(String enterpriseAppId); } - /** The stage of the DynatraceSingleSignOnResource definition allowing to specify singleSignOnUrl. */ + /** + * The stage of the DynatraceSingleSignOnResource definition allowing to specify singleSignOnUrl. + */ interface WithSingleSignOnUrl { /** * Specifies the singleSignOnUrl property: The login URL specific to this Dynatrace Environment. - * + * * @param singleSignOnUrl The login URL specific to this Dynatrace Environment. * @return the next definition stage. */ WithCreate withSingleSignOnUrl(String singleSignOnUrl); } - /** The stage of the DynatraceSingleSignOnResource definition allowing to specify aadDomains. */ + /** + * The stage of the DynatraceSingleSignOnResource definition allowing to specify aadDomains. + */ interface WithAadDomains { /** * Specifies the aadDomains property: array of Aad(azure active directory) domains. - * + * * @param aadDomains array of Aad(azure active directory) domains. * @return the next definition stage. */ @@ -180,70 +198,82 @@ interface WithAadDomains { /** * Begins update for the DynatraceSingleSignOnResource resource. - * + * * @return the stage of resource update. */ DynatraceSingleSignOnResource.Update update(); - /** The template for DynatraceSingleSignOnResource update. */ + /** + * The template for DynatraceSingleSignOnResource update. + */ interface Update extends UpdateStages.WithSingleSignOnState, UpdateStages.WithEnterpriseAppId, UpdateStages.WithSingleSignOnUrl, UpdateStages.WithAadDomains { /** * Executes the update request. - * + * * @return the updated resource. */ DynatraceSingleSignOnResource apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ DynatraceSingleSignOnResource apply(Context context); } - /** The DynatraceSingleSignOnResource update stages. */ + /** + * The DynatraceSingleSignOnResource update stages. + */ interface UpdateStages { - /** The stage of the DynatraceSingleSignOnResource update allowing to specify singleSignOnState. */ + /** + * The stage of the DynatraceSingleSignOnResource update allowing to specify singleSignOnState. + */ interface WithSingleSignOnState { /** * Specifies the singleSignOnState property: State of Single Sign On. - * + * * @param singleSignOnState State of Single Sign On. * @return the next definition stage. */ Update withSingleSignOnState(SingleSignOnStates singleSignOnState); } - /** The stage of the DynatraceSingleSignOnResource update allowing to specify enterpriseAppId. */ + /** + * The stage of the DynatraceSingleSignOnResource update allowing to specify enterpriseAppId. + */ interface WithEnterpriseAppId { /** * Specifies the enterpriseAppId property: Version of the Dynatrace agent installed on the VM.. - * + * * @param enterpriseAppId Version of the Dynatrace agent installed on the VM. * @return the next definition stage. */ Update withEnterpriseAppId(String enterpriseAppId); } - /** The stage of the DynatraceSingleSignOnResource update allowing to specify singleSignOnUrl. */ + /** + * The stage of the DynatraceSingleSignOnResource update allowing to specify singleSignOnUrl. + */ interface WithSingleSignOnUrl { /** * Specifies the singleSignOnUrl property: The login URL specific to this Dynatrace Environment. - * + * * @param singleSignOnUrl The login URL specific to this Dynatrace Environment. * @return the next definition stage. */ Update withSingleSignOnUrl(String singleSignOnUrl); } - /** The stage of the DynatraceSingleSignOnResource update allowing to specify aadDomains. */ + /** + * The stage of the DynatraceSingleSignOnResource update allowing to specify aadDomains. + */ interface WithAadDomains { /** * Specifies the aadDomains property: array of Aad(azure active directory) domains. - * + * * @param aadDomains array of Aad(azure active directory) domains. * @return the next definition stage. */ @@ -253,14 +283,14 @@ interface WithAadDomains { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ DynatraceSingleSignOnResource refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/DynatraceSingleSignOnResourceListResult.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/DynatraceSingleSignOnResourceListResult.java index 18bae0f3bcd1b..30cd2bc564efd 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/DynatraceSingleSignOnResourceListResult.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/DynatraceSingleSignOnResourceListResult.java @@ -6,32 +6,39 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.dynatrace.fluent.models.DynatraceSingleSignOnResourceInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** The response of a DynatraceSingleSignOnResource list operation. */ +/** + * The response of a DynatraceSingleSignOnResource list operation. + */ @Fluent -public final class DynatraceSingleSignOnResourceListResult { +public final class DynatraceSingleSignOnResourceListResult + implements JsonSerializable { /* * The items on this page */ - @JsonProperty(value = "value", required = true) private List value; /* * The link to the next page of items */ - @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of DynatraceSingleSignOnResourceListResult class. */ + /** + * Creates an instance of DynatraceSingleSignOnResourceListResult class. + */ public DynatraceSingleSignOnResourceListResult() { } /** * Get the value property: The items on this page. - * + * * @return the value value. */ public List value() { @@ -40,7 +47,7 @@ public List value() { /** * Set the value property: The items on this page. - * + * * @param value the value value to set. * @return the DynatraceSingleSignOnResourceListResult object itself. */ @@ -51,7 +58,7 @@ public DynatraceSingleSignOnResourceListResult withValue(List e.validate()); } } private static final ClientLogger LOGGER = new ClientLogger(DynatraceSingleSignOnResourceListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DynatraceSingleSignOnResourceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DynatraceSingleSignOnResourceListResult if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DynatraceSingleSignOnResourceListResult. + */ + public static DynatraceSingleSignOnResourceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DynatraceSingleSignOnResourceListResult deserializedDynatraceSingleSignOnResourceListResult + = new DynatraceSingleSignOnResourceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> DynatraceSingleSignOnResourceInner.fromJson(reader1)); + deserializedDynatraceSingleSignOnResourceListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedDynatraceSingleSignOnResourceListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDynatraceSingleSignOnResourceListResult; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/EnvironmentInfo.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/EnvironmentInfo.java index 55687fae5f3e3..3a628ee559b52 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/EnvironmentInfo.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/EnvironmentInfo.java @@ -5,42 +5,46 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Dynatrace Environment Information. */ +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Dynatrace Environment Information. + */ @Fluent -public final class EnvironmentInfo { +public final class EnvironmentInfo implements JsonSerializable { /* * Id of the environment created */ - @JsonProperty(value = "environmentId") private String environmentId; /* * Ingestion key of the environment */ - @JsonProperty(value = "ingestionKey") private String ingestionKey; /* * Ingestion endpoint used for sending logs */ - @JsonProperty(value = "logsIngestionEndpoint") private String logsIngestionEndpoint; /* * Landing URL for Dynatrace environment */ - @JsonProperty(value = "landingURL") private String landingUrl; - /** Creates an instance of EnvironmentInfo class. */ + /** + * Creates an instance of EnvironmentInfo class. + */ public EnvironmentInfo() { } /** * Get the environmentId property: Id of the environment created. - * + * * @return the environmentId value. */ public String environmentId() { @@ -49,7 +53,7 @@ public String environmentId() { /** * Set the environmentId property: Id of the environment created. - * + * * @param environmentId the environmentId value to set. * @return the EnvironmentInfo object itself. */ @@ -60,7 +64,7 @@ public EnvironmentInfo withEnvironmentId(String environmentId) { /** * Get the ingestionKey property: Ingestion key of the environment. - * + * * @return the ingestionKey value. */ public String ingestionKey() { @@ -69,7 +73,7 @@ public String ingestionKey() { /** * Set the ingestionKey property: Ingestion key of the environment. - * + * * @param ingestionKey the ingestionKey value to set. * @return the EnvironmentInfo object itself. */ @@ -80,7 +84,7 @@ public EnvironmentInfo withIngestionKey(String ingestionKey) { /** * Get the logsIngestionEndpoint property: Ingestion endpoint used for sending logs. - * + * * @return the logsIngestionEndpoint value. */ public String logsIngestionEndpoint() { @@ -89,7 +93,7 @@ public String logsIngestionEndpoint() { /** * Set the logsIngestionEndpoint property: Ingestion endpoint used for sending logs. - * + * * @param logsIngestionEndpoint the logsIngestionEndpoint value to set. * @return the EnvironmentInfo object itself. */ @@ -100,7 +104,7 @@ public EnvironmentInfo withLogsIngestionEndpoint(String logsIngestionEndpoint) { /** * Get the landingUrl property: Landing URL for Dynatrace environment. - * + * * @return the landingUrl value. */ public String landingUrl() { @@ -109,7 +113,7 @@ public String landingUrl() { /** * Set the landingUrl property: Landing URL for Dynatrace environment. - * + * * @param landingUrl the landingUrl value to set. * @return the EnvironmentInfo object itself. */ @@ -120,9 +124,54 @@ public EnvironmentInfo withLandingUrl(String landingUrl) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("environmentId", this.environmentId); + jsonWriter.writeStringField("ingestionKey", this.ingestionKey); + jsonWriter.writeStringField("logsIngestionEndpoint", this.logsIngestionEndpoint); + jsonWriter.writeStringField("landingURL", this.landingUrl); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EnvironmentInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EnvironmentInfo if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the EnvironmentInfo. + */ + public static EnvironmentInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EnvironmentInfo deserializedEnvironmentInfo = new EnvironmentInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("environmentId".equals(fieldName)) { + deserializedEnvironmentInfo.environmentId = reader.getString(); + } else if ("ingestionKey".equals(fieldName)) { + deserializedEnvironmentInfo.ingestionKey = reader.getString(); + } else if ("logsIngestionEndpoint".equals(fieldName)) { + deserializedEnvironmentInfo.logsIngestionEndpoint = reader.getString(); + } else if ("landingURL".equals(fieldName)) { + deserializedEnvironmentInfo.landingUrl = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEnvironmentInfo; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/FilteringTag.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/FilteringTag.java index 4d2f224c4c3a1..331fdd6620cef 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/FilteringTag.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/FilteringTag.java @@ -5,39 +5,42 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; /** * The definition of a filtering tag. Filtering tags are used for capturing resources and include/exclude them from * being monitored. */ @Fluent -public final class FilteringTag { +public final class FilteringTag implements JsonSerializable { /* * The name (also known as the key) of the tag. */ - @JsonProperty(value = "name") private String name; /* * The value of the tag. */ - @JsonProperty(value = "value") private String value; /* * Valid actions for a filtering tag. Exclusion takes priority over inclusion. */ - @JsonProperty(value = "action") private TagAction action; - /** Creates an instance of FilteringTag class. */ + /** + * Creates an instance of FilteringTag class. + */ public FilteringTag() { } /** * Get the name property: The name (also known as the key) of the tag. - * + * * @return the name value. */ public String name() { @@ -46,7 +49,7 @@ public String name() { /** * Set the name property: The name (also known as the key) of the tag. - * + * * @param name the name value to set. * @return the FilteringTag object itself. */ @@ -57,7 +60,7 @@ public FilteringTag withName(String name) { /** * Get the value property: The value of the tag. - * + * * @return the value value. */ public String value() { @@ -66,7 +69,7 @@ public String value() { /** * Set the value property: The value of the tag. - * + * * @param value the value value to set. * @return the FilteringTag object itself. */ @@ -77,7 +80,7 @@ public FilteringTag withValue(String value) { /** * Get the action property: Valid actions for a filtering tag. Exclusion takes priority over inclusion. - * + * * @return the action value. */ public TagAction action() { @@ -86,7 +89,7 @@ public TagAction action() { /** * Set the action property: Valid actions for a filtering tag. Exclusion takes priority over inclusion. - * + * * @param action the action value to set. * @return the FilteringTag object itself. */ @@ -97,9 +100,51 @@ public FilteringTag withAction(TagAction action) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("value", this.value); + jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FilteringTag from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FilteringTag if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the FilteringTag. + */ + public static FilteringTag fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FilteringTag deserializedFilteringTag = new FilteringTag(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedFilteringTag.name = reader.getString(); + } else if ("value".equals(fieldName)) { + deserializedFilteringTag.value = reader.getString(); + } else if ("action".equals(fieldName)) { + deserializedFilteringTag.action = TagAction.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedFilteringTag; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/IdentityProperties.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/IdentityProperties.java index 116cfc619b491..57db863a0c20f 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/IdentityProperties.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/IdentityProperties.java @@ -6,45 +6,47 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.Map; -/** The properties of the managed service identities assigned to this resource. */ +/** + * The properties of the managed service identities assigned to this resource. + */ @Fluent -public final class IdentityProperties { +public final class IdentityProperties implements JsonSerializable { /* * The Active Directory tenant id of the principal. */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private String tenantId; /* * The active directory identifier of this principal. */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) private String principalId; /* * The type of managed identity assigned to this resource. */ - @JsonProperty(value = "type", required = true) private ManagedIdentityType type; /* * The identities assigned to this resource by the user. */ - @JsonProperty(value = "userAssignedIdentities") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; - /** Creates an instance of IdentityProperties class. */ + /** + * Creates an instance of IdentityProperties class. + */ public IdentityProperties() { } /** * Get the tenantId property: The Active Directory tenant id of the principal. - * + * * @return the tenantId value. */ public String tenantId() { @@ -53,7 +55,7 @@ public String tenantId() { /** * Get the principalId property: The active directory identifier of this principal. - * + * * @return the principalId value. */ public String principalId() { @@ -62,7 +64,7 @@ public String principalId() { /** * Get the type property: The type of managed identity assigned to this resource. - * + * * @return the type value. */ public ManagedIdentityType type() { @@ -71,7 +73,7 @@ public ManagedIdentityType type() { /** * Set the type property: The type of managed identity assigned to this resource. - * + * * @param type the type value to set. * @return the IdentityProperties object itself. */ @@ -82,7 +84,7 @@ public IdentityProperties withType(ManagedIdentityType type) { /** * Get the userAssignedIdentities property: The identities assigned to this resource by the user. - * + * * @return the userAssignedIdentities value. */ public Map userAssignedIdentities() { @@ -91,7 +93,7 @@ public Map userAssignedIdentities() { /** * Set the userAssignedIdentities property: The identities assigned to this resource by the user. - * + * * @param userAssignedIdentities the userAssignedIdentities value to set. * @return the IdentityProperties object itself. */ @@ -102,13 +104,13 @@ public IdentityProperties withUserAssignedIdentities(Map { @@ -120,4 +122,51 @@ public void validate() { } private static final ClientLogger LOGGER = new ClientLogger(IdentityProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdentityProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentityProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the IdentityProperties. + */ + public static IdentityProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentityProperties deserializedIdentityProperties = new IdentityProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedIdentityProperties.type = ManagedIdentityType.fromString(reader.getString()); + } else if ("tenantId".equals(fieldName)) { + deserializedIdentityProperties.tenantId = reader.getString(); + } else if ("principalId".equals(fieldName)) { + deserializedIdentityProperties.principalId = reader.getString(); + } else if ("userAssignedIdentities".equals(fieldName)) { + Map userAssignedIdentities + = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); + deserializedIdentityProperties.userAssignedIdentities = userAssignedIdentities; + } else { + reader.skipChildren(); + } + } + + return deserializedIdentityProperties; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LiftrResourceCategories.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LiftrResourceCategories.java index 2bc207d210274..4c9ef7285d0e5 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LiftrResourceCategories.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LiftrResourceCategories.java @@ -5,20 +5,25 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Liftr resource category. */ +/** + * Liftr resource category. + */ public final class LiftrResourceCategories extends ExpandableStringEnum { - /** Static value Unknown for LiftrResourceCategories. */ + /** + * Static value Unknown for LiftrResourceCategories. + */ public static final LiftrResourceCategories UNKNOWN = fromString("Unknown"); - /** Static value MonitorLogs for LiftrResourceCategories. */ + /** + * Static value MonitorLogs for LiftrResourceCategories. + */ public static final LiftrResourceCategories MONITOR_LOGS = fromString("MonitorLogs"); /** * Creates a new instance of LiftrResourceCategories value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,18 +32,17 @@ public LiftrResourceCategories() { /** * Creates or finds a LiftrResourceCategories from its string representation. - * + * * @param name a name to look for. * @return the corresponding LiftrResourceCategories. */ - @JsonCreator public static LiftrResourceCategories fromString(String name) { return fromString(name, LiftrResourceCategories.class); } /** * Gets known LiftrResourceCategories values. - * + * * @return known LiftrResourceCategories values. */ public static Collection values() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LinkableEnvironmentListResponse.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LinkableEnvironmentListResponse.java index 7997c820cf700..081346b56019d 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LinkableEnvironmentListResponse.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LinkableEnvironmentListResponse.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.dynatrace.fluent.models.LinkableEnvironmentResponseInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** Response for getting all the linkable environments. */ +/** + * Response for getting all the linkable environments. + */ @Fluent -public final class LinkableEnvironmentListResponse { +public final class LinkableEnvironmentListResponse implements JsonSerializable { /* * List of environments for which user is an admin */ - @JsonProperty(value = "value") private List value; /* * Link to the next set of results, if any. */ - @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of LinkableEnvironmentListResponse class. */ + /** + * Creates an instance of LinkableEnvironmentListResponse class. + */ public LinkableEnvironmentListResponse() { } /** * Get the value property: List of environments for which user is an admin. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Set the value property: List of environments for which user is an admin. - * + * * @param value the value value to set. * @return the LinkableEnvironmentListResponse object itself. */ @@ -50,7 +56,7 @@ public LinkableEnvironmentListResponse withValue(List e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LinkableEnvironmentListResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LinkableEnvironmentListResponse if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LinkableEnvironmentListResponse. + */ + public static LinkableEnvironmentListResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LinkableEnvironmentListResponse deserializedLinkableEnvironmentListResponse + = new LinkableEnvironmentListResponse(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> LinkableEnvironmentResponseInner.fromJson(reader1)); + deserializedLinkableEnvironmentListResponse.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedLinkableEnvironmentListResponse.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLinkableEnvironmentListResponse; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LinkableEnvironmentRequest.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LinkableEnvironmentRequest.java index 960eec6790c76..5b31c3c937476 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LinkableEnvironmentRequest.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LinkableEnvironmentRequest.java @@ -6,36 +6,41 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Request for getting all the linkable environments for a user. */ +/** + * Request for getting all the linkable environments for a user. + */ @Fluent -public final class LinkableEnvironmentRequest { +public final class LinkableEnvironmentRequest implements JsonSerializable { /* * Tenant Id of the user in which they want to link the environment */ - @JsonProperty(value = "tenantId", required = true) private String tenantId; /* * user principal id of the user */ - @JsonProperty(value = "userPrincipal", required = true) private String userPrincipal; /* * Azure region in which we want to link the environment */ - @JsonProperty(value = "region", required = true) private String region; - /** Creates an instance of LinkableEnvironmentRequest class. */ + /** + * Creates an instance of LinkableEnvironmentRequest class. + */ public LinkableEnvironmentRequest() { } /** * Get the tenantId property: Tenant Id of the user in which they want to link the environment. - * + * * @return the tenantId value. */ public String tenantId() { @@ -44,7 +49,7 @@ public String tenantId() { /** * Set the tenantId property: Tenant Id of the user in which they want to link the environment. - * + * * @param tenantId the tenantId value to set. * @return the LinkableEnvironmentRequest object itself. */ @@ -55,7 +60,7 @@ public LinkableEnvironmentRequest withTenantId(String tenantId) { /** * Get the userPrincipal property: user principal id of the user. - * + * * @return the userPrincipal value. */ public String userPrincipal() { @@ -64,7 +69,7 @@ public String userPrincipal() { /** * Set the userPrincipal property: user principal id of the user. - * + * * @param userPrincipal the userPrincipal value to set. * @return the LinkableEnvironmentRequest object itself. */ @@ -75,7 +80,7 @@ public LinkableEnvironmentRequest withUserPrincipal(String userPrincipal) { /** * Get the region property: Azure region in which we want to link the environment. - * + * * @return the region value. */ public String region() { @@ -84,7 +89,7 @@ public String region() { /** * Set the region property: Azure region in which we want to link the environment. - * + * * @param region the region value to set. * @return the LinkableEnvironmentRequest object itself. */ @@ -95,23 +100,69 @@ public LinkableEnvironmentRequest withRegion(String region) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (tenantId() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property tenantId in model LinkableEnvironmentRequest")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property tenantId in model LinkableEnvironmentRequest")); } if (userPrincipal() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property userPrincipal in model LinkableEnvironmentRequest")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property userPrincipal in model LinkableEnvironmentRequest")); } if (region() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property region in model LinkableEnvironmentRequest")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property region in model LinkableEnvironmentRequest")); } } private static final ClientLogger LOGGER = new ClientLogger(LinkableEnvironmentRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("tenantId", this.tenantId); + jsonWriter.writeStringField("userPrincipal", this.userPrincipal); + jsonWriter.writeStringField("region", this.region); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LinkableEnvironmentRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LinkableEnvironmentRequest if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LinkableEnvironmentRequest. + */ + public static LinkableEnvironmentRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LinkableEnvironmentRequest deserializedLinkableEnvironmentRequest = new LinkableEnvironmentRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tenantId".equals(fieldName)) { + deserializedLinkableEnvironmentRequest.tenantId = reader.getString(); + } else if ("userPrincipal".equals(fieldName)) { + deserializedLinkableEnvironmentRequest.userPrincipal = reader.getString(); + } else if ("region".equals(fieldName)) { + deserializedLinkableEnvironmentRequest.region = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLinkableEnvironmentRequest; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LinkableEnvironmentResponse.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LinkableEnvironmentResponse.java index f15b2b8c1e9d5..eb720e1b8b375 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LinkableEnvironmentResponse.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LinkableEnvironmentResponse.java @@ -6,32 +6,34 @@ import com.azure.resourcemanager.dynatrace.fluent.models.LinkableEnvironmentResponseInner; -/** An immutable client-side representation of LinkableEnvironmentResponse. */ +/** + * An immutable client-side representation of LinkableEnvironmentResponse. + */ public interface LinkableEnvironmentResponse { /** * Gets the environmentId property: environment id for which user is an admin. - * + * * @return the environmentId value. */ String environmentId(); /** * Gets the environmentName property: Name of the environment. - * + * * @return the environmentName value. */ String environmentName(); /** * Gets the planData property: Billing plan information. - * + * * @return the planData value. */ PlanData planData(); /** * Gets the inner com.azure.resourcemanager.dynatrace.fluent.models.LinkableEnvironmentResponseInner object. - * + * * @return the inner object. */ LinkableEnvironmentResponseInner innerModel(); diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LogModule.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LogModule.java index 1e3b0d1c200ad..7a3dd07b0d537 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LogModule.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LogModule.java @@ -5,20 +5,25 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Tells whether log modules are enabled or not. */ +/** + * Tells whether log modules are enabled or not. + */ public final class LogModule extends ExpandableStringEnum { - /** Static value ENABLED for LogModule. */ + /** + * Static value ENABLED for LogModule. + */ public static final LogModule ENABLED = fromString("ENABLED"); - /** Static value DISABLED for LogModule. */ + /** + * Static value DISABLED for LogModule. + */ public static final LogModule DISABLED = fromString("DISABLED"); /** * Creates a new instance of LogModule value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,18 +32,17 @@ public LogModule() { /** * Creates or finds a LogModule from its string representation. - * + * * @param name a name to look for. * @return the corresponding LogModule. */ - @JsonCreator public static LogModule fromString(String name) { return fromString(name, LogModule.class); } /** * Gets known LogModule values. - * + * * @return known LogModule values. */ public static Collection values() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LogRules.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LogRules.java index 3bac8ad5316d0..1e43bdd0f8019 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LogRules.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/LogRules.java @@ -5,46 +5,50 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** Set of rules for sending logs for the Monitor resource. */ +/** + * Set of rules for sending logs for the Monitor resource. + */ @Fluent -public final class LogRules { +public final class LogRules implements JsonSerializable { /* * Flag specifying if AAD logs should be sent for the Monitor resource. */ - @JsonProperty(value = "sendAadLogs") private SendAadLogsStatus sendAadLogs; /* * Flag specifying if subscription logs should be sent for the Monitor resource. */ - @JsonProperty(value = "sendSubscriptionLogs") private SendSubscriptionLogsStatus sendSubscriptionLogs; /* * Flag specifying if activity logs from Azure resources should be sent for the Monitor resource. */ - @JsonProperty(value = "sendActivityLogs") private SendActivityLogsStatus sendActivityLogs; /* - * List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs flag is - * enabled. If empty, all resources will be captured. + * List of filtering tags to be used for capturing logs. This only takes effect if SendActivityLogs 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; - /** Creates an instance of LogRules class. */ + /** + * Creates an instance of LogRules class. + */ public LogRules() { } /** * Get the sendAadLogs property: Flag specifying if AAD logs should be sent for the Monitor resource. - * + * * @return the sendAadLogs value. */ public SendAadLogsStatus sendAadLogs() { @@ -53,7 +57,7 @@ public SendAadLogsStatus sendAadLogs() { /** * Set the sendAadLogs property: Flag specifying if AAD logs should be sent for the Monitor resource. - * + * * @param sendAadLogs the sendAadLogs value to set. * @return the LogRules object itself. */ @@ -65,7 +69,7 @@ public LogRules withSendAadLogs(SendAadLogsStatus sendAadLogs) { /** * Get the sendSubscriptionLogs property: Flag specifying if subscription logs should be sent for the Monitor * resource. - * + * * @return the sendSubscriptionLogs value. */ public SendSubscriptionLogsStatus sendSubscriptionLogs() { @@ -75,7 +79,7 @@ public SendSubscriptionLogsStatus sendSubscriptionLogs() { /** * Set the sendSubscriptionLogs property: Flag specifying if subscription logs should be sent for the Monitor * resource. - * + * * @param sendSubscriptionLogs the sendSubscriptionLogs value to set. * @return the LogRules object itself. */ @@ -87,7 +91,7 @@ public LogRules withSendSubscriptionLogs(SendSubscriptionLogsStatus sendSubscrip /** * Get the sendActivityLogs property: Flag specifying if activity logs from Azure resources should be sent for the * Monitor resource. - * + * * @return the sendActivityLogs value. */ public SendActivityLogsStatus sendActivityLogs() { @@ -97,7 +101,7 @@ public SendActivityLogsStatus sendActivityLogs() { /** * Set the sendActivityLogs property: Flag specifying if activity logs from Azure resources should be sent for the * Monitor resource. - * + * * @param sendActivityLogs the sendActivityLogs value to set. * @return the LogRules object itself. */ @@ -108,10 +112,10 @@ public LogRules withSendActivityLogs(SendActivityLogsStatus sendActivityLogs) { /** * Get the filteringTags property: List of filtering tags to be used for capturing logs. This only takes effect if - * SendActivityLogs 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. - * + * SendActivityLogs 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. + * * @return the filteringTags value. */ public List filteringTags() { @@ -120,10 +124,10 @@ public List filteringTags() { /** * Set the filteringTags property: List of filtering tags to be used for capturing logs. This only takes effect if - * SendActivityLogs 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. - * + * SendActivityLogs 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. + * * @param filteringTags the filteringTags value to set. * @return the LogRules object itself. */ @@ -134,7 +138,7 @@ public LogRules withFilteringTags(List filteringTags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -142,4 +146,53 @@ public void validate() { filteringTags().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sendAadLogs", this.sendAadLogs == null ? null : this.sendAadLogs.toString()); + jsonWriter.writeStringField("sendSubscriptionLogs", + this.sendSubscriptionLogs == null ? null : this.sendSubscriptionLogs.toString()); + jsonWriter.writeStringField("sendActivityLogs", + this.sendActivityLogs == null ? null : this.sendActivityLogs.toString()); + jsonWriter.writeArrayField("filteringTags", this.filteringTags, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LogRules from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LogRules if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the LogRules. + */ + public static LogRules fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LogRules deserializedLogRules = new LogRules(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sendAadLogs".equals(fieldName)) { + deserializedLogRules.sendAadLogs = SendAadLogsStatus.fromString(reader.getString()); + } else if ("sendSubscriptionLogs".equals(fieldName)) { + deserializedLogRules.sendSubscriptionLogs + = SendSubscriptionLogsStatus.fromString(reader.getString()); + } else if ("sendActivityLogs".equals(fieldName)) { + deserializedLogRules.sendActivityLogs = SendActivityLogsStatus.fromString(reader.getString()); + } else if ("filteringTags".equals(fieldName)) { + List filteringTags = reader.readArray(reader1 -> FilteringTag.fromJson(reader1)); + deserializedLogRules.filteringTags = filteringTags; + } else { + reader.skipChildren(); + } + } + + return deserializedLogRules; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ManagedIdentityType.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ManagedIdentityType.java index 4a3473ffffbf3..438dbdab33c2b 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ManagedIdentityType.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ManagedIdentityType.java @@ -5,23 +5,30 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The kind of managed identity assigned to this resource. */ +/** + * The kind of managed identity assigned to this resource. + */ public final class ManagedIdentityType extends ExpandableStringEnum { - /** Static value SystemAssigned for ManagedIdentityType. */ + /** + * Static value SystemAssigned for ManagedIdentityType. + */ public static final ManagedIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - /** Static value UserAssigned for ManagedIdentityType. */ + /** + * Static value UserAssigned for ManagedIdentityType. + */ public static final ManagedIdentityType USER_ASSIGNED = fromString("UserAssigned"); - /** Static value SystemAndUserAssigned for ManagedIdentityType. */ + /** + * Static value SystemAndUserAssigned for ManagedIdentityType. + */ public static final ManagedIdentityType SYSTEM_AND_USER_ASSIGNED = fromString("SystemAndUserAssigned"); /** * Creates a new instance of ManagedIdentityType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,18 +37,17 @@ public ManagedIdentityType() { /** * Creates or finds a ManagedIdentityType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ManagedIdentityType. */ - @JsonCreator public static ManagedIdentityType fromString(String name) { return fromString(name, ManagedIdentityType.class); } /** * Gets known ManagedIdentityType values. - * + * * @return known ManagedIdentityType values. */ public static Collection values() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MarketplaceSaaSResourceDetailsRequest.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MarketplaceSaaSResourceDetailsRequest.java index aa1d8ec94c149..ec9811cd68945 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MarketplaceSaaSResourceDetailsRequest.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MarketplaceSaaSResourceDetailsRequest.java @@ -6,24 +6,32 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Request for getting Marketplace SaaS resource details for a tenant Id. */ +/** + * Request for getting Marketplace SaaS resource details for a tenant Id. + */ @Fluent -public final class MarketplaceSaaSResourceDetailsRequest { +public final class MarketplaceSaaSResourceDetailsRequest + implements JsonSerializable { /* * Tenant Id */ - @JsonProperty(value = "tenantId", required = true) private String tenantId; - /** Creates an instance of MarketplaceSaaSResourceDetailsRequest class. */ + /** + * Creates an instance of MarketplaceSaaSResourceDetailsRequest class. + */ public MarketplaceSaaSResourceDetailsRequest() { } /** * Get the tenantId property: Tenant Id. - * + * * @return the tenantId value. */ public String tenantId() { @@ -32,7 +40,7 @@ public String tenantId() { /** * Set the tenantId property: Tenant Id. - * + * * @param tenantId the tenantId value to set. * @return the MarketplaceSaaSResourceDetailsRequest object itself. */ @@ -43,15 +51,54 @@ public MarketplaceSaaSResourceDetailsRequest withTenantId(String tenantId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (tenantId() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property tenantId in model MarketplaceSaaSResourceDetailsRequest")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property tenantId in model MarketplaceSaaSResourceDetailsRequest")); } } private static final ClientLogger LOGGER = new ClientLogger(MarketplaceSaaSResourceDetailsRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("tenantId", this.tenantId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MarketplaceSaaSResourceDetailsRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MarketplaceSaaSResourceDetailsRequest if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MarketplaceSaaSResourceDetailsRequest. + */ + public static MarketplaceSaaSResourceDetailsRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MarketplaceSaaSResourceDetailsRequest deserializedMarketplaceSaaSResourceDetailsRequest + = new MarketplaceSaaSResourceDetailsRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tenantId".equals(fieldName)) { + deserializedMarketplaceSaaSResourceDetailsRequest.tenantId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMarketplaceSaaSResourceDetailsRequest; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MarketplaceSaaSResourceDetailsResponse.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MarketplaceSaaSResourceDetailsResponse.java index 8c1412e3a2b5e..440f984d65076 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MarketplaceSaaSResourceDetailsResponse.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MarketplaceSaaSResourceDetailsResponse.java @@ -6,25 +6,27 @@ import com.azure.resourcemanager.dynatrace.fluent.models.MarketplaceSaaSResourceDetailsResponseInner; -/** An immutable client-side representation of MarketplaceSaaSResourceDetailsResponse. */ +/** + * An immutable client-side representation of MarketplaceSaaSResourceDetailsResponse. + */ public interface MarketplaceSaaSResourceDetailsResponse { /** * Gets the marketplaceSaaSResourceId property: Id of the Marketplace SaaS Resource. - * + * * @return the marketplaceSaaSResourceId value. */ String marketplaceSaaSResourceId(); /** * Gets the planId property: Id of the plan. - * + * * @return the planId value. */ String planId(); /** * Gets the marketplaceSubscriptionStatus property: Marketplace subscription status. - * + * * @return the marketplaceSubscriptionStatus value. */ MarketplaceSubscriptionStatus marketplaceSubscriptionStatus(); @@ -32,7 +34,7 @@ public interface MarketplaceSaaSResourceDetailsResponse { /** * Gets the inner com.azure.resourcemanager.dynatrace.fluent.models.MarketplaceSaaSResourceDetailsResponseInner * object. - * + * * @return the inner object. */ MarketplaceSaaSResourceDetailsResponseInner innerModel(); diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MarketplaceSubscriptionStatus.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MarketplaceSubscriptionStatus.java index d28a9cda0d045..6d2ed8ea102c9 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MarketplaceSubscriptionStatus.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MarketplaceSubscriptionStatus.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -13,15 +12,19 @@ * will go in Suspended state. */ public final class MarketplaceSubscriptionStatus extends ExpandableStringEnum { - /** Static value Active for MarketplaceSubscriptionStatus. */ + /** + * Static value Active for MarketplaceSubscriptionStatus. + */ public static final MarketplaceSubscriptionStatus ACTIVE = fromString("Active"); - /** Static value Suspended for MarketplaceSubscriptionStatus. */ + /** + * Static value Suspended for MarketplaceSubscriptionStatus. + */ public static final MarketplaceSubscriptionStatus SUSPENDED = fromString("Suspended"); /** * Creates a new instance of MarketplaceSubscriptionStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,18 +33,17 @@ public MarketplaceSubscriptionStatus() { /** * Creates or finds a MarketplaceSubscriptionStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding MarketplaceSubscriptionStatus. */ - @JsonCreator public static MarketplaceSubscriptionStatus fromString(String name) { return fromString(name, MarketplaceSubscriptionStatus.class); } /** * Gets known MarketplaceSubscriptionStatus values. - * + * * @return known MarketplaceSubscriptionStatus values. */ public static Collection values() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MetricRules.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MetricRules.java index b130ccc5bf198..8c4a0df41ccbb 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MetricRules.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MetricRules.java @@ -5,16 +5,21 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.List; -/** Set of rules for sending metrics for the Monitor resource. */ +/** + * Set of rules for sending metrics for the Monitor resource. + */ @Fluent -public final class MetricRules { +public final class MetricRules implements JsonSerializable { /* * Flag specifying if metrics from Azure resources should be sent for the Monitor resource. */ - @JsonProperty(value = "sendingMetrics") private SendingMetricsStatus sendingMetrics; /* @@ -22,17 +27,18 @@ public final class MetricRules { * 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; - /** Creates an instance of MetricRules class. */ + /** + * Creates an instance of MetricRules class. + */ public MetricRules() { } /** * Get the sendingMetrics property: Flag specifying if metrics from Azure resources should be sent for the Monitor * resource. - * + * * @return the sendingMetrics value. */ public SendingMetricsStatus sendingMetrics() { @@ -42,7 +48,7 @@ public SendingMetricsStatus sendingMetrics() { /** * Set the sendingMetrics property: Flag specifying if metrics from Azure resources should be sent for the Monitor * resource. - * + * * @param sendingMetrics the sendingMetrics value to set. * @return the MetricRules object itself. */ @@ -55,7 +61,7 @@ public MetricRules withSendingMetrics(SendingMetricsStatus sendingMetrics) { * Get the filteringTags property: 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. - * + * * @return the filteringTags value. */ public List filteringTags() { @@ -66,7 +72,7 @@ public List filteringTags() { * Set the filteringTags property: 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. - * + * * @param filteringTags the filteringTags value to set. * @return the MetricRules object itself. */ @@ -77,7 +83,7 @@ public MetricRules withFilteringTags(List filteringTags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -85,4 +91,45 @@ public void validate() { filteringTags().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("sendingMetrics", + this.sendingMetrics == null ? null : this.sendingMetrics.toString()); + jsonWriter.writeArrayField("filteringTags", this.filteringTags, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MetricRules from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MetricRules if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the MetricRules. + */ + public static MetricRules fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MetricRules deserializedMetricRules = new MetricRules(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("sendingMetrics".equals(fieldName)) { + deserializedMetricRules.sendingMetrics = SendingMetricsStatus.fromString(reader.getString()); + } else if ("filteringTags".equals(fieldName)) { + List filteringTags = reader.readArray(reader1 -> FilteringTag.fromJson(reader1)); + deserializedMetricRules.filteringTags = filteringTags; + } else { + reader.skipChildren(); + } + } + + return deserializedMetricRules; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MetricsStatusResponse.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MetricsStatusResponse.java index 287f2029fc64b..6082eb09c2e83 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MetricsStatusResponse.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MetricsStatusResponse.java @@ -7,18 +7,20 @@ import com.azure.resourcemanager.dynatrace.fluent.models.MetricsStatusResponseInner; import java.util.List; -/** An immutable client-side representation of MetricsStatusResponse. */ +/** + * An immutable client-side representation of MetricsStatusResponse. + */ public interface MetricsStatusResponse { /** * Gets the azureResourceIds property: Azure resource IDs. - * + * * @return the azureResourceIds value. */ List azureResourceIds(); /** * Gets the inner com.azure.resourcemanager.dynatrace.fluent.models.MetricsStatusResponseInner object. - * + * * @return the inner object. */ MetricsStatusResponseInner innerModel(); diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResource.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResource.java index 2a071ab1169f1..a49e87f2df768 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResource.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResource.java @@ -12,157 +12,167 @@ import com.azure.resourcemanager.dynatrace.fluent.models.MonitorResourceInner; import java.util.Map; -/** An immutable client-side representation of MonitorResource. */ +/** + * An immutable client-side representation of MonitorResource. + */ public interface MonitorResource { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** * Gets the systemData property: System metadata for this resource. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the identity property: The managed service identities assigned to this resource. - * + * * @return the identity value. */ IdentityProperties identity(); /** * Gets the monitoringStatus property: Status of the monitor. - * + * * @return the monitoringStatus value. */ MonitoringStatus monitoringStatus(); /** * Gets the marketplaceSubscriptionStatus property: Marketplace subscription status. - * + * * @return the marketplaceSubscriptionStatus value. */ MarketplaceSubscriptionStatus marketplaceSubscriptionStatus(); /** * Gets the dynatraceEnvironmentProperties property: Properties of the Dynatrace environment. - * + * * @return the dynatraceEnvironmentProperties value. */ DynatraceEnvironmentProperties dynatraceEnvironmentProperties(); /** * Gets the userInfo property: User info. - * + * * @return the userInfo value. */ UserInfo userInfo(); /** * Gets the planData property: Billing plan information. - * + * * @return the planData value. */ PlanData planData(); /** * Gets the liftrResourceCategory property: Liftr Resource category. - * + * * @return the liftrResourceCategory value. */ LiftrResourceCategories liftrResourceCategory(); /** * Gets the liftrResourcePreference property: The priority of the resource. - * + * * @return the liftrResourcePreference value. */ Integer liftrResourcePreference(); /** * Gets the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ ProvisioningState provisioningState(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.dynatrace.fluent.models.MonitorResourceInner object. - * + * * @return the inner object. */ MonitorResourceInner innerModel(); - /** The entirety of the MonitorResource definition. */ + /** + * The entirety of the MonitorResource definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The MonitorResource definition stages. */ + /** + * The MonitorResource definition stages. + */ interface DefinitionStages { - /** The first stage of the MonitorResource definition. */ + /** + * The first stage of the MonitorResource definition. + */ interface Blank extends WithLocation { } - /** The stage of the MonitorResource definition allowing to specify location. */ + /** + * The stage of the MonitorResource definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -170,18 +180,20 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the MonitorResource definition allowing to specify parent resource. */ + /** + * The stage of the MonitorResource definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ @@ -198,69 +210,79 @@ interface WithCreate DefinitionStages.WithUserInfo, DefinitionStages.WithPlanData { /** * Executes the create request. - * + * * @return the created resource. */ MonitorResource create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ MonitorResource create(Context context); } - /** The stage of the MonitorResource definition allowing to specify tags. */ + /** + * The stage of the MonitorResource definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the MonitorResource definition allowing to specify identity. */ + /** + * The stage of the MonitorResource definition allowing to specify identity. + */ interface WithIdentity { /** * Specifies the identity property: The managed service identities assigned to this resource.. - * + * * @param identity The managed service identities assigned to this resource. * @return the next definition stage. */ WithCreate withIdentity(IdentityProperties identity); } - /** The stage of the MonitorResource definition allowing to specify monitoringStatus. */ + /** + * The stage of the MonitorResource definition allowing to specify monitoringStatus. + */ interface WithMonitoringStatus { /** * Specifies the monitoringStatus property: Status of the monitor.. - * + * * @param monitoringStatus Status of the monitor. * @return the next definition stage. */ WithCreate withMonitoringStatus(MonitoringStatus monitoringStatus); } - /** The stage of the MonitorResource definition allowing to specify marketplaceSubscriptionStatus. */ + /** + * The stage of the MonitorResource definition allowing to specify marketplaceSubscriptionStatus. + */ interface WithMarketplaceSubscriptionStatus { /** * Specifies the marketplaceSubscriptionStatus property: Marketplace subscription status.. - * + * * @param marketplaceSubscriptionStatus Marketplace subscription status. * @return the next definition stage. */ WithCreate withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus marketplaceSubscriptionStatus); } - /** The stage of the MonitorResource definition allowing to specify dynatraceEnvironmentProperties. */ + /** + * The stage of the MonitorResource definition allowing to specify dynatraceEnvironmentProperties. + */ interface WithDynatraceEnvironmentProperties { /** * Specifies the dynatraceEnvironmentProperties property: Properties of the Dynatrace environment.. - * + * * @param dynatraceEnvironmentProperties Properties of the Dynatrace environment. * @return the next definition stage. */ @@ -268,22 +290,26 @@ interface WithDynatraceEnvironmentProperties { withDynatraceEnvironmentProperties(DynatraceEnvironmentProperties dynatraceEnvironmentProperties); } - /** The stage of the MonitorResource definition allowing to specify userInfo. */ + /** + * The stage of the MonitorResource definition allowing to specify userInfo. + */ interface WithUserInfo { /** * Specifies the userInfo property: User info.. - * + * * @param userInfo User info. * @return the next definition stage. */ WithCreate withUserInfo(UserInfo userInfo); } - /** The stage of the MonitorResource definition allowing to specify planData. */ + /** + * The stage of the MonitorResource definition allowing to specify planData. + */ interface WithPlanData { /** * Specifies the planData property: Billing plan information.. - * + * * @param planData Billing plan information. * @return the next definition stage. */ @@ -293,36 +319,42 @@ interface WithPlanData { /** * Begins update for the MonitorResource resource. - * + * * @return the stage of resource update. */ MonitorResource.Update update(); - /** The template for MonitorResource update. */ + /** + * The template for MonitorResource update. + */ interface Update extends UpdateStages.WithTags { /** * Executes the update request. - * + * * @return the updated resource. */ MonitorResource apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ MonitorResource apply(Context context); } - /** The MonitorResource update stages. */ + /** + * The MonitorResource update stages. + */ interface UpdateStages { - /** The stage of the MonitorResource update allowing to specify tags. */ + /** + * The stage of the MonitorResource update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ @@ -332,14 +364,14 @@ interface WithTags { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ MonitorResource refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -347,29 +379,29 @@ interface WithTags { /** * List the resources currently being monitored by the Dynatrace monitor resource. - * + * * @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 list of all the resources being monitored by Dynatrace monitor resource as paginated response with {@link - * PagedIterable}. + * @return list of all the resources being monitored by Dynatrace monitor resource as paginated response with + * {@link PagedIterable}. */ PagedIterable listMonitoredResources(); /** * List the resources currently being monitored by the Dynatrace monitor resource. - * + * * @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 list of all the resources being monitored by Dynatrace monitor resource as paginated response with {@link - * PagedIterable}. + * @return list of all the resources being monitored by Dynatrace monitor resource as paginated response with + * {@link PagedIterable}. */ PagedIterable listMonitoredResources(Context context); /** * Returns the payload that needs to be passed in the request body for installing Dynatrace agent on a VM. - * + * * @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. @@ -380,7 +412,7 @@ interface WithTags { /** * Returns the payload that needs to be passed in the request body for installing Dynatrace agent on a VM. - * + * * @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 payload to be passed while installing VM agent. @@ -389,7 +421,7 @@ interface WithTags { /** * List the VM/VMSS resources currently being monitored by the Dynatrace resource. - * + * * @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 VM Host Operation as paginated response with {@link PagedIterable}. @@ -398,7 +430,7 @@ interface WithTags { /** * List the VM/VMSS resources currently being monitored by the Dynatrace resource. - * + * * @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. @@ -409,7 +441,7 @@ interface WithTags { /** * Get metric status. - * + * * @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. @@ -420,7 +452,7 @@ interface WithTags { /** * Get metric status. - * + * * @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 metric status. @@ -429,35 +461,35 @@ interface WithTags { /** * Gets list of App Services with Dynatrace PaaS OneAgent enabled. - * + * * @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 list of App Services with Dynatrace PaaS OneAgent enabled as paginated response with {@link - * PagedIterable}. + * @return list of App Services with Dynatrace PaaS OneAgent enabled as paginated response with + * {@link PagedIterable}. */ PagedIterable listAppServices(); /** * Gets list of App Services with Dynatrace PaaS OneAgent enabled. - * + * * @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 list of App Services with Dynatrace PaaS OneAgent enabled as paginated response with {@link - * PagedIterable}. + * @return list of App Services with Dynatrace PaaS OneAgent enabled as paginated response with + * {@link PagedIterable}. */ PagedIterable listAppServices(Context context); /** * Gets the SSO configuration details from the partner. - * + * * @param request The details of the get sso details request. * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 401. + * status code 401. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the SSO configuration details from the partner along with {@link Response}. */ @@ -465,10 +497,10 @@ interface WithTags { /** * Gets the SSO configuration details from the partner. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 401. + * status code 401. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the SSO configuration details from the partner. */ @@ -476,26 +508,26 @@ interface WithTags { /** * Gets all the Dynatrace environments that a user can link a azure resource to. - * + * * @param request The details of the linkable environment request. * @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 all the Dynatrace environments that a user can link a azure resource to as paginated response with {@link - * PagedIterable}. + * @return all the Dynatrace environments that a user can link a azure resource to as paginated response with + * {@link PagedIterable}. */ PagedIterable listLinkableEnvironments(LinkableEnvironmentRequest request); /** * Gets all the Dynatrace environments that a user can link a azure resource to. - * + * * @param request The details of the linkable environment request. * @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 all the Dynatrace environments that a user can link a azure resource to as paginated response with {@link - * PagedIterable}. + * @return all the Dynatrace environments that a user can link a azure resource to as paginated response with + * {@link PagedIterable}. */ PagedIterable listLinkableEnvironments(LinkableEnvironmentRequest request, Context context); diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResourceListResult.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResourceListResult.java index d0084166bb6c0..ecc6723ff3f4a 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResourceListResult.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResourceListResult.java @@ -6,32 +6,38 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.dynatrace.fluent.models.MonitorResourceInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** The response of a MonitorResource list operation. */ +/** + * The response of a MonitorResource list operation. + */ @Fluent -public final class MonitorResourceListResult { +public final class MonitorResourceListResult implements JsonSerializable { /* * The items on this page */ - @JsonProperty(value = "value", required = true) private List value; /* * The link to the next page of items */ - @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of MonitorResourceListResult class. */ + /** + * Creates an instance of MonitorResourceListResult class. + */ public MonitorResourceListResult() { } /** * Get the value property: The items on this page. - * + * * @return the value value. */ public List value() { @@ -40,7 +46,7 @@ public List value() { /** * Set the value property: The items on this page. - * + * * @param value the value value to set. * @return the MonitorResourceListResult object itself. */ @@ -51,7 +57,7 @@ public MonitorResourceListResult withValue(List value) { /** * Get the nextLink property: The link to the next page of items. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,7 +66,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of items. - * + * * @param nextLink the nextLink value to set. * @return the MonitorResourceListResult object itself. */ @@ -71,17 +77,60 @@ public MonitorResourceListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model MonitorResourceListResult")); + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property value in model MonitorResourceListResult")); } else { value().forEach(e -> e.validate()); } } private static final ClientLogger LOGGER = new ClientLogger(MonitorResourceListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MonitorResourceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MonitorResourceListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MonitorResourceListResult. + */ + public static MonitorResourceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MonitorResourceListResult deserializedMonitorResourceListResult = new MonitorResourceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> MonitorResourceInner.fromJson(reader1)); + deserializedMonitorResourceListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedMonitorResourceListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMonitorResourceListResult; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResourceUpdate.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResourceUpdate.java index a1cb08a0ef4ee..c35dc97d5883e 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResourceUpdate.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitorResourceUpdate.java @@ -5,27 +5,32 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.util.Map; -/** The updatable properties of the MonitorResource. */ +/** + * The updatable properties of the MonitorResource. + */ @Fluent -public final class MonitorResourceUpdate { +public final class MonitorResourceUpdate implements JsonSerializable { /* * Resource tags. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of MonitorResourceUpdate class. */ + /** + * Creates an instance of MonitorResourceUpdate class. + */ public MonitorResourceUpdate() { } /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -34,7 +39,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the MonitorResourceUpdate object itself. */ @@ -45,9 +50,46 @@ public MonitorResourceUpdate withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MonitorResourceUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MonitorResourceUpdate if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the MonitorResourceUpdate. + */ + public static MonitorResourceUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MonitorResourceUpdate deserializedMonitorResourceUpdate = new MonitorResourceUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedMonitorResourceUpdate.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedMonitorResourceUpdate; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoredResource.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoredResource.java index a4eed2158792a..c1d61c064261d 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoredResource.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoredResource.java @@ -6,18 +6,20 @@ import com.azure.resourcemanager.dynatrace.fluent.models.MonitoredResourceInner; -/** An immutable client-side representation of MonitoredResource. */ +/** + * An immutable client-side representation of MonitoredResource. + */ public interface MonitoredResource { /** * Gets the id property: The ARM id of the resource. - * + * * @return the id value. */ String id(); /** * Gets the sendingMetrics property: Flag indicating if resource is sending metrics to Dynatrace. - * + * * @return the sendingMetrics value. */ SendingMetricsStatus sendingMetrics(); @@ -25,28 +27,28 @@ public interface MonitoredResource { /** * Gets the reasonForMetricsStatus property: Reason for why the resource is sending metrics (or why it is not * sending). - * + * * @return the reasonForMetricsStatus value. */ String reasonForMetricsStatus(); /** * Gets the sendingLogs property: Flag indicating if resource is sending logs to Dynatrace. - * + * * @return the sendingLogs value. */ SendingLogsStatus sendingLogs(); /** * Gets the reasonForLogsStatus property: Reason for why the resource is sending logs (or why it is not sending). - * + * * @return the reasonForLogsStatus value. */ String reasonForLogsStatus(); /** * Gets the inner com.azure.resourcemanager.dynatrace.fluent.models.MonitoredResourceInner object. - * + * * @return the inner object. */ MonitoredResourceInner innerModel(); diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoredResourceListResponse.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoredResourceListResponse.java index 58d695d6d29d9..19728a0eeaee2 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoredResourceListResponse.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoredResourceListResponse.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.dynatrace.fluent.models.MonitoredResourceInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** List of all the resources being monitored by Dynatrace monitor resource. */ +/** + * List of all the resources being monitored by Dynatrace monitor resource. + */ @Fluent -public final class MonitoredResourceListResponse { +public final class MonitoredResourceListResponse implements JsonSerializable { /* * The items on this page */ - @JsonProperty(value = "value") private List value; /* * The link to the next page of items */ - @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of MonitoredResourceListResponse class. */ + /** + * Creates an instance of MonitoredResourceListResponse class. + */ public MonitoredResourceListResponse() { } /** * Get the value property: The items on this page. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Set the value property: The items on this page. - * + * * @param value the value value to set. * @return the MonitoredResourceListResponse object itself. */ @@ -50,7 +56,7 @@ public MonitoredResourceListResponse withValue(List valu /** * Get the nextLink property: The link to the next page of items. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +65,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of items. - * + * * @param nextLink the nextLink value to set. * @return the MonitoredResourceListResponse object itself. */ @@ -70,7 +76,7 @@ public MonitoredResourceListResponse withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -78,4 +84,46 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MonitoredResourceListResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MonitoredResourceListResponse if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MonitoredResourceListResponse. + */ + public static MonitoredResourceListResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MonitoredResourceListResponse deserializedMonitoredResourceListResponse + = new MonitoredResourceListResponse(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> MonitoredResourceInner.fromJson(reader1)); + deserializedMonitoredResourceListResponse.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedMonitoredResourceListResponse.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMonitoredResourceListResponse; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoringStatus.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoringStatus.java index 1a28c5cb96db9..20b3e468b1980 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoringStatus.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoringStatus.java @@ -5,20 +5,25 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Flag specifying if the resource monitoring is enabled or disabled. */ +/** + * Flag specifying if the resource monitoring is enabled or disabled. + */ public final class MonitoringStatus extends ExpandableStringEnum { - /** Static value Enabled for MonitoringStatus. */ + /** + * Static value Enabled for MonitoringStatus. + */ public static final MonitoringStatus ENABLED = fromString("Enabled"); - /** Static value Disabled for MonitoringStatus. */ + /** + * Static value Disabled for MonitoringStatus. + */ public static final MonitoringStatus DISABLED = fromString("Disabled"); /** * Creates a new instance of MonitoringStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,18 +32,17 @@ public MonitoringStatus() { /** * Creates or finds a MonitoringStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding MonitoringStatus. */ - @JsonCreator public static MonitoringStatus fromString(String name) { return fromString(name, MonitoringStatus.class); } /** * Gets known MonitoringStatus values. - * + * * @return known MonitoringStatus values. */ public static Collection values() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoringType.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoringType.java index 413ec19b38e5b..e1de443ca79eb 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoringType.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/MonitoringType.java @@ -5,20 +5,25 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The monitoring mode of OneAgent. */ +/** + * The monitoring mode of OneAgent. + */ public final class MonitoringType extends ExpandableStringEnum { - /** Static value CLOUD_INFRASTRUCTURE for MonitoringType. */ + /** + * Static value CLOUD_INFRASTRUCTURE for MonitoringType. + */ public static final MonitoringType CLOUD_INFRASTRUCTURE = fromString("CLOUD_INFRASTRUCTURE"); - /** Static value FULL_STACK for MonitoringType. */ + /** + * Static value FULL_STACK for MonitoringType. + */ public static final MonitoringType FULL_STACK = fromString("FULL_STACK"); /** * Creates a new instance of MonitoringType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,18 +32,17 @@ public MonitoringType() { /** * Creates or finds a MonitoringType from its string representation. - * + * * @param name a name to look for. * @return the corresponding MonitoringType. */ - @JsonCreator public static MonitoringType fromString(String name) { return fromString(name, MonitoringType.class); } /** * Gets known MonitoringType values. - * + * * @return known MonitoringType values. */ public static Collection values() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Monitors.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Monitors.java index 85ef830eb88fd..e4a3f02a7a3bc 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Monitors.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Monitors.java @@ -8,39 +8,41 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Monitors. */ +/** + * Resource collection API of Monitors. + */ public interface Monitors { /** * List the resources currently being monitored by the Dynatrace monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the resources being monitored by Dynatrace monitor resource as paginated response with {@link - * PagedIterable}. + * @return list of all the resources being monitored by Dynatrace monitor resource as paginated response with + * {@link PagedIterable}. */ PagedIterable listMonitoredResources(String resourceGroupName, String monitorName); /** * List the resources currently being monitored by the Dynatrace monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of all the resources being monitored by Dynatrace monitor resource as paginated response with {@link - * PagedIterable}. + * @return list of all the resources being monitored by Dynatrace monitor resource as paginated response with + * {@link PagedIterable}. */ PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, Context context); /** * Returns the payload that needs to be passed in the request body for installing Dynatrace agent on a VM. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -54,7 +56,7 @@ Response getVMHostPayloadWithResponse(String resourceGroupNa /** * Returns the payload that needs to be passed in the request body for installing Dynatrace agent on a VM. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -66,7 +68,7 @@ Response getVMHostPayloadWithResponse(String resourceGroupNa /** * Get a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -80,7 +82,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNam /** * Get a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -92,7 +94,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNam /** * Delete a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -103,7 +105,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNam /** * Delete a MonitorResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -115,7 +117,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNam /** * List all MonitorResource by subscriptionId. - * + * * @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 of a MonitorResource list operation as paginated response with {@link PagedIterable}. @@ -124,7 +126,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNam /** * List all MonitorResource by subscriptionId. - * + * * @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. @@ -135,7 +137,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNam /** * List MonitorResource resources by resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -146,7 +148,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNam /** * List MonitorResource resources by resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -158,13 +160,13 @@ Response getByResourceGroupWithResponse(String resourceGroupNam /** * Get Marketplace SaaS resource details of a tenant under a specific subscription. - * + * * @param request Tenant Id. * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return marketplace SaaS resource details of a tenant under a specific subscription along with {@link Response}. */ @@ -173,12 +175,12 @@ Response getByResourceGroupWithResponse(String resourceGroupNam /** * Get Marketplace SaaS resource details of a tenant under a specific subscription. - * + * * @param request Tenant Id. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return marketplace SaaS resource details of a tenant under a specific subscription. */ @@ -187,7 +189,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNam /** * List the VM/VMSS resources currently being monitored by the Dynatrace resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -199,7 +201,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNam /** * List the VM/VMSS resources currently being monitored by the Dynatrace resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -212,7 +214,7 @@ Response getByResourceGroupWithResponse(String resourceGroupNam /** * Get metric status. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitor resource. * @param context The context to associate with this operation. @@ -226,7 +228,7 @@ Response getMetricStatusWithResponse(String resourceGroup /** * Get metric status. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Name of the Monitor resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -238,34 +240,34 @@ Response getMetricStatusWithResponse(String resourceGroup /** * Gets list of App Services with Dynatrace PaaS OneAgent enabled. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of App Services with Dynatrace PaaS OneAgent enabled as paginated response with {@link - * PagedIterable}. + * @return list of App Services with Dynatrace PaaS OneAgent enabled as paginated response with + * {@link PagedIterable}. */ PagedIterable listAppServices(String resourceGroupName, String monitorName); /** * Gets list of App Services with Dynatrace PaaS OneAgent enabled. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of App Services with Dynatrace PaaS OneAgent enabled as paginated response with {@link - * PagedIterable}. + * @return list of App Services with Dynatrace PaaS OneAgent enabled as paginated response with + * {@link PagedIterable}. */ PagedIterable listAppServices(String resourceGroupName, String monitorName, Context context); /** * Gets the SSO configuration details from the partner. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param request The details of the get sso details request. @@ -273,7 +275,7 @@ Response getMetricStatusWithResponse(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 401. + * status code 401. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the SSO configuration details from the partner along with {@link Response}. */ @@ -282,13 +284,13 @@ Response getSsoDetailsWithResponse(String resourceGroupName, /** * Gets the SSO configuration details from the partner. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 401. + * status code 401. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the SSO configuration details from the partner. */ @@ -296,22 +298,22 @@ Response getSsoDetailsWithResponse(String resourceGroupName, /** * Gets all the Dynatrace environments that a user can link a azure resource to. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param request The details of the linkable environment request. * @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 all the Dynatrace environments that a user can link a azure resource to as paginated response with {@link - * PagedIterable}. + * @return all the Dynatrace environments that a user can link a azure resource to as paginated response with + * {@link PagedIterable}. */ PagedIterable listLinkableEnvironments(String resourceGroupName, String monitorName, LinkableEnvironmentRequest request); /** * Gets all the Dynatrace environments that a user can link a azure resource to. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param request The details of the linkable environment request. @@ -319,15 +321,15 @@ PagedIterable listLinkableEnvironments(String resou * @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 all the Dynatrace environments that a user can link a azure resource to as paginated response with {@link - * PagedIterable}. + * @return all the Dynatrace environments that a user can link a azure resource to as paginated response with + * {@link PagedIterable}. */ PagedIterable listLinkableEnvironments(String resourceGroupName, String monitorName, LinkableEnvironmentRequest request, Context context); /** * Get a MonitorResource. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -338,7 +340,7 @@ PagedIterable listLinkableEnvironments(String resou /** * Get a MonitorResource. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -350,7 +352,7 @@ PagedIterable listLinkableEnvironments(String resou /** * Delete a MonitorResource. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -360,7 +362,7 @@ PagedIterable listLinkableEnvironments(String resou /** * Delete a MonitorResource. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -371,7 +373,7 @@ PagedIterable listLinkableEnvironments(String resou /** * Begins definition for a new MonitorResource resource. - * + * * @param name resource name. * @return the first stage of the new MonitorResource definition. */ diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Operation.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Operation.java index ce9363dfb2885..8d2bd8f3a1b51 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Operation.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Operation.java @@ -6,12 +6,14 @@ import com.azure.resourcemanager.dynatrace.fluent.models.OperationInner; -/** An immutable client-side representation of Operation. */ +/** + * An immutable client-side representation of Operation. + */ public interface Operation { /** * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * + * * @return the name value. */ String name(); @@ -19,14 +21,14 @@ public interface Operation { /** * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane * operations and "false" for ARM/control-plane operations. - * + * * @return the isDataAction value. */ Boolean isDataAction(); /** * Gets the display property: Localized display information for this particular operation. - * + * * @return the display value. */ OperationDisplay display(); @@ -34,7 +36,7 @@ public interface Operation { /** * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". - * + * * @return the origin value. */ Origin origin(); @@ -42,14 +44,14 @@ public interface Operation { /** * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal * only APIs. - * + * * @return the actionType value. */ ActionType actionType(); /** * Gets the inner com.azure.resourcemanager.dynatrace.fluent.models.OperationInner object. - * + * * @return the inner object. */ OperationInner innerModel(); diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/OperationDisplay.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/OperationDisplay.java index 3f5471dd22c81..7964112b633be 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/OperationDisplay.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/OperationDisplay.java @@ -5,46 +5,50 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Localized display information for this particular operation. */ +/** + * Localized display information for this particular operation. + */ @Immutable -public final class OperationDisplay { +public final class OperationDisplay implements JsonSerializable { /* - * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft - * Compute". + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or + * "Microsoft Compute". */ - @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) private String provider; /* - * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job - * Schedule Collections". + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or + * "Job Schedule Collections". */ - @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) private String resource; /* - * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual - * Machine", "Restart Virtual Machine". + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. + * "Create or Update Virtual Machine", "Restart Virtual Machine". */ - @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) private String operation; /* * The short, localized friendly description of the operation; suitable for tool tips and detailed views. */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; - /** Creates an instance of OperationDisplay class. */ + /** + * Creates an instance of OperationDisplay class. + */ public OperationDisplay() { } /** * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring * Insights" or "Microsoft Compute". - * + * * @return the provider value. */ public String provider() { @@ -54,7 +58,7 @@ public String provider() { /** * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. * "Virtual Machines" or "Job Schedule Collections". - * + * * @return the resource value. */ public String resource() { @@ -64,7 +68,7 @@ public String resource() { /** * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. * "Create or Update Virtual Machine", "Restart Virtual Machine". - * + * * @return the operation value. */ public String operation() { @@ -74,7 +78,7 @@ public String operation() { /** * Get the description property: The short, localized friendly description of the operation; suitable for tool tips * and detailed views. - * + * * @return the description value. */ public String description() { @@ -83,9 +87,50 @@ public String description() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationDisplay from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationDisplay if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationDisplay. + */ + public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationDisplay deserializedOperationDisplay = new OperationDisplay(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provider".equals(fieldName)) { + deserializedOperationDisplay.provider = reader.getString(); + } else if ("resource".equals(fieldName)) { + deserializedOperationDisplay.resource = reader.getString(); + } else if ("operation".equals(fieldName)) { + deserializedOperationDisplay.operation = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedOperationDisplay.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationDisplay; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/OperationListResult.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/OperationListResult.java index 9055c9402dce7..00c020581b299 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/OperationListResult.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/OperationListResult.java @@ -5,8 +5,12 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.dynatrace.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; /** @@ -14,26 +18,26 @@ * results. */ @Immutable -public final class OperationListResult { +public final class OperationListResult implements JsonSerializable { /* * List of operations supported by the resource provider */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; /* * URL to get the next set of operation list results (if there are any). */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of OperationListResult class. */ + /** + * Creates an instance of OperationListResult class. + */ public OperationListResult() { } /** * Get the value property: List of operations supported by the resource provider. - * + * * @return the value value. */ public List value() { @@ -42,7 +46,7 @@ public List value() { /** * Get the nextLink property: URL to get the next set of operation list results (if there are any). - * + * * @return the nextLink value. */ public String nextLink() { @@ -51,7 +55,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -59,4 +63,42 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationListResult. + */ + public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationListResult deserializedOperationListResult = new OperationListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1)); + deserializedOperationListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedOperationListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationListResult; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Operations.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Operations.java index a16aa6b1379bf..1f27fa2e84113 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Operations.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Operations.java @@ -7,27 +7,29 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of Operations. */ +/** + * Resource collection API of Operations. + */ public interface Operations { /** * List the operations for Dynatrace.Observability. - * + * * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ PagedIterable list(); /** * List the operations for Dynatrace.Observability. - * + * * @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 a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Origin.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Origin.java index 93c8b13f3fcdb..f70af9c0ecb12 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Origin.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/Origin.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; /** @@ -13,18 +12,24 @@ * is "user,system". */ public final class Origin extends ExpandableStringEnum { - /** Static value user for Origin. */ + /** + * Static value user for Origin. + */ public static final Origin USER = fromString("user"); - /** Static value system for Origin. */ + /** + * Static value system for Origin. + */ public static final Origin SYSTEM = fromString("system"); - /** Static value user,system for Origin. */ + /** + * Static value user,system for Origin. + */ public static final Origin USER_SYSTEM = fromString("user,system"); /** * Creates a new instance of Origin value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,18 +38,17 @@ public Origin() { /** * Creates or finds a Origin from its string representation. - * + * * @param name a name to look for. * @return the corresponding Origin. */ - @JsonCreator public static Origin fromString(String name) { return fromString(name, Origin.class); } /** * Gets known Origin values. - * + * * @return known Origin values. */ public static Collection values() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/PlanData.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/PlanData.java index 4082118a3d0b8..cf6d8252a24c4 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/PlanData.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/PlanData.java @@ -5,43 +5,49 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; -/** Billing plan information. */ +/** + * Billing plan information. + */ @Fluent -public final class PlanData { +public final class PlanData implements JsonSerializable { /* * different usage type like PAYG/COMMITTED. this could be enum */ - @JsonProperty(value = "usageType") private String usageType; /* * different billing cycles like MONTHLY/WEEKLY. this could be enum */ - @JsonProperty(value = "billingCycle") private String billingCycle; /* * plan id as published by Dynatrace */ - @JsonProperty(value = "planDetails") private String planDetails; /* * date when plan was applied */ - @JsonProperty(value = "effectiveDate") private OffsetDateTime effectiveDate; - /** Creates an instance of PlanData class. */ + /** + * Creates an instance of PlanData class. + */ public PlanData() { } /** * Get the usageType property: different usage type like PAYG/COMMITTED. this could be enum. - * + * * @return the usageType value. */ public String usageType() { @@ -50,7 +56,7 @@ public String usageType() { /** * Set the usageType property: different usage type like PAYG/COMMITTED. this could be enum. - * + * * @param usageType the usageType value to set. * @return the PlanData object itself. */ @@ -61,7 +67,7 @@ public PlanData withUsageType(String usageType) { /** * Get the billingCycle property: different billing cycles like MONTHLY/WEEKLY. this could be enum. - * + * * @return the billingCycle value. */ public String billingCycle() { @@ -70,7 +76,7 @@ public String billingCycle() { /** * Set the billingCycle property: different billing cycles like MONTHLY/WEEKLY. this could be enum. - * + * * @param billingCycle the billingCycle value to set. * @return the PlanData object itself. */ @@ -81,7 +87,7 @@ public PlanData withBillingCycle(String billingCycle) { /** * Get the planDetails property: plan id as published by Dynatrace. - * + * * @return the planDetails value. */ public String planDetails() { @@ -90,7 +96,7 @@ public String planDetails() { /** * Set the planDetails property: plan id as published by Dynatrace. - * + * * @param planDetails the planDetails value to set. * @return the PlanData object itself. */ @@ -101,7 +107,7 @@ public PlanData withPlanDetails(String planDetails) { /** * Get the effectiveDate property: date when plan was applied. - * + * * @return the effectiveDate value. */ public OffsetDateTime effectiveDate() { @@ -110,7 +116,7 @@ public OffsetDateTime effectiveDate() { /** * Set the effectiveDate property: date when plan was applied. - * + * * @param effectiveDate the effectiveDate value to set. * @return the PlanData object itself. */ @@ -121,9 +127,56 @@ public PlanData withEffectiveDate(OffsetDateTime effectiveDate) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("usageType", this.usageType); + jsonWriter.writeStringField("billingCycle", this.billingCycle); + jsonWriter.writeStringField("planDetails", this.planDetails); + jsonWriter.writeStringField("effectiveDate", + this.effectiveDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.effectiveDate)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PlanData from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PlanData if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the PlanData. + */ + public static PlanData fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PlanData deserializedPlanData = new PlanData(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("usageType".equals(fieldName)) { + deserializedPlanData.usageType = reader.getString(); + } else if ("billingCycle".equals(fieldName)) { + deserializedPlanData.billingCycle = reader.getString(); + } else if ("planDetails".equals(fieldName)) { + deserializedPlanData.planDetails = reader.getString(); + } else if ("effectiveDate".equals(fieldName)) { + deserializedPlanData.effectiveDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedPlanData; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ProvisioningState.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ProvisioningState.java index a634fc5e04c5c..d77fe82bcc5cb 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ProvisioningState.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/ProvisioningState.java @@ -5,41 +5,60 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Provisioning state of the monitoring resource. */ +/** + * Provisioning state of the monitoring resource. + */ public final class ProvisioningState extends ExpandableStringEnum { - /** Static value Accepted for ProvisioningState. */ + /** + * Static value Accepted for ProvisioningState. + */ public static final ProvisioningState ACCEPTED = fromString("Accepted"); - /** Static value Creating for ProvisioningState. */ + /** + * Static value Creating for ProvisioningState. + */ public static final ProvisioningState CREATING = fromString("Creating"); - /** Static value Updating for ProvisioningState. */ + /** + * Static value Updating for ProvisioningState. + */ public static final ProvisioningState UPDATING = fromString("Updating"); - /** Static value Deleting for ProvisioningState. */ + /** + * Static value Deleting for ProvisioningState. + */ public static final ProvisioningState DELETING = fromString("Deleting"); - /** Static value Succeeded for ProvisioningState. */ + /** + * Static value Succeeded for ProvisioningState. + */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for ProvisioningState. */ + /** + * Static value Failed for ProvisioningState. + */ public static final ProvisioningState FAILED = fromString("Failed"); - /** Static value Canceled for ProvisioningState. */ + /** + * Static value Canceled for ProvisioningState. + */ public static final ProvisioningState CANCELED = fromString("Canceled"); - /** Static value Deleted for ProvisioningState. */ + /** + * Static value Deleted for ProvisioningState. + */ public static final ProvisioningState DELETED = fromString("Deleted"); - /** Static value NotSpecified for ProvisioningState. */ + /** + * Static value NotSpecified for ProvisioningState. + */ public static final ProvisioningState NOT_SPECIFIED = fromString("NotSpecified"); /** * Creates a new instance of ProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -48,18 +67,17 @@ public ProvisioningState() { /** * Creates or finds a ProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ProvisioningState. */ - @JsonCreator public static ProvisioningState fromString(String name) { return fromString(name, ProvisioningState.class); } /** * Gets known ProvisioningState values. - * + * * @return known ProvisioningState values. */ public static Collection values() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SendAadLogsStatus.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SendAadLogsStatus.java index 9423436a0eab7..fe94ceb57e401 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SendAadLogsStatus.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SendAadLogsStatus.java @@ -5,20 +5,25 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Indicates whether AAD logs are being sent. */ +/** + * Indicates whether AAD logs are being sent. + */ public final class SendAadLogsStatus extends ExpandableStringEnum { - /** Static value Enabled for SendAadLogsStatus. */ + /** + * Static value Enabled for SendAadLogsStatus. + */ public static final SendAadLogsStatus ENABLED = fromString("Enabled"); - /** Static value Disabled for SendAadLogsStatus. */ + /** + * Static value Disabled for SendAadLogsStatus. + */ public static final SendAadLogsStatus DISABLED = fromString("Disabled"); /** * Creates a new instance of SendAadLogsStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,18 +32,17 @@ public SendAadLogsStatus() { /** * Creates or finds a SendAadLogsStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding SendAadLogsStatus. */ - @JsonCreator public static SendAadLogsStatus fromString(String name) { return fromString(name, SendAadLogsStatus.class); } /** * Gets known SendAadLogsStatus values. - * + * * @return known SendAadLogsStatus values. */ public static Collection values() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SendActivityLogsStatus.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SendActivityLogsStatus.java index d6499ef1abd85..4fc8babf7281a 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SendActivityLogsStatus.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SendActivityLogsStatus.java @@ -5,20 +5,25 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Indicates whether activity logs are being sent. */ +/** + * Indicates whether activity logs are being sent. + */ public final class SendActivityLogsStatus extends ExpandableStringEnum { - /** Static value Enabled for SendActivityLogsStatus. */ + /** + * Static value Enabled for SendActivityLogsStatus. + */ public static final SendActivityLogsStatus ENABLED = fromString("Enabled"); - /** Static value Disabled for SendActivityLogsStatus. */ + /** + * Static value Disabled for SendActivityLogsStatus. + */ public static final SendActivityLogsStatus DISABLED = fromString("Disabled"); /** * Creates a new instance of SendActivityLogsStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,18 +32,17 @@ public SendActivityLogsStatus() { /** * Creates or finds a SendActivityLogsStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding SendActivityLogsStatus. */ - @JsonCreator public static SendActivityLogsStatus fromString(String name) { return fromString(name, SendActivityLogsStatus.class); } /** * Gets known SendActivityLogsStatus values. - * + * * @return known SendActivityLogsStatus values. */ public static Collection values() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SendSubscriptionLogsStatus.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SendSubscriptionLogsStatus.java index e2419056fed1a..5cb1b2dd55d47 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SendSubscriptionLogsStatus.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SendSubscriptionLogsStatus.java @@ -5,20 +5,25 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Indicates whether subscription logs are being sent. */ +/** + * Indicates whether subscription logs are being sent. + */ public final class SendSubscriptionLogsStatus extends ExpandableStringEnum { - /** Static value Enabled for SendSubscriptionLogsStatus. */ + /** + * Static value Enabled for SendSubscriptionLogsStatus. + */ public static final SendSubscriptionLogsStatus ENABLED = fromString("Enabled"); - /** Static value Disabled for SendSubscriptionLogsStatus. */ + /** + * Static value Disabled for SendSubscriptionLogsStatus. + */ public static final SendSubscriptionLogsStatus DISABLED = fromString("Disabled"); /** * Creates a new instance of SendSubscriptionLogsStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,18 +32,17 @@ public SendSubscriptionLogsStatus() { /** * Creates or finds a SendSubscriptionLogsStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding SendSubscriptionLogsStatus. */ - @JsonCreator public static SendSubscriptionLogsStatus fromString(String name) { return fromString(name, SendSubscriptionLogsStatus.class); } /** * Gets known SendSubscriptionLogsStatus values. - * + * * @return known SendSubscriptionLogsStatus values. */ public static Collection values() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SendingLogsStatus.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SendingLogsStatus.java index c6663bfa75082..33c6f8ed29af0 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SendingLogsStatus.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SendingLogsStatus.java @@ -5,20 +5,25 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Indicates whether logs are being sent. */ +/** + * Indicates whether logs are being sent. + */ public final class SendingLogsStatus extends ExpandableStringEnum { - /** Static value Enabled for SendingLogsStatus. */ + /** + * Static value Enabled for SendingLogsStatus. + */ public static final SendingLogsStatus ENABLED = fromString("Enabled"); - /** Static value Disabled for SendingLogsStatus. */ + /** + * Static value Disabled for SendingLogsStatus. + */ public static final SendingLogsStatus DISABLED = fromString("Disabled"); /** * Creates a new instance of SendingLogsStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,18 +32,17 @@ public SendingLogsStatus() { /** * Creates or finds a SendingLogsStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding SendingLogsStatus. */ - @JsonCreator public static SendingLogsStatus fromString(String name) { return fromString(name, SendingLogsStatus.class); } /** * Gets known SendingLogsStatus values. - * + * * @return known SendingLogsStatus values. */ public static Collection values() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SendingMetricsStatus.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SendingMetricsStatus.java index 28aaba79d35a2..f72717e5798ef 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SendingMetricsStatus.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SendingMetricsStatus.java @@ -5,20 +5,25 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Indicates whether metrics are being sent. */ +/** + * Indicates whether metrics are being sent. + */ public final class SendingMetricsStatus extends ExpandableStringEnum { - /** Static value Enabled for SendingMetricsStatus. */ + /** + * Static value Enabled for SendingMetricsStatus. + */ public static final SendingMetricsStatus ENABLED = fromString("Enabled"); - /** Static value Disabled for SendingMetricsStatus. */ + /** + * Static value Disabled for SendingMetricsStatus. + */ public static final SendingMetricsStatus DISABLED = fromString("Disabled"); /** * Creates a new instance of SendingMetricsStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,18 +32,17 @@ public SendingMetricsStatus() { /** * Creates or finds a SendingMetricsStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding SendingMetricsStatus. */ - @JsonCreator public static SendingMetricsStatus fromString(String name) { return fromString(name, SendingMetricsStatus.class); } /** * Gets known SendingMetricsStatus values. - * + * * @return known SendingMetricsStatus values. */ public static Collection values() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SingleSignOnStates.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SingleSignOnStates.java index 6342f4770912a..b141e1dd16719 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SingleSignOnStates.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SingleSignOnStates.java @@ -5,26 +5,35 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Various states of the SSO resource. */ +/** + * Various states of the SSO resource. + */ public final class SingleSignOnStates extends ExpandableStringEnum { - /** Static value Initial for SingleSignOnStates. */ + /** + * Static value Initial for SingleSignOnStates. + */ public static final SingleSignOnStates INITIAL = fromString("Initial"); - /** Static value Enable for SingleSignOnStates. */ + /** + * Static value Enable for SingleSignOnStates. + */ public static final SingleSignOnStates ENABLE = fromString("Enable"); - /** Static value Disable for SingleSignOnStates. */ + /** + * Static value Disable for SingleSignOnStates. + */ public static final SingleSignOnStates DISABLE = fromString("Disable"); - /** Static value Existing for SingleSignOnStates. */ + /** + * Static value Existing for SingleSignOnStates. + */ public static final SingleSignOnStates EXISTING = fromString("Existing"); /** * Creates a new instance of SingleSignOnStates value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,18 +42,17 @@ public SingleSignOnStates() { /** * Creates or finds a SingleSignOnStates from its string representation. - * + * * @param name a name to look for. * @return the corresponding SingleSignOnStates. */ - @JsonCreator public static SingleSignOnStates fromString(String name) { return fromString(name, SingleSignOnStates.class); } /** * Gets known SingleSignOnStates values. - * + * * @return known SingleSignOnStates values. */ public static Collection values() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SingleSignOns.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SingleSignOns.java index 23114292a53e3..29f2ae4d1cc26 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SingleSignOns.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SingleSignOns.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of SingleSignOns. */ +/** + * Resource collection API of SingleSignOns. + */ public interface SingleSignOns { /** * Get a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -27,7 +29,7 @@ Response getWithResponse(String resourceGroupName /** * Get a DynatraceSingleSignOnResource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName Single Sign On Configuration Name. @@ -40,34 +42,34 @@ Response getWithResponse(String resourceGroupName /** * List all DynatraceSingleSignOnResource by monitorName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DynatraceSingleSignOnResource list operation as paginated response with {@link - * PagedIterable}. + * @return the response of a DynatraceSingleSignOnResource list operation as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String monitorName); /** * List all DynatraceSingleSignOnResource by monitorName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a DynatraceSingleSignOnResource list operation as paginated response with {@link - * PagedIterable}. + * @return the response of a DynatraceSingleSignOnResource list operation as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String monitorName, Context context); /** * Get a DynatraceSingleSignOnResource. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -78,7 +80,7 @@ Response getWithResponse(String resourceGroupName /** * Get a DynatraceSingleSignOnResource. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -90,7 +92,7 @@ Response getWithResponse(String resourceGroupName /** * Begins definition for a new DynatraceSingleSignOnResource resource. - * + * * @param name resource name. * @return the first stage of the new DynatraceSingleSignOnResource definition. */ diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SsoDetailsRequest.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SsoDetailsRequest.java index 96eda3802706b..07ebad756418f 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SsoDetailsRequest.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SsoDetailsRequest.java @@ -6,24 +6,31 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** Request for getting sso details for a user. */ +/** + * Request for getting sso details for a user. + */ @Fluent -public final class SsoDetailsRequest { +public final class SsoDetailsRequest implements JsonSerializable { /* * user principal id of the user */ - @JsonProperty(value = "userPrincipal", required = true) private String userPrincipal; - /** Creates an instance of SsoDetailsRequest class. */ + /** + * Creates an instance of SsoDetailsRequest class. + */ public SsoDetailsRequest() { } /** * Get the userPrincipal property: user principal id of the user. - * + * * @return the userPrincipal value. */ public String userPrincipal() { @@ -32,7 +39,7 @@ public String userPrincipal() { /** * Set the userPrincipal property: user principal id of the user. - * + * * @param userPrincipal the userPrincipal value to set. * @return the SsoDetailsRequest object itself. */ @@ -43,15 +50,53 @@ public SsoDetailsRequest withUserPrincipal(String userPrincipal) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (userPrincipal() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property userPrincipal in model SsoDetailsRequest")); + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property userPrincipal in model SsoDetailsRequest")); } } private static final ClientLogger LOGGER = new ClientLogger(SsoDetailsRequest.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("userPrincipal", this.userPrincipal); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SsoDetailsRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SsoDetailsRequest if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SsoDetailsRequest. + */ + public static SsoDetailsRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SsoDetailsRequest deserializedSsoDetailsRequest = new SsoDetailsRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("userPrincipal".equals(fieldName)) { + deserializedSsoDetailsRequest.userPrincipal = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSsoDetailsRequest; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SsoDetailsResponse.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SsoDetailsResponse.java index 4344d78bc4f12..87f08105f7987 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SsoDetailsResponse.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SsoDetailsResponse.java @@ -7,46 +7,48 @@ import com.azure.resourcemanager.dynatrace.fluent.models.SsoDetailsResponseInner; import java.util.List; -/** An immutable client-side representation of SsoDetailsResponse. */ +/** + * An immutable client-side representation of SsoDetailsResponse. + */ public interface SsoDetailsResponse { /** * Gets the isSsoEnabled property: Whether the SSO is enabled for this resource or not. - * + * * @return the isSsoEnabled value. */ SsoStatus isSsoEnabled(); /** * Gets the metadataUrl property: URL for Azure AD metadata. - * + * * @return the metadataUrl value. */ String metadataUrl(); /** * Gets the singleSignOnUrl property: The login URL specific to this Dynatrace Environment. - * + * * @return the singleSignOnUrl value. */ String singleSignOnUrl(); /** * Gets the aadDomains property: array of Aad(azure active directory) domains. - * + * * @return the aadDomains value. */ List aadDomains(); /** * Gets the adminUsers property: Array of admin user emails. - * + * * @return the adminUsers value. */ List adminUsers(); /** * Gets the inner com.azure.resourcemanager.dynatrace.fluent.models.SsoDetailsResponseInner object. - * + * * @return the inner object. */ SsoDetailsResponseInner innerModel(); diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SsoStatus.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SsoStatus.java index f2a01d4c5a872..72b2cdebdbd8a 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SsoStatus.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/SsoStatus.java @@ -5,20 +5,25 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Indicates whether SSO is enabled or not. */ +/** + * Indicates whether SSO is enabled or not. + */ public final class SsoStatus extends ExpandableStringEnum { - /** Static value Enabled for SsoStatus. */ + /** + * Static value Enabled for SsoStatus. + */ public static final SsoStatus ENABLED = fromString("Enabled"); - /** Static value Disabled for SsoStatus. */ + /** + * Static value Disabled for SsoStatus. + */ public static final SsoStatus DISABLED = fromString("Disabled"); /** * Creates a new instance of SsoStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,18 +32,17 @@ public SsoStatus() { /** * Creates or finds a SsoStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding SsoStatus. */ - @JsonCreator public static SsoStatus fromString(String name) { return fromString(name, SsoStatus.class); } /** * Gets known SsoStatus values. - * + * * @return known SsoStatus values. */ public static Collection values() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagAction.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagAction.java index 36a2eb4eaae58..a7834800d1e0f 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagAction.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagAction.java @@ -5,20 +5,25 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Valid actions for a filtering tag. Exclusion takes priority over inclusion. */ +/** + * Valid actions for a filtering tag. Exclusion takes priority over inclusion. + */ public final class TagAction extends ExpandableStringEnum { - /** Static value Include for TagAction. */ + /** + * Static value Include for TagAction. + */ public static final TagAction INCLUDE = fromString("Include"); - /** Static value Exclude for TagAction. */ + /** + * Static value Exclude for TagAction. + */ public static final TagAction EXCLUDE = fromString("Exclude"); /** * Creates a new instance of TagAction value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,18 +32,17 @@ public TagAction() { /** * Creates or finds a TagAction from its string representation. - * + * * @param name a name to look for. * @return the corresponding TagAction. */ - @JsonCreator public static TagAction fromString(String name) { return fromString(name, TagAction.class); } /** * Gets known TagAction values. - * + * * @return known TagAction values. */ public static Collection values() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRule.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRule.java index 7960728ad635e..fcbde036dc956 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRule.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRule.java @@ -8,87 +8,97 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.dynatrace.fluent.models.TagRuleInner; -/** An immutable client-side representation of TagRule. */ +/** + * An immutable client-side representation of TagRule. + */ public interface TagRule { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: System metadata for this resource. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the logRules property: Set of rules for sending logs for the Monitor resource. - * + * * @return the logRules value. */ LogRules logRules(); /** * Gets the metricRules property: Set of rules for sending metrics for the Monitor resource. - * + * * @return the metricRules value. */ MetricRules metricRules(); /** * Gets the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ ProvisioningState provisioningState(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.dynatrace.fluent.models.TagRuleInner object. - * + * * @return the inner object. */ TagRuleInner innerModel(); - /** The entirety of the TagRule definition. */ + /** + * The entirety of the TagRule definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The TagRule definition stages. */ + /** + * The TagRule definition stages. + */ interface DefinitionStages { - /** The first stage of the TagRule definition. */ + /** + * The first stage of the TagRule definition. + */ interface Blank extends WithParentResource { } - /** The stage of the TagRule definition allowing to specify parent resource. */ + /** + * The stage of the TagRule definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, monitorName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @return the next definition stage. @@ -103,36 +113,40 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithLogRules, DefinitionStages.WithMetricRules { /** * Executes the create request. - * + * * @return the created resource. */ TagRule create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ TagRule create(Context context); } - /** The stage of the TagRule definition allowing to specify logRules. */ + /** + * The stage of the TagRule definition allowing to specify logRules. + */ interface WithLogRules { /** * Specifies the logRules property: Set of rules for sending logs for the Monitor resource.. - * + * * @param logRules Set of rules for sending logs for the Monitor resource. * @return the next definition stage. */ WithCreate withLogRules(LogRules logRules); } - /** The stage of the TagRule definition allowing to specify metricRules. */ + /** + * The stage of the TagRule definition allowing to specify metricRules. + */ interface WithMetricRules { /** * Specifies the metricRules property: Set of rules for sending metrics for the Monitor resource.. - * + * * @param metricRules Set of rules for sending metrics for the Monitor resource. * @return the next definition stage. */ @@ -142,47 +156,55 @@ interface WithMetricRules { /** * Begins update for the TagRule resource. - * + * * @return the stage of resource update. */ TagRule.Update update(); - /** The template for TagRule update. */ + /** + * The template for TagRule update. + */ interface Update extends UpdateStages.WithLogRules, UpdateStages.WithMetricRules { /** * Executes the update request. - * + * * @return the updated resource. */ TagRule apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ TagRule apply(Context context); } - /** The TagRule update stages. */ + /** + * The TagRule update stages. + */ interface UpdateStages { - /** The stage of the TagRule update allowing to specify logRules. */ + /** + * The stage of the TagRule update allowing to specify logRules. + */ interface WithLogRules { /** * Specifies the logRules property: Set of rules for sending logs for the Monitor resource.. - * + * * @param logRules Set of rules for sending logs for the Monitor resource. * @return the next definition stage. */ Update withLogRules(LogRules logRules); } - /** The stage of the TagRule update allowing to specify metricRules. */ + /** + * The stage of the TagRule update allowing to specify metricRules. + */ interface WithMetricRules { /** * Specifies the metricRules property: Set of rules for sending metrics for the Monitor resource.. - * + * * @param metricRules Set of rules for sending metrics for the Monitor resource. * @return the next definition stage. */ @@ -192,14 +214,14 @@ interface WithMetricRules { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ TagRule refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRuleListResult.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRuleListResult.java index 521546a46333c..e9245ccb33081 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRuleListResult.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRuleListResult.java @@ -6,32 +6,38 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.dynatrace.fluent.models.TagRuleInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** The response of a TagRule list operation. */ +/** + * The response of a TagRule list operation. + */ @Fluent -public final class TagRuleListResult { +public final class TagRuleListResult implements JsonSerializable { /* * The items on this page */ - @JsonProperty(value = "value", required = true) private List value; /* * The link to the next page of items */ - @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of TagRuleListResult class. */ + /** + * Creates an instance of TagRuleListResult class. + */ public TagRuleListResult() { } /** * Get the value property: The items on this page. - * + * * @return the value value. */ public List value() { @@ -40,7 +46,7 @@ public List value() { /** * Set the value property: The items on this page. - * + * * @param value the value value to set. * @return the TagRuleListResult object itself. */ @@ -51,7 +57,7 @@ public TagRuleListResult withValue(List value) { /** * Get the nextLink property: The link to the next page of items. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,7 +66,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of items. - * + * * @param nextLink the nextLink value to set. * @return the TagRuleListResult object itself. */ @@ -71,17 +77,58 @@ public TagRuleListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model TagRuleListResult")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model TagRuleListResult")); } else { value().forEach(e -> e.validate()); } } private static final ClientLogger LOGGER = new ClientLogger(TagRuleListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TagRuleListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TagRuleListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TagRuleListResult. + */ + public static TagRuleListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TagRuleListResult deserializedTagRuleListResult = new TagRuleListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> TagRuleInner.fromJson(reader1)); + deserializedTagRuleListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedTagRuleListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTagRuleListResult; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRules.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRules.java index a7a3480ed55a0..56f889022d306 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRules.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/TagRules.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of TagRules. */ +/** + * Resource collection API of TagRules. + */ public interface TagRules { /** * Get a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -27,7 +29,7 @@ Response getWithResponse(String resourceGroupName, String monitorName, /** * Get a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -40,7 +42,7 @@ Response getWithResponse(String resourceGroupName, String monitorName, /** * Delete a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -52,7 +54,7 @@ Response getWithResponse(String resourceGroupName, String monitorName, /** * Delete a TagRule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName Monitor resource name. @@ -65,7 +67,7 @@ Response getWithResponse(String resourceGroupName, String monitorName, /** * List all TagRule by monitorName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -77,7 +79,7 @@ Response getWithResponse(String resourceGroupName, String monitorName, /** * List all TagRule by monitorName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param context The context to associate with this operation. @@ -90,7 +92,7 @@ Response getWithResponse(String resourceGroupName, String monitorName, /** * Get a TagRule. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -101,7 +103,7 @@ Response getWithResponse(String resourceGroupName, String monitorName, /** * Get a TagRule. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -113,7 +115,7 @@ Response getWithResponse(String resourceGroupName, String monitorName, /** * Delete a TagRule. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -123,7 +125,7 @@ Response getWithResponse(String resourceGroupName, String monitorName, /** * Delete a TagRule. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,7 +136,7 @@ Response getWithResponse(String resourceGroupName, String monitorName, /** * Begins definition for a new TagRule resource. - * + * * @param name resource name. * @return the first stage of the new TagRule definition. */ diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UpdateStatus.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UpdateStatus.java index 2cc65ece3c3d1..18e68f05a6341 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UpdateStatus.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UpdateStatus.java @@ -5,41 +5,60 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The current update status of OneAgent. */ +/** + * The current update status of OneAgent. + */ public final class UpdateStatus extends ExpandableStringEnum { - /** Static value INCOMPATIBLE for UpdateStatus. */ + /** + * Static value INCOMPATIBLE for UpdateStatus. + */ public static final UpdateStatus INCOMPATIBLE = fromString("INCOMPATIBLE"); - /** Static value OUTDATED for UpdateStatus. */ + /** + * Static value OUTDATED for UpdateStatus. + */ public static final UpdateStatus OUTDATED = fromString("OUTDATED"); - /** Static value SCHEDULED for UpdateStatus. */ + /** + * Static value SCHEDULED for UpdateStatus. + */ public static final UpdateStatus SCHEDULED = fromString("SCHEDULED"); - /** Static value SUPPRESSED for UpdateStatus. */ + /** + * Static value SUPPRESSED for UpdateStatus. + */ public static final UpdateStatus SUPPRESSED = fromString("SUPPRESSED"); - /** Static value UNKNOWN for UpdateStatus. */ + /** + * Static value UNKNOWN for UpdateStatus. + */ public static final UpdateStatus UNKNOWN = fromString("UNKNOWN"); - /** Static value UP2DATE for UpdateStatus. */ + /** + * Static value UP2DATE for UpdateStatus. + */ public static final UpdateStatus UP2DATE = fromString("UP2DATE"); - /** Static value UPDATE_IN_PROGRESS for UpdateStatus. */ + /** + * Static value UPDATE_IN_PROGRESS for UpdateStatus. + */ public static final UpdateStatus UPDATE_IN_PROGRESS = fromString("UPDATE_IN_PROGRESS"); - /** Static value UPDATE_PENDING for UpdateStatus. */ + /** + * Static value UPDATE_PENDING for UpdateStatus. + */ public static final UpdateStatus UPDATE_PENDING = fromString("UPDATE_PENDING"); - /** Static value UPDATE_PROBLEM for UpdateStatus. */ + /** + * Static value UPDATE_PROBLEM for UpdateStatus. + */ public static final UpdateStatus UPDATE_PROBLEM = fromString("UPDATE_PROBLEM"); /** * Creates a new instance of UpdateStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -48,18 +67,17 @@ public UpdateStatus() { /** * Creates or finds a UpdateStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding UpdateStatus. */ - @JsonCreator public static UpdateStatus fromString(String name) { return fromString(name, UpdateStatus.class); } /** * Gets known UpdateStatus values. - * + * * @return known UpdateStatus values. */ public static Collection values() { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UserAssignedIdentity.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UserAssignedIdentity.java index e4df95a36ab88..55c0d3e47aa00 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UserAssignedIdentity.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UserAssignedIdentity.java @@ -6,30 +6,36 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; -/** A managed identity assigned by the user. */ +/** + * A managed identity assigned by the user. + */ @Fluent -public final class UserAssignedIdentity { +public final class UserAssignedIdentity implements JsonSerializable { /* * The active directory client identifier for this principal. */ - @JsonProperty(value = "clientId", required = true) private String clientId; /* * The active directory identifier for this principal. */ - @JsonProperty(value = "principalId", required = true) private String principalId; - /** Creates an instance of UserAssignedIdentity class. */ + /** + * Creates an instance of UserAssignedIdentity class. + */ public UserAssignedIdentity() { } /** * Get the clientId property: The active directory client identifier for this principal. - * + * * @return the clientId value. */ public String clientId() { @@ -38,7 +44,7 @@ public String clientId() { /** * Set the clientId property: The active directory client identifier for this principal. - * + * * @param clientId the clientId value to set. * @return the UserAssignedIdentity object itself. */ @@ -49,7 +55,7 @@ public UserAssignedIdentity withClientId(String clientId) { /** * Get the principalId property: The active directory identifier for this principal. - * + * * @return the principalId value. */ public String principalId() { @@ -58,7 +64,7 @@ public String principalId() { /** * Set the principalId property: The active directory identifier for this principal. - * + * * @param principalId the principalId value to set. * @return the UserAssignedIdentity object itself. */ @@ -69,19 +75,60 @@ public UserAssignedIdentity withPrincipalId(String principalId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (clientId() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property clientId in model UserAssignedIdentity")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property clientId in model UserAssignedIdentity")); } if (principalId() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property principalId in model UserAssignedIdentity")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property principalId in model UserAssignedIdentity")); } } private static final ClientLogger LOGGER = new ClientLogger(UserAssignedIdentity.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("clientId", this.clientId); + jsonWriter.writeStringField("principalId", this.principalId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserAssignedIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserAssignedIdentity if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UserAssignedIdentity. + */ + public static UserAssignedIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserAssignedIdentity deserializedUserAssignedIdentity = new UserAssignedIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("clientId".equals(fieldName)) { + deserializedUserAssignedIdentity.clientId = reader.getString(); + } else if ("principalId".equals(fieldName)) { + deserializedUserAssignedIdentity.principalId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedUserAssignedIdentity; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UserInfo.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UserInfo.java index bd929e0b4ab44..33eb7c0d015b6 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UserInfo.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/UserInfo.java @@ -5,48 +5,51 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** User info. */ +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * User info. + */ @Fluent -public final class UserInfo { +public final class UserInfo implements JsonSerializable { /* * First Name of the user */ - @JsonProperty(value = "firstName") private String firstName; /* * Last Name of the user */ - @JsonProperty(value = "lastName") private String lastName; /* * Email of the user used by Dynatrace for contacting them if needed */ - @JsonProperty(value = "emailAddress") private String emailAddress; /* * Phone number of the user used by Dynatrace for contacting them if needed */ - @JsonProperty(value = "phoneNumber") private String phoneNumber; /* * Country of the user */ - @JsonProperty(value = "country") private String country; - /** Creates an instance of UserInfo class. */ + /** + * Creates an instance of UserInfo class. + */ public UserInfo() { } /** * Get the firstName property: First Name of the user. - * + * * @return the firstName value. */ public String firstName() { @@ -55,7 +58,7 @@ public String firstName() { /** * Set the firstName property: First Name of the user. - * + * * @param firstName the firstName value to set. * @return the UserInfo object itself. */ @@ -66,7 +69,7 @@ public UserInfo withFirstName(String firstName) { /** * Get the lastName property: Last Name of the user. - * + * * @return the lastName value. */ public String lastName() { @@ -75,7 +78,7 @@ public String lastName() { /** * Set the lastName property: Last Name of the user. - * + * * @param lastName the lastName value to set. * @return the UserInfo object itself. */ @@ -86,7 +89,7 @@ public UserInfo withLastName(String lastName) { /** * Get the emailAddress property: Email of the user used by Dynatrace for contacting them if needed. - * + * * @return the emailAddress value. */ public String emailAddress() { @@ -95,7 +98,7 @@ public String emailAddress() { /** * Set the emailAddress property: Email of the user used by Dynatrace for contacting them if needed. - * + * * @param emailAddress the emailAddress value to set. * @return the UserInfo object itself. */ @@ -106,7 +109,7 @@ public UserInfo withEmailAddress(String emailAddress) { /** * Get the phoneNumber property: Phone number of the user used by Dynatrace for contacting them if needed. - * + * * @return the phoneNumber value. */ public String phoneNumber() { @@ -115,7 +118,7 @@ public String phoneNumber() { /** * Set the phoneNumber property: Phone number of the user used by Dynatrace for contacting them if needed. - * + * * @param phoneNumber the phoneNumber value to set. * @return the UserInfo object itself. */ @@ -126,7 +129,7 @@ public UserInfo withPhoneNumber(String phoneNumber) { /** * Get the country property: Country of the user. - * + * * @return the country value. */ public String country() { @@ -135,7 +138,7 @@ public String country() { /** * Set the country property: Country of the user. - * + * * @param country the country value to set. * @return the UserInfo object itself. */ @@ -146,9 +149,57 @@ public UserInfo withCountry(String country) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("firstName", this.firstName); + jsonWriter.writeStringField("lastName", this.lastName); + jsonWriter.writeStringField("emailAddress", this.emailAddress); + jsonWriter.writeStringField("phoneNumber", this.phoneNumber); + jsonWriter.writeStringField("country", this.country); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserInfo if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the UserInfo. + */ + public static UserInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UserInfo deserializedUserInfo = new UserInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("firstName".equals(fieldName)) { + deserializedUserInfo.firstName = reader.getString(); + } else if ("lastName".equals(fieldName)) { + deserializedUserInfo.lastName = reader.getString(); + } else if ("emailAddress".equals(fieldName)) { + deserializedUserInfo.emailAddress = reader.getString(); + } else if ("phoneNumber".equals(fieldName)) { + deserializedUserInfo.phoneNumber = reader.getString(); + } else if ("country".equals(fieldName)) { + deserializedUserInfo.country = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedUserInfo; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/VMExtensionPayload.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/VMExtensionPayload.java index 2461cba701ce9..bc938fb0ee158 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/VMExtensionPayload.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/VMExtensionPayload.java @@ -6,25 +6,27 @@ import com.azure.resourcemanager.dynatrace.fluent.models.VMExtensionPayloadInner; -/** An immutable client-side representation of VMExtensionPayload. */ +/** + * An immutable client-side representation of VMExtensionPayload. + */ public interface VMExtensionPayload { /** * Gets the ingestionKey property: Ingestion key of the environment. - * + * * @return the ingestionKey value. */ String ingestionKey(); /** * Gets the environmentId property: Id of the environment created. - * + * * @return the environmentId value. */ String environmentId(); /** * Gets the inner com.azure.resourcemanager.dynatrace.fluent.models.VMExtensionPayloadInner object. - * + * * @return the inner object. */ VMExtensionPayloadInner innerModel(); diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/VMHostsListResponse.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/VMHostsListResponse.java index 0ff246705b72d..3247279af2658 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/VMHostsListResponse.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/VMHostsListResponse.java @@ -5,32 +5,38 @@ package com.azure.resourcemanager.dynatrace.models; import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; import com.azure.resourcemanager.dynatrace.fluent.models.VMInfoInner; -import com.fasterxml.jackson.annotation.JsonProperty; +import java.io.IOException; import java.util.List; -/** Response of a list VM Host Operation. */ +/** + * Response of a list VM Host Operation. + */ @Fluent -public final class VMHostsListResponse { +public final class VMHostsListResponse implements JsonSerializable { /* * The items on this page */ - @JsonProperty(value = "value") private List value; /* * The link to the next page of items */ - @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of VMHostsListResponse class. */ + /** + * Creates an instance of VMHostsListResponse class. + */ public VMHostsListResponse() { } /** * Get the value property: The items on this page. - * + * * @return the value value. */ public List value() { @@ -39,7 +45,7 @@ public List value() { /** * Set the value property: The items on this page. - * + * * @param value the value value to set. * @return the VMHostsListResponse object itself. */ @@ -50,7 +56,7 @@ public VMHostsListResponse withValue(List value) { /** * Get the nextLink property: The link to the next page of items. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +65,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of items. - * + * * @param nextLink the nextLink value to set. * @return the VMHostsListResponse object itself. */ @@ -70,7 +76,7 @@ public VMHostsListResponse withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -78,4 +84,44 @@ public void validate() { value().forEach(e -> e.validate()); } } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VMHostsListResponse from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VMHostsListResponse if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the VMHostsListResponse. + */ + public static VMHostsListResponse fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VMHostsListResponse deserializedVMHostsListResponse = new VMHostsListResponse(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> VMInfoInner.fromJson(reader1)); + deserializedVMHostsListResponse.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedVMHostsListResponse.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVMHostsListResponse; + }); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/VMInfo.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/VMInfo.java index f3b9aa17ab5e9..7b24b4be9e957 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/VMInfo.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/VMInfo.java @@ -6,74 +6,76 @@ import com.azure.resourcemanager.dynatrace.fluent.models.VMInfoInner; -/** An immutable client-side representation of VMInfo. */ +/** + * An immutable client-side representation of VMInfo. + */ public interface VMInfo { /** * Gets the resourceId property: Azure VM resource ID. - * + * * @return the resourceId value. */ String resourceId(); /** * Gets the version property: Version of the Dynatrace agent installed on the VM. - * + * * @return the version value. */ String version(); /** * Gets the monitoringType property: The monitoring mode of OneAgent. - * + * * @return the monitoringType value. */ MonitoringType monitoringType(); /** * Gets the autoUpdateSetting property: Update settings of OneAgent. - * + * * @return the autoUpdateSetting value. */ AutoUpdateSetting autoUpdateSetting(); /** * Gets the updateStatus property: The current update status of OneAgent. - * + * * @return the updateStatus value. */ UpdateStatus updateStatus(); /** * Gets the availabilityState property: The availability state of OneAgent. - * + * * @return the availabilityState value. */ AvailabilityState availabilityState(); /** * Gets the logModule property: Tells whether log modules are enabled or not. - * + * * @return the logModule value. */ LogModule logModule(); /** * Gets the hostGroup property: The name of the host group. - * + * * @return the hostGroup value. */ String hostGroup(); /** * Gets the hostname property: The name of the host. - * + * * @return the hostname value. */ String hostname(); /** * Gets the inner com.azure.resourcemanager.dynatrace.fluent.models.VMInfoInner object. - * + * * @return the inner object. */ VMInfoInner innerModel(); diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/package-info.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/package-info.java index 79e11f4dfb678..41b4bd7bb810d 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/package-info.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the data models for DynatraceObservability. null. */ +/** + * Package containing the data models for DynatraceObservability. + * null. + */ package com.azure.resourcemanager.dynatrace.models; diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/package-info.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/package-info.java index 115d604c2ff55..0db6ff9acad96 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/package-info.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/com/azure/resourcemanager/dynatrace/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the classes for DynatraceObservability. null. */ +/** + * Package containing the classes for DynatraceObservability. + * null. + */ package com.azure.resourcemanager.dynatrace; diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/module-info.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/module-info.java index dc2806a6edff5..ee7317cffd2e6 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/module-info.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/java/module-info.java @@ -10,6 +10,6 @@ exports com.azure.resourcemanager.dynatrace.fluent.models; exports com.azure.resourcemanager.dynatrace.models; - opens com.azure.resourcemanager.dynatrace.fluent.models to com.azure.core, com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.dynatrace.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.dynatrace.fluent.models to com.azure.core; + opens com.azure.resourcemanager.dynatrace.models to com.azure.core; } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-dynatrace/proxy-config.json b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-dynatrace/proxy-config.json new file mode 100644 index 0000000000000..e3f032d39eb32 --- /dev/null +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-dynatrace/proxy-config.json @@ -0,0 +1 @@ +[["com.azure.resourcemanager.dynatrace.implementation.MonitorsClientImpl$MonitorsService"],["com.azure.resourcemanager.dynatrace.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.dynatrace.implementation.SingleSignOnsClientImpl$SingleSignOnsService"],["com.azure.resourcemanager.dynatrace.implementation.TagRulesClientImpl$TagRulesService"]] \ No newline at end of file diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-dynatrace/reflect-config.json b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-dynatrace/reflect-config.json new file mode 100644 index 0000000000000..0637a088a01e8 --- /dev/null +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-dynatrace/reflect-config.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsCreateOrUpdateSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsCreateOrUpdateSamples.java index 899144d365414..ef30c1947ee18 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsCreateOrUpdateSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsCreateOrUpdateSamples.java @@ -18,20 +18,22 @@ import java.util.HashMap; import java.util.Map; -/** Samples for Monitors CreateOrUpdate. */ +/** + * Samples for Monitors CreateOrUpdate. + */ public final class MonitorsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: Monitors_CreateOrUpdate_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsCreateOrUpdateMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() + public static void + monitorsCreateOrUpdateMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.monitors() .define("myMonitor") .withRegion("West US 2") .withExistingResourceGroup("myResourceGroup") @@ -39,39 +41,33 @@ public static void monitorsCreateOrUpdateMaximumSetGen( .withIdentity(new IdentityProperties().withType(ManagedIdentityType.SYSTEM_ASSIGNED)) .withMonitoringStatus(MonitoringStatus.ENABLED) .withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus.ACTIVE) - .withDynatraceEnvironmentProperties( - new DynatraceEnvironmentProperties() - .withAccountInfo(new AccountInfo()) - .withEnvironmentInfo(new EnvironmentInfo()) - .withSingleSignOnProperties(new DynatraceSingleSignOnProperties())) - .withUserInfo( - new UserInfo() - .withFirstName("Alice") - .withLastName("Bobab") - .withEmailAddress("alice@microsoft.com") - .withPhoneNumber("123456") - .withCountry("westus2")) - .withPlanData( - new PlanData() - .withUsageType("Committed") - .withBillingCycle("Monthly") - .withPlanDetails("dynatraceapitestplan") - .withEffectiveDate(OffsetDateTime.parse("2019-08-30T15:14:33+02:00"))) + .withDynatraceEnvironmentProperties(new DynatraceEnvironmentProperties().withAccountInfo(new AccountInfo()) + .withEnvironmentInfo(new EnvironmentInfo()) + .withSingleSignOnProperties(new DynatraceSingleSignOnProperties())) + .withUserInfo(new UserInfo().withFirstName("Alice") + .withLastName("Bobab") + .withEmailAddress("alice@microsoft.com") + .withPhoneNumber("123456") + .withCountry("westus2")) + .withPlanData(new PlanData().withUsageType("Committed") + .withBillingCycle("Monthly") + .withPlanDetails("dynatraceapitestplan") + .withEffectiveDate(OffsetDateTime.parse("2019-08-30T15:14:33+02:00"))) .create(); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_CreateOrUpdate_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_CreateOrUpdate_MinimumSet_Gen.json */ /** * Sample code: Monitors_CreateOrUpdate_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsCreateOrUpdateMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() + public static void + monitorsCreateOrUpdateMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.monitors() .define("myMonitor") .withRegion("West US 2") .withExistingResourceGroup("myResourceGroup") diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsDeleteSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsDeleteSamples.java index ec3fa6df7366f..4cde7f4ee7f22 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsDeleteSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsDeleteSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.dynatrace.generated; -/** Samples for Monitors Delete. */ +/** + * Samples for Monitors Delete. + */ public final class MonitorsDeleteSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Delete_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_Delete_MinimumSet_Gen.json */ /** * Sample code: Monitors_Delete_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void monitorsDeleteMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { @@ -19,11 +22,12 @@ public static void monitorsDeleteMinimumSetGen(com.azure.resourcemanager.dynatra } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_Delete_MaximumSet_Gen.json */ /** * Sample code: Monitors_Delete_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void monitorsDeleteMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetByResourceGroupSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetByResourceGroupSamples.java index 561eb52092aca..1e99137dc8953 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetByResourceGroupSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetByResourceGroupSamples.java @@ -4,33 +4,35 @@ package com.azure.resourcemanager.dynatrace.generated; -/** Samples for Monitors GetByResourceGroup. */ +/** + * Samples for Monitors GetByResourceGroup. + */ public final class MonitorsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_Get_MinimumSet_Gen.json */ /** * Sample code: Monitors_Get_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void monitorsGetMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() + manager.monitors() .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_Get_MaximumSet_Gen.json */ /** * Sample code: Monitors_Get_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void monitorsGetMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() + manager.monitors() .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetMarketplaceSaaSResourceDetailsSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetMarketplaceSaaSResourceDetailsSamples.java index f8dcefd8e9181..c43a4ef2e6558 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetMarketplaceSaaSResourceDetailsSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetMarketplaceSaaSResourceDetailsSamples.java @@ -6,37 +6,39 @@ import com.azure.resourcemanager.dynatrace.models.MarketplaceSaaSResourceDetailsRequest; -/** Samples for Monitors GetMarketplaceSaaSResourceDetails. */ +/** + * Samples for Monitors GetMarketplaceSaaSResourceDetails. + */ public final class MonitorsGetMarketplaceSaaSResourceDetailsSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetMarketplaceSaaSResourceDetails_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_GetMarketplaceSaaSResourceDetails_MinimumSet_Gen.json */ /** * Sample code: Monitors_GetMarketplaceSaaSResourceDetails_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void monitorsGetMarketplaceSaaSResourceDetailsMinimumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() + manager.monitors() .getMarketplaceSaaSResourceDetailsWithResponse( new MarketplaceSaaSResourceDetailsRequest().withTenantId("urnmattojzhktcfw"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetMarketplaceSaaSResourceDetails_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_GetMarketplaceSaaSResourceDetails_MaximumSet_Gen.json */ /** * Sample code: Monitors_GetMarketplaceSaaSResourceDetails_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void monitorsGetMarketplaceSaaSResourceDetailsMaximumSetGen( com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() + manager.monitors() .getMarketplaceSaaSResourceDetailsWithResponse( new MarketplaceSaaSResourceDetailsRequest().withTenantId("urnmattojzhktcfw"), com.azure.core.util.Context.NONE); diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetMetricStatusSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetMetricStatusSamples.java index 4e1e300630560..b45fe0028ef8b 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetMetricStatusSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetMetricStatusSamples.java @@ -4,35 +4,37 @@ package com.azure.resourcemanager.dynatrace.generated; -/** Samples for Monitors GetMetricStatus. */ +/** + * Samples for Monitors GetMetricStatus. + */ public final class MonitorsGetMetricStatusSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetMetricStatus_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_GetMetricStatus_MinimumSet_Gen.json */ /** * Sample code: Monitors_GetMetricStatus_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsGetMetricStatusMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() + public static void + monitorsGetMetricStatusMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.monitors() .getMetricStatusWithResponse("rgDynatrace", "fhcjxnxumkdlgpwanewtkdnyuz", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetMetricStatus_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_GetMetricStatus_MaximumSet_Gen.json */ /** * Sample code: Monitors_GetMetricStatus_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsGetMetricStatusMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() + public static void + monitorsGetMetricStatusMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.monitors() .getMetricStatusWithResponse("rgDynatrace", "fhcjxnxumkdlgpwanewtkdnyuz", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetSsoDetailsSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetSsoDetailsSamples.java index 19dea6e0ba3ae..ad58926a2acf7 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetSsoDetailsSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetSsoDetailsSamples.java @@ -6,43 +6,39 @@ import com.azure.resourcemanager.dynatrace.models.SsoDetailsRequest; -/** Samples for Monitors GetSsoDetails. */ +/** + * Samples for Monitors GetSsoDetails. + */ public final class MonitorsGetSsoDetailsSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetSSODetails_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_GetSSODetails_MaximumSet_Gen.json */ /** * Sample code: Monitors_GetSSODetails_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsGetSSODetailsMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() - .getSsoDetailsWithResponse( - "myResourceGroup", - "myMonitor", - new SsoDetailsRequest().withUserPrincipal("alice@microsoft.com"), - com.azure.core.util.Context.NONE); + public static void + monitorsGetSSODetailsMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.monitors() + .getSsoDetailsWithResponse("myResourceGroup", "myMonitor", + new SsoDetailsRequest().withUserPrincipal("alice@microsoft.com"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetSSODetails_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_GetSSODetails_MinimumSet_Gen.json */ /** * Sample code: Monitors_GetSSODetails_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsGetSSODetailsMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() - .getSsoDetailsWithResponse( - "myResourceGroup", - "myMonitor", - new SsoDetailsRequest().withUserPrincipal("alice@microsoft.com"), - com.azure.core.util.Context.NONE); + public static void + monitorsGetSSODetailsMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.monitors() + .getSsoDetailsWithResponse("myResourceGroup", "myMonitor", + new SsoDetailsRequest().withUserPrincipal("alice@microsoft.com"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetVMHostPayloadSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetVMHostPayloadSamples.java index a58c532a9061a..59362510c2933 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetVMHostPayloadSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetVMHostPayloadSamples.java @@ -4,35 +4,37 @@ package com.azure.resourcemanager.dynatrace.generated; -/** Samples for Monitors GetVMHostPayload. */ +/** + * Samples for Monitors GetVMHostPayload. + */ public final class MonitorsGetVMHostPayloadSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetVMHostPayload_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_GetVMHostPayload_MinimumSet_Gen.json */ /** * Sample code: Monitors_GetVMHostPayload_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsGetVMHostPayloadMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() + public static void + monitorsGetVMHostPayloadMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.monitors() .getVMHostPayloadWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_GetVMHostPayload_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_GetVMHostPayload_MaximumSet_Gen.json */ /** * Sample code: Monitors_GetVMHostPayload_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsGetVMHostPayloadMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() + public static void + monitorsGetVMHostPayloadMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.monitors() .getVMHostPayloadWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListAppServicesSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListAppServicesSamples.java index df44a8d451f57..301e3b0e6e77b 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListAppServicesSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListAppServicesSamples.java @@ -4,31 +4,35 @@ package com.azure.resourcemanager.dynatrace.generated; -/** Samples for Monitors ListAppServices. */ +/** + * Samples for Monitors ListAppServices. + */ public final class MonitorsListAppServicesSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListAppServices_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListAppServices_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListAppServices_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsListAppServicesMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + public static void + monitorsListAppServicesMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { manager.monitors().listAppServices("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListAppServices_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListAppServices_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListAppServices_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsListAppServicesMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + public static void + monitorsListAppServicesMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { manager.monitors().listAppServices("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListByResourceGroupSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListByResourceGroupSamples.java index 8803678c71eb4..478b4666e05d0 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListByResourceGroupSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListByResourceGroupSamples.java @@ -4,31 +4,35 @@ package com.azure.resourcemanager.dynatrace.generated; -/** Samples for Monitors ListByResourceGroup. */ +/** + * Samples for Monitors ListByResourceGroup. + */ public final class MonitorsListByResourceGroupSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListByResourceGroup_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListByResourceGroup_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListByResourceGroup_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsListByResourceGroupMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + public static void + monitorsListByResourceGroupMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { manager.monitors().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListByResourceGroup_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListByResourceGroup_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListByResourceGroup_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsListByResourceGroupMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + public static void + monitorsListByResourceGroupMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { manager.monitors().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListHostsSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListHostsSamples.java index 6f661e3ce26e1..06708daa6e487 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListHostsSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListHostsSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.dynatrace.generated; -/** Samples for Monitors ListHosts. */ +/** + * Samples for Monitors ListHosts. + */ public final class MonitorsListHostsSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListHosts_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListHosts_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListHosts_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void monitorsListHostsMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { @@ -19,11 +22,12 @@ public static void monitorsListHostsMinimumSetGen(com.azure.resourcemanager.dyna } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListHosts_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListHosts_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListHosts_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void monitorsListHostsMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListLinkableEnvironmentsSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListLinkableEnvironmentsSamples.java index 36b98ff37d6bd..5eaa6c82277e9 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListLinkableEnvironmentsSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListLinkableEnvironmentsSamples.java @@ -6,47 +6,43 @@ import com.azure.resourcemanager.dynatrace.models.LinkableEnvironmentRequest; -/** Samples for Monitors ListLinkableEnvironments. */ +/** + * Samples for Monitors ListLinkableEnvironments. + */ public final class MonitorsListLinkableEnvironmentsSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListLinkableEnvironments_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListLinkableEnvironments_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListLinkableEnvironments_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsListLinkableEnvironmentsMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() - .listLinkableEnvironments( - "myResourceGroup", - "myMonitor", - new LinkableEnvironmentRequest() - .withTenantId("00000000-0000-0000-0000-000000000000") + public static void + monitorsListLinkableEnvironmentsMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.monitors() + .listLinkableEnvironments("myResourceGroup", "myMonitor", + new LinkableEnvironmentRequest().withTenantId("00000000-0000-0000-0000-000000000000") .withUserPrincipal("alice@microsoft.com") .withRegion("East US"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListLinkableEnvironments_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListLinkableEnvironments_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListLinkableEnvironments_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsListLinkableEnvironmentsMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .monitors() - .listLinkableEnvironments( - "myResourceGroup", - "myMonitor", - new LinkableEnvironmentRequest() - .withTenantId("00000000-0000-0000-0000-000000000000") + public static void + monitorsListLinkableEnvironmentsMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.monitors() + .listLinkableEnvironments("myResourceGroup", "myMonitor", + new LinkableEnvironmentRequest().withTenantId("00000000-0000-0000-0000-000000000000") .withUserPrincipal("alice@microsoft.com") .withRegion("East US"), com.azure.core.util.Context.NONE); diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListMonitoredResourcesSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListMonitoredResourcesSamples.java index 8ec7c8bc6ebaa..a59b04ed9b13c 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListMonitoredResourcesSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListMonitoredResourcesSamples.java @@ -4,31 +4,35 @@ package com.azure.resourcemanager.dynatrace.generated; -/** Samples for Monitors ListMonitoredResources. */ +/** + * Samples for Monitors ListMonitoredResources. + */ public final class MonitorsListMonitoredResourcesSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListMonitoredResources_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListMonitoredResources_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListMonitoredResources_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsListMonitoredResourcesMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + public static void + monitorsListMonitoredResourcesMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { manager.monitors().listMonitoredResources("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListMonitoredResources_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListMonitoredResources_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListMonitoredResources_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsListMonitoredResourcesMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + public static void + monitorsListMonitoredResourcesMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { manager.monitors().listMonitoredResources("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListSamples.java index ece33a091e3aa..e7c429ba70b81 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListSamples.java @@ -4,31 +4,35 @@ package com.azure.resourcemanager.dynatrace.generated; -/** Samples for Monitors List. */ +/** + * Samples for Monitors List. + */ public final class MonitorsListSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListBySubscriptionId_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListBySubscriptionId_MinimumSet_Gen.json */ /** * Sample code: Monitors_ListBySubscriptionId_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsListBySubscriptionIdMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + public static void + monitorsListBySubscriptionIdMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { manager.monitors().list(com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_ListBySubscriptionId_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_ListBySubscriptionId_MaximumSet_Gen.json */ /** * Sample code: Monitors_ListBySubscriptionId_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void monitorsListBySubscriptionIdMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + public static void + monitorsListBySubscriptionIdMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { manager.monitors().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsUpdateSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsUpdateSamples.java index 570799157eda6..bf46345e4fa9a 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsUpdateSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/MonitorsUpdateSamples.java @@ -8,39 +8,39 @@ import java.util.HashMap; import java.util.Map; -/** Samples for Monitors Update. */ +/** + * Samples for Monitors Update. + */ public final class MonitorsUpdateSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Update_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_Update_MinimumSet_Gen.json */ /** * Sample code: Monitors_Update_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void monitorsUpdateMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - MonitorResource resource = - manager - .monitors() - .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE) - .getValue(); + MonitorResource resource = manager.monitors() + .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE) + .getValue(); resource.update().apply(); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Monitors_Update_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Monitors_Update_MaximumSet_Gen.json */ /** * Sample code: Monitors_Update_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void monitorsUpdateMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - MonitorResource resource = - manager - .monitors() - .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE) - .getValue(); + MonitorResource resource = manager.monitors() + .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("Environment", "Dev")).apply(); } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/OperationsListSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/OperationsListSamples.java index 558f376a4bf2c..34215800953b2 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/OperationsListSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/OperationsListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.dynatrace.generated; -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Operations_List_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Operations_List_MinimumSet_Gen.json */ /** * Sample code: Operations_List_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void operationsListMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { @@ -19,11 +22,12 @@ public static void operationsListMinimumSetGen(com.azure.resourcemanager.dynatra } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/Operations_List_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * Operations_List_MaximumSet_Gen.json */ /** * Sample code: Operations_List_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void operationsListMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnCreateOrUpdateSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnCreateOrUpdateSamples.java index 9aa24184146db..12aa20be01146 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnCreateOrUpdateSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnCreateOrUpdateSamples.java @@ -7,20 +7,22 @@ import com.azure.resourcemanager.dynatrace.models.SingleSignOnStates; import java.util.Arrays; -/** Samples for SingleSignOn CreateOrUpdate. */ +/** + * Samples for SingleSignOn CreateOrUpdate. + */ public final class SingleSignOnCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * SingleSignOn_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: SingleSignOn_CreateOrUpdate_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void singleSignOnCreateOrUpdateMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .singleSignOns() + public static void + singleSignOnCreateOrUpdateMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.singleSignOns() .define("default") .withExistingMonitor("myResourceGroup", "myMonitor") .withSingleSignOnState(SingleSignOnStates.ENABLE) @@ -31,17 +33,17 @@ public static void singleSignOnCreateOrUpdateMaximumSetGen( } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_CreateOrUpdate_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * SingleSignOn_CreateOrUpdate_MinimumSet_Gen.json */ /** * Sample code: SingleSignOn_CreateOrUpdate_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void singleSignOnCreateOrUpdateMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .singleSignOns() + public static void + singleSignOnCreateOrUpdateMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.singleSignOns() .define("default") .withExistingMonitor("myResourceGroup", "myMonitor") .withSingleSignOnUrl("https://www.dynatrace.io") diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnGetSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnGetSamples.java index 6439d512c4336..425317e74a23e 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnGetSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnGetSamples.java @@ -4,33 +4,35 @@ package com.azure.resourcemanager.dynatrace.generated; -/** Samples for SingleSignOn Get. */ +/** + * Samples for SingleSignOn Get. + */ public final class SingleSignOnGetSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * SingleSignOn_Get_MinimumSet_Gen.json */ /** * Sample code: SingleSignOn_Get_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void singleSignOnGetMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .singleSignOns() + manager.singleSignOns() .getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * SingleSignOn_Get_MaximumSet_Gen.json */ /** * Sample code: SingleSignOn_Get_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void singleSignOnGetMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .singleSignOns() + manager.singleSignOns() .getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnListSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnListSamples.java index 6b8704e6e2573..21a9369506ff3 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnListSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.dynatrace.generated; -/** Samples for SingleSignOn List. */ +/** + * Samples for SingleSignOn List. + */ public final class SingleSignOnListSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_List_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * SingleSignOn_List_MaximumSet_Gen.json */ /** * Sample code: SingleSignOn_List_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void singleSignOnListMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { @@ -19,11 +22,12 @@ public static void singleSignOnListMaximumSetGen(com.azure.resourcemanager.dynat } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/SingleSignOn_List_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * SingleSignOn_List_MinimumSet_Gen.json */ /** * Sample code: SingleSignOn_List_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void singleSignOnListMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesCreateOrUpdateSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesCreateOrUpdateSamples.java index 1da49844ba86a..b15f81d797690 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesCreateOrUpdateSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesCreateOrUpdateSamples.java @@ -14,61 +14,47 @@ import com.azure.resourcemanager.dynatrace.models.TagAction; import java.util.Arrays; -/** Samples for TagRules CreateOrUpdate. */ +/** + * Samples for TagRules CreateOrUpdate. + */ public final class TagRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_CreateOrUpdate_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * TagRules_CreateOrUpdate_MaximumSet_Gen.json */ /** * Sample code: TagRules_CreateOrUpdate_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void tagRulesCreateOrUpdateMaximumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { - manager - .tagRules() + public static void + tagRulesCreateOrUpdateMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + manager.tagRules() .define("default") .withExistingMonitor("myResourceGroup", "myMonitor") - .withLogRules( - new LogRules() - .withSendAadLogs(SendAadLogsStatus.ENABLED) - .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) - .withSendActivityLogs(SendActivityLogsStatus.ENABLED) - .withFilteringTags( - Arrays - .asList( - new FilteringTag() - .withName("Environment") - .withValue("Prod") - .withAction(TagAction.INCLUDE), - new FilteringTag() - .withName("Environment") - .withValue("Dev") - .withAction(TagAction.EXCLUDE)))) - .withMetricRules( - new MetricRules() - .withSendingMetrics(SendingMetricsStatus.ENABLED) - .withFilteringTags( - Arrays - .asList( - new FilteringTag() - .withName("Environment") - .withValue("Prod") - .withAction(TagAction.INCLUDE)))) + .withLogRules(new LogRules().withSendAadLogs(SendAadLogsStatus.ENABLED) + .withSendSubscriptionLogs(SendSubscriptionLogsStatus.ENABLED) + .withSendActivityLogs(SendActivityLogsStatus.ENABLED) + .withFilteringTags(Arrays.asList( + new FilteringTag().withName("Environment").withValue("Prod").withAction(TagAction.INCLUDE), + new FilteringTag().withName("Environment").withValue("Dev").withAction(TagAction.EXCLUDE)))) + .withMetricRules(new MetricRules().withSendingMetrics(SendingMetricsStatus.ENABLED) + .withFilteringTags(Arrays.asList( + new FilteringTag().withName("Environment").withValue("Prod").withAction(TagAction.INCLUDE)))) .create(); } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_CreateOrUpdate_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * TagRules_CreateOrUpdate_MinimumSet_Gen.json */ /** * Sample code: TagRules_CreateOrUpdate_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ - public static void tagRulesCreateOrUpdateMinimumSetGen( - com.azure.resourcemanager.dynatrace.DynatraceManager manager) { + public static void + tagRulesCreateOrUpdateMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { manager.tagRules().define("default").withExistingMonitor("myResourceGroup", "myMonitor").create(); } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesDeleteSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesDeleteSamples.java index 4d4e11dcb007c..903e9f30d23c7 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesDeleteSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesDeleteSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.dynatrace.generated; -/** Samples for TagRules Delete. */ +/** + * Samples for TagRules Delete. + */ public final class TagRulesDeleteSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_Delete_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * TagRules_Delete_MinimumSet_Gen.json */ /** * Sample code: TagRules_Delete_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void tagRulesDeleteMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { @@ -19,11 +22,12 @@ public static void tagRulesDeleteMinimumSetGen(com.azure.resourcemanager.dynatra } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_Delete_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * TagRules_Delete_MaximumSet_Gen.json */ /** * Sample code: TagRules_Delete_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void tagRulesDeleteMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesGetSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesGetSamples.java index 068f1e0f22ed6..7f8ac6b39ca0e 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesGetSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesGetSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.dynatrace.generated; -/** Samples for TagRules Get. */ +/** + * Samples for TagRules Get. + */ public final class TagRulesGetSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_Get_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * TagRules_Get_MinimumSet_Gen.json */ /** * Sample code: TagRules_Get_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void tagRulesGetMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { @@ -19,11 +22,12 @@ public static void tagRulesGetMinimumSetGen(com.azure.resourcemanager.dynatrace. } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_Get_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * TagRules_Get_MaximumSet_Gen.json */ /** * Sample code: TagRules_Get_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void tagRulesGetMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesListSamples.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesListSamples.java index 2ddc9c5455b0d..3ad4a871206ae 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesListSamples.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/samples/java/com/azure/resourcemanager/dynatrace/generated/TagRulesListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.dynatrace.generated; -/** Samples for TagRules List. */ +/** + * Samples for TagRules List. + */ public final class TagRulesListSamples { /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_List_MaximumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * TagRules_List_MaximumSet_Gen.json */ /** * Sample code: TagRules_List_MaximumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void tagRulesListMaximumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { @@ -19,11 +22,12 @@ public static void tagRulesListMaximumSetGen(com.azure.resourcemanager.dynatrace } /* - * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/TagRules_List_MinimumSet_Gen.json + * x-ms-original-file: specification/dynatrace/resource-manager/Dynatrace.Observability/stable/2023-04-27/examples/ + * TagRules_List_MinimumSet_Gen.json */ /** * Sample code: TagRules_List_MinimumSet_Gen. - * + * * @param manager Entry point to DynatraceManager. */ public static void tagRulesListMinimumSetGen(com.azure.resourcemanager.dynatrace.DynatraceManager manager) { diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsDeleteMockTests.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsDeleteMockTests.java index 1a65b9ae6a967..0ad0ed2be20ac 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsDeleteMockTests.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsDeleteMockTests.java @@ -6,46 +6,28 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.dynatrace.DynatraceManager; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class MonitorsDeleteMockTests { @Test public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); DynatraceManager manager = DynatraceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); manager.monitors().delete("y", "osvexcsonpclhoc", com.azure.core.util.Context.NONE); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetMarketplaceSaaSResourceDetailsWithResponseMockTests.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetMarketplaceSaaSResourceDetailsWithResponseMockTests.java index a543436404200..02b4124b5f2c0 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetMarketplaceSaaSResourceDetailsWithResponseMockTests.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetMarketplaceSaaSResourceDetailsWithResponseMockTests.java @@ -6,46 +6,27 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.dynatrace.DynatraceManager; import com.azure.resourcemanager.dynatrace.models.MarketplaceSaaSResourceDetailsRequest; import com.azure.resourcemanager.dynatrace.models.MarketplaceSaaSResourceDetailsResponse; import com.azure.resourcemanager.dynatrace.models.MarketplaceSubscriptionStatus; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class MonitorsGetMarketplaceSaaSResourceDetailsWithResponseMockTests { @Test public void testGetMarketplaceSaaSResourceDetailsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{\"marketplaceSaaSResourceId\":\"typmrbpizcdrqjsd\",\"planId\":\"dnfyhxdeoejzicwi\",\"marketplaceSubscriptionStatus\":\"Active\"}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); DynatraceManager manager = DynatraceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetMetricStatusWithResponseMockTests.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetMetricStatusWithResponseMockTests.java index 907cb51c67878..ffd8749b2b3a0 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetMetricStatusWithResponseMockTests.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetMetricStatusWithResponseMockTests.java @@ -6,43 +6,24 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.dynatrace.DynatraceManager; import com.azure.resourcemanager.dynatrace.models.MetricsStatusResponse; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class MonitorsGetMetricStatusWithResponseMockTests { @Test public void testGetMetricStatusWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{\"azureResourceIds\":[\"eun\"]}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); DynatraceManager manager = DynatraceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetSsoDetailsWithResponseMockTests.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetSsoDetailsWithResponseMockTests.java index 3c8a3ff57c5e7..0130f05b3d0cf 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetSsoDetailsWithResponseMockTests.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsGetSsoDetailsWithResponseMockTests.java @@ -6,46 +6,27 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.dynatrace.DynatraceManager; import com.azure.resourcemanager.dynatrace.models.SsoDetailsRequest; import com.azure.resourcemanager.dynatrace.models.SsoDetailsResponse; import com.azure.resourcemanager.dynatrace.models.SsoStatus; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class MonitorsGetSsoDetailsWithResponseMockTests { @Test public void testGetSsoDetailsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{\"isSsoEnabled\":\"Disabled\",\"metadataUrl\":\"fuwutttxf\",\"singleSignOnUrl\":\"rbirphxe\",\"aadDomains\":[\"vahfn\"],\"adminUsers\":[\"yq\",\"j\",\"uujqgidokgjljyo\",\"gvcl\"]}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); DynatraceManager manager = DynatraceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListAppServicesMockTests.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListAppServicesMockTests.java index 01876da8390da..c976f96993c14 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListAppServicesMockTests.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListAppServicesMockTests.java @@ -6,12 +6,10 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.dynatrace.DynatraceManager; import com.azure.resourcemanager.dynatrace.models.AppServiceInfo; import com.azure.resourcemanager.dynatrace.models.AutoUpdateSetting; @@ -19,37 +17,20 @@ import com.azure.resourcemanager.dynatrace.models.LogModule; import com.azure.resourcemanager.dynatrace.models.MonitoringType; import com.azure.resourcemanager.dynatrace.models.UpdateStatus; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class MonitorsListAppServicesMockTests { @Test public void testListAppServices() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{\"value\":[{\"resourceId\":\"zf\",\"version\":\"eyp\",\"monitoringType\":\"FULL_STACK\",\"autoUpdateSetting\":\"ENABLED\",\"updateStatus\":\"UPDATE_PENDING\",\"availabilityState\":\"UNEXPECTED_SHUTDOWN\",\"logModule\":\"ENABLED\",\"hostGroup\":\"tcxsenhwlrs\",\"hostName\":\"rzpwvlqdqgbiq\"}]}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); DynatraceManager manager = DynatraceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListHostsMockTests.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListHostsMockTests.java index 24c18324b29be..f2e2e31b3bdf1 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListHostsMockTests.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListHostsMockTests.java @@ -6,12 +6,10 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.dynatrace.DynatraceManager; import com.azure.resourcemanager.dynatrace.models.AutoUpdateSetting; import com.azure.resourcemanager.dynatrace.models.AvailabilityState; @@ -19,37 +17,20 @@ import com.azure.resourcemanager.dynatrace.models.MonitoringType; import com.azure.resourcemanager.dynatrace.models.UpdateStatus; import com.azure.resourcemanager.dynatrace.models.VMInfo; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class MonitorsListHostsMockTests { @Test public void testListHosts() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{\"value\":[{\"resourceId\":\"alpbuxwgipwhon\",\"version\":\"kgshwa\",\"monitoringType\":\"FULL_STACK\",\"autoUpdateSetting\":\"DISABLED\",\"updateStatus\":\"UP2DATE\",\"availabilityState\":\"UNEXPECTED_SHUTDOWN\",\"logModule\":\"ENABLED\",\"hostGroup\":\"ttmrywnuzoqf\",\"hostName\":\"yqzrnkcqvyxlw\"}]}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); DynatraceManager manager = DynatraceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListLinkableEnvironmentsMockTests.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListLinkableEnvironmentsMockTests.java index 182b80d97de69..69c98f813e5b2 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListLinkableEnvironmentsMockTests.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListLinkableEnvironmentsMockTests.java @@ -6,46 +6,27 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.dynatrace.DynatraceManager; import com.azure.resourcemanager.dynatrace.models.LinkableEnvironmentRequest; import com.azure.resourcemanager.dynatrace.models.LinkableEnvironmentResponse; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class MonitorsListLinkableEnvironmentsMockTests { @Test public void testListLinkableEnvironments() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{\"value\":[{\"environmentId\":\"bxzpuzycisp\",\"environmentName\":\"zahmgkbrpyydhibn\",\"planData\":{\"usageType\":\"kpikadrgvt\",\"billingCycle\":\"gnbuy\",\"planDetails\":\"ijggmebfsiar\",\"effectiveDate\":\"2021-08-14T22:49:32Z\"}}]}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); DynatraceManager manager = DynatraceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListMonitoredResourcesMockTests.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListMonitoredResourcesMockTests.java index 1be6b8d5a3e5f..9dc6cb96be5a4 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListMonitoredResourcesMockTests.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/MonitorsListMonitoredResourcesMockTests.java @@ -6,47 +6,28 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.dynatrace.DynatraceManager; import com.azure.resourcemanager.dynatrace.models.MonitoredResource; import com.azure.resourcemanager.dynatrace.models.SendingLogsStatus; import com.azure.resourcemanager.dynatrace.models.SendingMetricsStatus; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class MonitorsListMonitoredResourcesMockTests { @Test public void testListMonitoredResources() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{\"value\":[{\"id\":\"rrqnbpoczvyifqrv\",\"sendingMetrics\":\"Disabled\",\"reasonForMetricsStatus\":\"sllr\",\"sendingLogs\":\"Disabled\",\"reasonForLogsStatus\":\"f\"}]}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); DynatraceManager manager = DynatraceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/OperationsListMockTests.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/OperationsListMockTests.java index 89dc64cd078c6..b2095047a29e2 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/OperationsListMockTests.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/OperationsListMockTests.java @@ -6,49 +6,31 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.dynatrace.DynatraceManager; import com.azure.resourcemanager.dynatrace.models.Operation; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class OperationsListMockTests { @Test public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{\"value\":[{\"name\":\"thsu\",\"isDataAction\":true,\"display\":{\"provider\":\"yyazttbt\",\"resource\":\"rq\",\"operation\":\"edckzywbiexzfey\",\"description\":\"axibxujw\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); DynatraceManager manager = DynatraceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnsCreateOrUpdateMockTests.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnsCreateOrUpdateMockTests.java index 27b013153b337..339ccfecd0cb3 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnsCreateOrUpdateMockTests.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnsCreateOrUpdateMockTests.java @@ -6,46 +6,27 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.dynatrace.DynatraceManager; import com.azure.resourcemanager.dynatrace.models.DynatraceSingleSignOnResource; import com.azure.resourcemanager.dynatrace.models.SingleSignOnStates; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Arrays; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class SingleSignOnsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{\"properties\":{\"singleSignOnState\":\"Initial\",\"enterpriseAppId\":\"hx\",\"singleSignOnUrl\":\"yngudivk\",\"aadDomains\":[\"wbxqzvszjfau\",\"j\"],\"provisioningState\":\"Succeeded\"},\"id\":\"ivetvtcq\",\"name\":\"qtdo\",\"type\":\"mcbxvwvxysl\"}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); DynatraceManager manager = DynatraceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnsGetWithResponseMockTests.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnsGetWithResponseMockTests.java index e27518d9c77ca..95b371e1d4f88 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnsGetWithResponseMockTests.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnsGetWithResponseMockTests.java @@ -6,45 +6,26 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.dynatrace.DynatraceManager; import com.azure.resourcemanager.dynatrace.models.DynatraceSingleSignOnResource; import com.azure.resourcemanager.dynatrace.models.SingleSignOnStates; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class SingleSignOnsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{\"properties\":{\"singleSignOnState\":\"Existing\",\"enterpriseAppId\":\"wlxkvugfhzovaw\",\"singleSignOnUrl\":\"zunlu\",\"aadDomains\":[\"n\",\"rnxipei\"],\"provisioningState\":\"Deleting\"},\"id\":\"uaejxdultsk\",\"name\":\"bbtdzumvee\",\"type\":\"gpw\"}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); DynatraceManager manager = DynatraceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnsListMockTests.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnsListMockTests.java index ce82dde41b40e..94e06042cd25c 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnsListMockTests.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/SingleSignOnsListMockTests.java @@ -6,46 +6,27 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.dynatrace.DynatraceManager; import com.azure.resourcemanager.dynatrace.models.DynatraceSingleSignOnResource; import com.azure.resourcemanager.dynatrace.models.SingleSignOnStates; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class SingleSignOnsListMockTests { @Test public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{\"value\":[{\"properties\":{\"singleSignOnState\":\"Initial\",\"enterpriseAppId\":\"ttouwaboekqvkel\",\"singleSignOnUrl\":\"mvb\",\"aadDomains\":[\"jsflhhcaalnjix\",\"sxyawjoyaqcs\",\"yjpkiidzyexz\",\"eli\"],\"provisioningState\":\"Accepted\"},\"id\":\"ztfolhbnxk\",\"name\":\"alaulppggdtpnapn\",\"type\":\"iropuhpigvpgylg\"}]}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); DynatraceManager manager = DynatraceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/TagRulesCreateOrUpdateMockTests.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/TagRulesCreateOrUpdateMockTests.java index cb2c1dcc731e1..75f9f9cf537f5 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/TagRulesCreateOrUpdateMockTests.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/TagRulesCreateOrUpdateMockTests.java @@ -6,11 +6,9 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.dynatrace.DynatraceManager; import com.azure.resourcemanager.dynatrace.models.FilteringTag; import com.azure.resourcemanager.dynatrace.models.LogRules; @@ -21,38 +19,21 @@ import com.azure.resourcemanager.dynatrace.models.SendingMetricsStatus; import com.azure.resourcemanager.dynatrace.models.TagAction; import com.azure.resourcemanager.dynatrace.models.TagRule; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.Arrays; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class TagRulesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{\"properties\":{\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{\"name\":\"gqwgxhniskxfbkp\",\"value\":\"gklwn\",\"action\":\"Exclude\"},{\"name\":\"dauwhvylwzbtd\",\"value\":\"ujznb\",\"action\":\"Include\"},{\"name\":\"uwprzql\",\"value\":\"ualupjmkh\",\"action\":\"Include\"}]},\"metricRules\":{\"sendingMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"rtjriplrbpbew\",\"value\":\"hfgblc\",\"action\":\"Exclude\"},{\"name\":\"vlvqhjkbegi\",\"value\":\"nmxiebwwaloayqc\",\"action\":\"Include\"},{\"name\":\"zjuzgwyz\",\"value\":\"txon\",\"action\":\"Include\"},{\"name\":\"avjcbpwx\",\"value\":\"srknftguv\",\"action\":\"Exclude\"}]},\"provisioningState\":\"Succeeded\"},\"id\":\"wmdyvxqtay\",\"name\":\"iwwroyqbexrmc\",\"type\":\"ibycno\"}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); DynatraceManager manager = DynatraceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/TagRulesDeleteMockTests.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/TagRulesDeleteMockTests.java index a45bc2c05408d..4d37693425433 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/TagRulesDeleteMockTests.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/TagRulesDeleteMockTests.java @@ -6,46 +6,28 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.dynatrace.DynatraceManager; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class TagRulesDeleteMockTests { @Test public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); DynatraceManager manager = DynatraceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); manager.tagRules().delete("kdwzbaiuebbaumny", "upedeojnabckhs", "txp", com.azure.core.util.Context.NONE); + } } diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/TagRulesGetWithResponseMockTests.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/TagRulesGetWithResponseMockTests.java index a8e970bf37150..d10a2929c9aa2 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/TagRulesGetWithResponseMockTests.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/TagRulesGetWithResponseMockTests.java @@ -6,11 +6,9 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.dynatrace.DynatraceManager; import com.azure.resourcemanager.dynatrace.models.SendAadLogsStatus; import com.azure.resourcemanager.dynatrace.models.SendActivityLogsStatus; @@ -18,37 +16,20 @@ import com.azure.resourcemanager.dynatrace.models.SendingMetricsStatus; import com.azure.resourcemanager.dynatrace.models.TagAction; import com.azure.resourcemanager.dynatrace.models.TagRule; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class TagRulesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{\"properties\":{\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Enabled\",\"sendActivityLogs\":\"Disabled\",\"filteringTags\":[{\"name\":\"swzts\",\"value\":\"pgn\",\"action\":\"Include\"},{\"name\":\"hpzxbzpfzab\",\"value\":\"cuh\",\"action\":\"Include\"},{\"name\":\"tyq\",\"value\":\"lbbovplw\",\"action\":\"Exclude\"}]},\"metricRules\":{\"sendingMetrics\":\"Disabled\",\"filteringTags\":[{\"name\":\"osvmk\",\"value\":\"sxqu\",\"action\":\"Include\"}]},\"provisioningState\":\"Accepted\"},\"id\":\"mg\",\"name\":\"xnkjzkdesl\",\"type\":\"vlopwiyighx\"}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); DynatraceManager manager = DynatraceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), diff --git a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/TagRulesListMockTests.java b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/TagRulesListMockTests.java index 04e1f8ec214ab..03f8cc7de80ef 100644 --- a/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/TagRulesListMockTests.java +++ b/sdk/dynatrace/azure-resourcemanager-dynatrace/src/test/java/com/azure/resourcemanager/dynatrace/generated/TagRulesListMockTests.java @@ -6,12 +6,10 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; import com.azure.core.http.rest.PagedIterable; import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.dynatrace.DynatraceManager; import com.azure.resourcemanager.dynatrace.models.SendAadLogsStatus; import com.azure.resourcemanager.dynatrace.models.SendActivityLogsStatus; @@ -19,37 +17,20 @@ import com.azure.resourcemanager.dynatrace.models.SendingMetricsStatus; import com.azure.resourcemanager.dynatrace.models.TagAction; import com.azure.resourcemanager.dynatrace.models.TagRule; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class TagRulesListMockTests { @Test public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{\"value\":[{\"properties\":{\"logRules\":{\"sendAadLogs\":\"Enabled\",\"sendSubscriptionLogs\":\"Disabled\",\"sendActivityLogs\":\"Enabled\",\"filteringTags\":[{\"name\":\"xuutkncwscwsv\",\"value\":\"otogtwrupqs\",\"action\":\"Include\"},{\"name\":\"i\",\"value\":\"kvceoveilovnotyf\",\"action\":\"Exclude\"},{\"name\":\"jbkcnxdhbttkph\",\"value\":\"pnvjtoqnermclf\",\"action\":\"Include\"}]},\"metricRules\":{\"sendingMetrics\":\"Enabled\",\"filteringTags\":[{\"name\":\"rpabg\",\"value\":\"psbjta\",\"action\":\"Exclude\"},{\"name\":\"xywpmueefjzwfqkq\",\"value\":\"ids\",\"action\":\"Exclude\"},{\"name\":\"obglaocqxtcc\",\"value\":\"yudxytlmoy\",\"action\":\"Exclude\"},{\"name\":\"fudwpznt\",\"value\":\"dzhlrq\",\"action\":\"Exclude\"}]},\"provisioningState\":\"Succeeded\"},\"id\":\"rlhrxs\",\"name\":\"kyv\",\"type\":\"ycanuzbpzkafku\"}]}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); DynatraceManager manager = DynatraceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),