From c59a155b8daac00fa53d87c25268fe933f045a42 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 22 Nov 2023 12:44:44 +0000 Subject: [PATCH] CodeGen from PR 26815 in Azure/azure-rest-api-specs Merge d5ef81bbae9b606d44c165d3ba7957f6cfe10d22 into 4ad21c4cd5f024b520b77907b8ac15fb84c8413a --- .../azure-resourcemanager-logz/CHANGELOG.md | 4 +- sdk/logz/azure-resourcemanager-logz/README.md | 8 +- sdk/logz/azure-resourcemanager-logz/SAMPLE.md | 284 ++-- sdk/logz/azure-resourcemanager-logz/pom.xml | 9 +- .../resourcemanager/logz/LogzManager.java | 96 +- .../logz/fluent/MicrosoftLogz.java | 28 +- .../logz/fluent/MonitorOperationsClient.java | 24 +- .../logz/fluent/MonitorsClient.java | 72 +- .../logz/fluent/OperationsClient.java | 16 +- .../logz/fluent/SingleSignOnsClient.java | 45 +- .../logz/fluent/SubAccountTagRulesClient.java | 49 +- .../logz/fluent/SubAccountsClient.java | 108 +- .../logz/fluent/TagRulesClient.java | 36 +- .../models/LogzMonitorResourceInner.java | 28 +- .../models/LogzSingleSignOnResourceInner.java | 16 +- .../fluent/models/MonitoredResourceInner.java | 32 +- .../models/MonitoringTagRulesInner.java | 16 +- .../fluent/models/OperationResultInner.java | 26 +- .../fluent/models/UserRoleResponseInner.java | 14 +- .../models/VMExtensionPayloadInner.java | 18 +- .../logz/fluent/models/VMResourcesInner.java | 18 +- .../logz/fluent/models/package-info.java | 5 +- .../logz/fluent/package-info.java | 5 +- .../LogzMonitorResourceImpl.java | 50 +- .../LogzSingleSignOnResourceImpl.java | 48 +- .../implementation/MicrosoftLogzBuilder.java | 46 +- .../implementation/MicrosoftLogzImpl.java | 131 +- .../MonitorOperationsClientImpl.java | 499 ++---- .../implementation/MonitorOperationsImpl.java | 29 +- .../implementation/MonitoredResourceImpl.java | 4 +- .../MonitoringTagRulesImpl.java | 58 +- .../implementation/MonitorsClientImpl.java | 1203 +++++--------- .../logz/implementation/MonitorsImpl.java | 89 +- .../implementation/OperationsClientImpl.java | 159 +- .../SingleSignOnsClientImpl.java | 523 ++---- .../implementation/SingleSignOnsImpl.java | 69 +- .../SubAccountTagRulesClientImpl.java | 559 +++---- .../SubAccountTagRulesImpl.java | 74 +- .../implementation/SubAccountsClientImpl.java | 1442 ++++++----------- .../logz/implementation/SubAccountsImpl.java | 111 +- .../implementation/TagRulesClientImpl.java | 494 ++---- .../logz/implementation/TagRulesImpl.java | 97 +- .../logz/implementation/Utils.java | 43 +- .../VMExtensionPayloadImpl.java | 4 +- .../logz/implementation/package-info.java | 5 +- .../logz/models/FilteringTag.java | 18 +- .../logz/models/IdentityProperties.java | 18 +- .../logz/models/LiftrResourceCategories.java | 18 +- .../resourcemanager/logz/models/LogRules.java | 26 +- .../logz/models/LogzMonitorResource.java | 132 +- .../LogzMonitorResourceListResponse.java | 18 +- .../LogzMonitorResourceUpdateParameters.java | 18 +- .../models/LogzOrganizationProperties.java | 24 +- .../models/LogzSingleSignOnProperties.java | 24 +- .../logz/models/LogzSingleSignOnResource.java | 77 +- .../LogzSingleSignOnResourceListResponse.java | 18 +- .../logz/models/ManagedIdentityTypes.java | 18 +- .../models/MarketplaceSubscriptionStatus.java | 14 +- .../logz/models/MonitorOperations.java | 24 +- .../logz/models/MonitorProperties.java | 40 +- .../logz/models/MonitorUpdateProperties.java | 14 +- .../logz/models/MonitoredResource.java | 18 +- .../models/MonitoredResourceListResponse.java | 18 +- .../logz/models/MonitoringStatus.java | 18 +- .../logz/models/MonitoringTagRules.java | 77 +- .../MonitoringTagRulesListResponse.java | 18 +- .../models/MonitoringTagRulesProperties.java | 18 +- .../resourcemanager/logz/models/Monitors.java | 50 +- .../logz/models/OperationDisplay.java | 26 +- .../logz/models/OperationListResult.java | 18 +- .../logz/models/OperationResult.java | 14 +- .../logz/models/Operations.java | 16 +- .../resourcemanager/logz/models/PlanData.java | 26 +- .../logz/models/ProvisioningState.java | 46 +- .../logz/models/SingleSignOnStates.java | 26 +- .../logz/models/SingleSignOns.java | 22 +- .../logz/models/SubAccountTagRules.java | 45 +- .../SubAccountTagRulesDeleteHeaders.java | 12 +- .../SubAccountTagRulesDeleteResponse.java | 12 +- .../logz/models/SubAccounts.java | 80 +- .../logz/models/TagAction.java | 18 +- .../resourcemanager/logz/models/TagRules.java | 34 +- .../logz/models/TagRulesDeleteHeaders.java | 12 +- .../logz/models/TagRulesDeleteResponse.java | 10 +- .../resourcemanager/logz/models/UserInfo.java | 26 +- .../resourcemanager/logz/models/UserRole.java | 22 +- .../logz/models/UserRoleListResponse.java | 18 +- .../logz/models/UserRoleRequest.java | 14 +- .../logz/models/UserRoleResponse.java | 8 +- .../logz/models/VMExtensionPayload.java | 10 +- .../logz/models/VMHostUpdateRequest.java | 18 +- .../logz/models/VMHostUpdateStates.java | 18 +- .../logz/models/VMResources.java | 10 +- .../logz/models/VMResourcesListResponse.java | 18 +- .../logz/models/package-info.java | 5 +- .../resourcemanager/logz/package-info.java | 5 +- .../src/main/java/module-info.java | 8 +- .../proxy-config.json | 1 + .../reflect-config.json | 201 +++ .../MonitorOperationListVMHostsSamples.java | 9 +- ...nitorOperationListVmHostUpdateSamples.java | 14 +- .../MonitorOperationVMHostPayloadSamples.java | 14 +- .../logz/generated/MonitorsCreateSamples.java | 15 +- .../logz/generated/MonitorsDeleteSamples.java | 9 +- .../MonitorsGetByResourceGroupSamples.java | 14 +- .../MonitorsListByResourceGroupSamples.java | 9 +- ...MonitorsListMonitoredResourcesSamples.java | 9 +- .../logz/generated/MonitorsListSamples.java | 9 +- .../MonitorsListUserRolesSamples.java | 9 +- .../logz/generated/MonitorsUpdateSamples.java | 17 +- .../logz/generated/OperationsListSamples.java | 9 +- .../SingleSignOnCreateOrUpdateSamples.java | 9 +- .../generated/SingleSignOnGetSamples.java | 14 +- .../generated/SingleSignOnListSamples.java | 10 +- .../generated/SubAccountCreateSamples.java | 14 +- .../generated/SubAccountDeleteSamples.java | 9 +- .../logz/generated/SubAccountGetSamples.java | 14 +- ...bAccountListMonitoredResourcesSamples.java | 15 +- .../logz/generated/SubAccountListSamples.java | 9 +- .../SubAccountListVMHostsSamples.java | 14 +- .../SubAccountListVmHostUpdateSamples.java | 14 +- ...bAccountTagRulesCreateOrUpdateSamples.java | 16 +- .../SubAccountTagRulesDeleteSamples.java | 15 +- .../SubAccountTagRulesGetSamples.java | 15 +- .../SubAccountTagRulesListSamples.java | 14 +- .../generated/SubAccountUpdateSamples.java | 14 +- .../SubAccountVMHostPayloadSamples.java | 14 +- .../TagRulesCreateOrUpdateSamples.java | 9 +- .../logz/generated/TagRulesDeleteSamples.java | 14 +- .../logz/generated/TagRulesGetSamples.java | 9 +- .../logz/generated/TagRulesListSamples.java | 9 +- .../logz/generated/FilteringTagTests.java | 33 - .../generated/IdentityPropertiesTests.java | 28 - .../logz/generated/LogRulesTests.java | 64 - .../LogzMonitorResourceInnerTests.java | 109 -- .../LogzMonitorResourceListResponseTests.java | 112 -- ...zMonitorResourceUpdateParametersTests.java | 47 - .../LogzOrganizationPropertiesTests.java | 36 - .../LogzSingleSignOnPropertiesTests.java | 37 - .../LogzSingleSignOnResourceInnerTests.java | 40 - ...SingleSignOnResourceListResponseTests.java | 55 - ...MonitorOperationsListVMHostsMockTests.java | 68 - ...orOperationsListVmHostUpdateMockTests.java | 86 - .../generated/MonitorPropertiesTests.java | 78 - .../MonitorUpdatePropertiesTests.java | 26 - .../MonitoredResourceInnerTests.java | 42 - .../MonitoredResourceListResponseTests.java | 63 - .../MonitoringTagRulesInnerTests.java | 44 - .../MonitoringTagRulesListResponseTests.java | 39 - .../MonitoringTagRulesPropertiesTests.java | 59 - .../generated/MonitorsCreateMockTests.java | 135 -- .../generated/MonitorsDeleteMockTests.java | 61 - ...tByResourceGroupWithResponseMockTests.java | 92 -- .../MonitorsListByResourceGroupMockTests.java | 99 -- .../logz/generated/MonitorsListMockTests.java | 98 -- ...nitorsListMonitoredResourcesMockTests.java | 72 - .../MonitorsListUserRolesMockTests.java | 75 - .../logz/generated/OperationDisplayTests.java | 39 - .../generated/OperationListResultTests.java | 70 - .../generated/OperationResultInnerTests.java | 51 - .../generated/OperationsListMockTests.java | 73 - .../logz/generated/PlanDataTests.java | 40 - .../SingleSignOnsCreateOrUpdateMockTests.java | 80 - ...SingleSignOnsGetWithResponseMockTests.java | 73 - .../generated/SingleSignOnsListMockTests.java | 71 - ...esCreateOrUpdateWithResponseMockTests.java | 90 - ...ntTagRulesDeleteWithResponseMockTests.java | 63 - ...countTagRulesGetWithResponseMockTests.java | 72 - .../SubAccountTagRulesListMockTests.java | 70 - .../generated/SubAccountsCreateMockTests.java | 139 -- .../generated/SubAccountsDeleteMockTests.java | 61 - .../SubAccountsGetWithResponseMockTests.java | 91 -- .../generated/SubAccountsListMockTests.java | 98 -- ...countsListMonitoredResourcesMockTests.java | 74 - .../SubAccountsListVMHostsMockTests.java | 68 - .../SubAccountsListVmHostUpdateMockTests.java | 85 - ...ubAccountsUpdateWithResponseMockTests.java | 113 -- ...esCreateOrUpdateWithResponseMockTests.java | 84 - .../TagRulesDeleteWithResponseMockTests.java | 63 - .../TagRulesGetWithResponseMockTests.java | 72 - .../logz/generated/TagRulesListMockTests.java | 70 - .../logz/generated/UserInfoTests.java | 39 - .../generated/UserRoleListResponseTests.java | 39 - .../logz/generated/UserRoleRequestTests.java | 24 - .../generated/UserRoleResponseInnerTests.java | 26 - .../generated/VMHostUpdateRequestTests.java | 44 - .../logz/generated/VMResourcesInnerTests.java | 29 - .../VMResourcesListResponseTests.java | 41 - 188 files changed, 3719 insertions(+), 8630 deletions(-) create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-logz/proxy-config.json create mode 100644 sdk/logz/azure-resourcemanager-logz/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-logz/reflect-config.json delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/FilteringTagTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/IdentityPropertiesTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogRulesTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceInnerTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceListResponseTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceUpdateParametersTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzOrganizationPropertiesTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnPropertiesTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnResourceInnerTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnResourceListResponseTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorOperationsListVMHostsMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorOperationsListVmHostUpdateMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorPropertiesTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorUpdatePropertiesTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoredResourceInnerTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoredResourceListResponseTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesInnerTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesListResponseTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesPropertiesTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsCreateMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsDeleteMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListByResourceGroupMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListMonitoredResourcesMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListUserRolesMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationDisplayTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationListResultTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationResultInnerTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationsListMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/PlanDataTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsCreateOrUpdateMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsGetWithResponseMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsListMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesDeleteWithResponseMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesGetWithResponseMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesListMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsCreateMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsDeleteMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsGetWithResponseMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListMonitoredResourcesMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListVMHostsMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListVmHostUpdateMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsUpdateWithResponseMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesDeleteWithResponseMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesGetWithResponseMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesListMockTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserInfoTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleListResponseTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleRequestTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleResponseInnerTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMHostUpdateRequestTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMResourcesInnerTests.java delete mode 100644 sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMResourcesListResponseTests.java diff --git a/sdk/logz/azure-resourcemanager-logz/CHANGELOG.md b/sdk/logz/azure-resourcemanager-logz/CHANGELOG.md index 23c94c339788..b243524de78c 100644 --- a/sdk/logz/azure-resourcemanager-logz/CHANGELOG.md +++ b/sdk/logz/azure-resourcemanager-logz/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.1 (2023-11-22) + +- Azure Resource Manager logz client library for Java. This package contains Microsoft Azure SDK for logz Management SDK. Package tag package-2020-10-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/logz/azure-resourcemanager-logz/README.md b/sdk/logz/azure-resourcemanager-logz/README.md index 1bb8b44b4d2e..086646cd9c4b 100644 --- a/sdk/logz/azure-resourcemanager-logz/README.md +++ b/sdk/logz/azure-resourcemanager-logz/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-logz - 1.0.0-beta.2 + 1.0.0-beta.3 ``` [//]: # ({x-version-update-end}) @@ -45,7 +45,7 @@ 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. +By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. @@ -94,7 +94,7 @@ 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_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty @@ -103,3 +103,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Flogz%2Fazure-resourcemanager-logz%2FREADME.png) diff --git a/sdk/logz/azure-resourcemanager-logz/SAMPLE.md b/sdk/logz/azure-resourcemanager-logz/SAMPLE.md index ab1326336799..c90f851ca41b 100644 --- a/sdk/logz/azure-resourcemanager-logz/SAMPLE.md +++ b/sdk/logz/azure-resourcemanager-logz/SAMPLE.md @@ -56,14 +56,16 @@ ### MonitorOperation_ListVMHosts ```java -/** Samples for MonitorOperation ListVMHosts. */ +/** + * Samples for MonitorOperation ListVMHosts. + */ public final class MonitorOperationListVMHostsSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_VMHosts_List.json */ /** * Sample code: MainAccount_VMHosts_List. - * + * * @param manager Entry point to LogzManager. */ public static void mainAccountVMHostsList(com.azure.resourcemanager.logz.LogzManager manager) { @@ -75,20 +77,22 @@ public final class MonitorOperationListVMHostsSamples { ### MonitorOperation_ListVmHostUpdate ```java -/** Samples for MonitorOperation ListVmHostUpdate. */ +import com.azure.resourcemanager.logz.models.VMHostUpdateRequest; + +/** + * Samples for MonitorOperation ListVmHostUpdate. + */ public final class MonitorOperationListVmHostUpdateSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_VMHosts_Update.json */ /** * Sample code: MainAccount_VMHosts_Update. - * + * * @param manager Entry point to LogzManager. */ public static void mainAccountVMHostsUpdate(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .monitorOperations() - .listVmHostUpdate("myResourceGroup", "myMonitor", null, com.azure.core.util.Context.NONE); + manager.monitorOperations().listVmHostUpdate("myResourceGroup", "myMonitor", null, com.azure.core.util.Context.NONE); } } ``` @@ -96,20 +100,20 @@ public final class MonitorOperationListVmHostUpdateSamples { ### MonitorOperation_VMHostPayload ```java -/** Samples for MonitorOperation VMHostPayload. */ +/** + * Samples for MonitorOperation VMHostPayload. + */ public final class MonitorOperationVMHostPayloadSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_VMHosts_Payload.json */ /** * Sample code: MainAccount_VMHosts_Payload. - * + * * @param manager Entry point to LogzManager. */ public static void mainAccountVMHostsPayload(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .monitorOperations() - .vMHostPayloadWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + manager.monitorOperations().vMHostPayloadWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } ``` @@ -117,23 +121,20 @@ public final class MonitorOperationVMHostPayloadSamples { ### Monitors_Create ```java -/** Samples for Monitors Create. */ +/** + * Samples for Monitors Create. + */ public final class MonitorsCreateSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Create.json */ /** * Sample code: Monitors_Create. - * + * * @param manager Entry point to LogzManager. */ public static void monitorsCreate(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .monitors() - .define("myMonitor") - .withRegion((String) null) - .withExistingResourceGroup("myResourceGroup") - .create(); + manager.monitors().define("myMonitor").withRegion((String) null).withExistingResourceGroup("myResourceGroup").create(); } } ``` @@ -141,14 +142,16 @@ public final class MonitorsCreateSamples { ### Monitors_Delete ```java -/** Samples for Monitors Delete. */ +/** + * Samples for Monitors Delete. + */ public final class MonitorsDeleteSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Delete.json */ /** * Sample code: Monitors_Delete. - * + * * @param manager Entry point to LogzManager. */ public static void monitorsDelete(com.azure.resourcemanager.logz.LogzManager manager) { @@ -160,20 +163,20 @@ public final class MonitorsDeleteSamples { ### Monitors_GetByResourceGroup ```java -/** Samples for Monitors GetByResourceGroup. */ +/** + * Samples for Monitors GetByResourceGroup. + */ public final class MonitorsGetByResourceGroupSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Get.json */ /** * Sample code: Monitors_Get. - * + * * @param manager Entry point to LogzManager. */ public static void monitorsGet(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .monitors() - .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + manager.monitors().getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); } } ``` @@ -181,14 +184,16 @@ public final class MonitorsGetByResourceGroupSamples { ### Monitors_List ```java -/** Samples for Monitors List. */ +/** + * Samples for Monitors List. + */ public final class MonitorsListSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_List.json */ /** * Sample code: Monitors_List. - * + * * @param manager Entry point to LogzManager. */ public static void monitorsList(com.azure.resourcemanager.logz.LogzManager manager) { @@ -200,14 +205,16 @@ public final class MonitorsListSamples { ### Monitors_ListByResourceGroup ```java -/** Samples for Monitors ListByResourceGroup. */ +/** + * Samples for Monitors ListByResourceGroup. + */ public final class MonitorsListByResourceGroupSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_ListByResourceGroup.json */ /** * Sample code: Monitors_ListByResourceGroup. - * + * * @param manager Entry point to LogzManager. */ public static void monitorsListByResourceGroup(com.azure.resourcemanager.logz.LogzManager manager) { @@ -219,14 +226,16 @@ public final class MonitorsListByResourceGroupSamples { ### Monitors_ListMonitoredResources ```java -/** Samples for Monitors ListMonitoredResources. */ +/** + * Samples for Monitors ListMonitoredResources. + */ public final class MonitorsListMonitoredResourcesSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MonitoredResources_List.json */ /** * Sample code: MonitoredResources_List. - * + * * @param manager Entry point to LogzManager. */ public static void monitoredResourcesList(com.azure.resourcemanager.logz.LogzManager manager) { @@ -238,14 +247,18 @@ public final class MonitorsListMonitoredResourcesSamples { ### Monitors_ListUserRoles ```java -/** Samples for Monitors ListUserRoles. */ +import com.azure.resourcemanager.logz.models.UserRoleRequest; + +/** + * Samples for Monitors ListUserRoles. + */ public final class MonitorsListUserRolesSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_listUserRoles.json */ /** * Sample code: MainAccount_VMHosts_Update. - * + * * @param manager Entry point to LogzManager. */ public static void mainAccountVMHostsUpdate(com.azure.resourcemanager.logz.LogzManager manager) { @@ -259,22 +272,20 @@ public final class MonitorsListUserRolesSamples { ```java import com.azure.resourcemanager.logz.models.LogzMonitorResource; -/** Samples for Monitors Update. */ +/** + * Samples for Monitors Update. + */ public final class MonitorsUpdateSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Update.json */ /** * Sample code: Monitors_Update. - * + * * @param manager Entry point to LogzManager. */ public static void monitorsUpdate(com.azure.resourcemanager.logz.LogzManager manager) { - LogzMonitorResource resource = - manager - .monitors() - .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE) - .getValue(); + LogzMonitorResource resource = manager.monitors().getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE).getValue(); resource.update().apply(); } } @@ -283,14 +294,16 @@ public final class MonitorsUpdateSamples { ### Operations_List ```java -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Operations_List.json */ /** * Sample code: Operations_List. - * + * * @param manager Entry point to LogzManager. */ public static void operationsList(com.azure.resourcemanager.logz.LogzManager manager) { @@ -302,14 +315,16 @@ public final class OperationsListSamples { ### SingleSignOn_CreateOrUpdate ```java -/** Samples for SingleSignOn CreateOrUpdate. */ +/** + * Samples for SingleSignOn CreateOrUpdate. + */ public final class SingleSignOnCreateOrUpdateSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SingleSignOnConfigurations_CreateOrUpdate.json */ /** * Sample code: SingleSignOnConfigurations_CreateOrUpdate. - * + * * @param manager Entry point to LogzManager. */ public static void singleSignOnConfigurationsCreateOrUpdate(com.azure.resourcemanager.logz.LogzManager manager) { @@ -321,20 +336,20 @@ public final class SingleSignOnCreateOrUpdateSamples { ### SingleSignOn_Get ```java -/** Samples for SingleSignOn Get. */ +/** + * Samples for SingleSignOn Get. + */ public final class SingleSignOnGetSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SingleSignOnConfigurations_Get.json */ /** * Sample code: SingleSignOnConfigurations_Get. - * + * * @param manager Entry point to LogzManager. */ public static void singleSignOnConfigurationsGet(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .singleSignOns() - .getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); + manager.singleSignOns().getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); } } ``` @@ -342,14 +357,16 @@ public final class SingleSignOnGetSamples { ### SingleSignOn_List ```java -/** Samples for SingleSignOn List. */ +/** + * Samples for SingleSignOn List. + */ public final class SingleSignOnListSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SingleSignOnConfigurations_List.json */ /** * Sample code: SingleSignOnConfigurations_List. - * + * * @param manager Entry point to LogzManager. */ public static void singleSignOnConfigurationsList(com.azure.resourcemanager.logz.LogzManager manager) { @@ -361,20 +378,22 @@ public final class SingleSignOnListSamples { ### SubAccount_Create ```java -/** Samples for SubAccount Create. */ +import com.azure.resourcemanager.logz.fluent.models.LogzMonitorResourceInner; + +/** + * Samples for SubAccount Create. + */ public final class SubAccountCreateSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Create.json */ /** * Sample code: subAccount_Create. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountCreate(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .subAccounts() - .create("myResourceGroup", "myMonitor", "SubAccount1", null, com.azure.core.util.Context.NONE); + manager.subAccounts().create("myResourceGroup", "myMonitor", "SubAccount1", null, com.azure.core.util.Context.NONE); } } ``` @@ -382,14 +401,16 @@ public final class SubAccountCreateSamples { ### SubAccount_Delete ```java -/** Samples for SubAccount Delete. */ +/** + * Samples for SubAccount Delete. + */ public final class SubAccountDeleteSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Delete.json */ /** * Sample code: SubAccount_Delete. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountDelete(com.azure.resourcemanager.logz.LogzManager manager) { @@ -401,20 +422,20 @@ public final class SubAccountDeleteSamples { ### SubAccount_Get ```java -/** Samples for SubAccount Get. */ +/** + * Samples for SubAccount Get. + */ public final class SubAccountGetSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Get.json */ /** * Sample code: SubAccount_Get. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountGet(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .subAccounts() - .getWithResponse("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); + manager.subAccounts().getWithResponse("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); } } ``` @@ -422,14 +443,16 @@ public final class SubAccountGetSamples { ### SubAccount_List ```java -/** Samples for SubAccount List. */ +/** + * Samples for SubAccount List. + */ public final class SubAccountListSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_ListByResourceGroup.json */ /** * Sample code: SubAccount_List. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountList(com.azure.resourcemanager.logz.LogzManager manager) { @@ -441,20 +464,20 @@ public final class SubAccountListSamples { ### SubAccount_ListMonitoredResources ```java -/** Samples for SubAccount ListMonitoredResources. */ +/** + * Samples for SubAccount ListMonitoredResources. + */ public final class SubAccountListMonitoredResourcesSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_MonitoredResources_List.json */ /** * Sample code: SubAccount_MonitoredResources_List. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountMonitoredResourcesList(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .subAccounts() - .listMonitoredResources("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); + manager.subAccounts().listMonitoredResources("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); } } ``` @@ -462,20 +485,20 @@ public final class SubAccountListMonitoredResourcesSamples { ### SubAccount_ListVMHosts ```java -/** Samples for SubAccount ListVMHosts. */ +/** + * Samples for SubAccount ListVMHosts. + */ public final class SubAccountListVMHostsSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_VMHosts_List.json */ /** * Sample code: SubAccount_VMHosts_List. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountVMHostsList(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .subAccounts() - .listVMHosts("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); + manager.subAccounts().listVMHosts("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); } } ``` @@ -483,20 +506,22 @@ public final class SubAccountListVMHostsSamples { ### SubAccount_ListVmHostUpdate ```java -/** Samples for SubAccount ListVmHostUpdate. */ +import com.azure.resourcemanager.logz.models.VMHostUpdateRequest; + +/** + * Samples for SubAccount ListVmHostUpdate. + */ public final class SubAccountListVmHostUpdateSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_VMHosts_Update.json */ /** * Sample code: SubAccount_VMHosts_Update. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountVMHostsUpdate(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .subAccounts() - .listVmHostUpdate("myResourceGroup", "myMonitor", "SubAccount1", null, com.azure.core.util.Context.NONE); + manager.subAccounts().listVmHostUpdate("myResourceGroup", "myMonitor", "SubAccount1", null, com.azure.core.util.Context.NONE); } } ``` @@ -504,20 +529,22 @@ public final class SubAccountListVmHostUpdateSamples { ### SubAccount_Update ```java -/** Samples for SubAccount Update. */ +import com.azure.resourcemanager.logz.models.LogzMonitorResourceUpdateParameters; + +/** + * Samples for SubAccount Update. + */ public final class SubAccountUpdateSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Update.json */ /** * Sample code: SubAccount_Update. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountUpdate(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .subAccounts() - .updateWithResponse("myResourceGroup", "myMonitor", "SubAccount1", null, com.azure.core.util.Context.NONE); + manager.subAccounts().updateWithResponse("myResourceGroup", "myMonitor", "SubAccount1", null, com.azure.core.util.Context.NONE); } } ``` @@ -525,20 +552,20 @@ public final class SubAccountUpdateSamples { ### SubAccount_VMHostPayload ```java -/** Samples for SubAccount VMHostPayload. */ +/** + * Samples for SubAccount VMHostPayload. + */ public final class SubAccountVMHostPayloadSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_VMHosts_Payload.json */ /** * Sample code: SubAccount_VMHosts_Payload. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountVMHostsPayload(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .subAccounts() - .vMHostPayloadWithResponse("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); + manager.subAccounts().vMHostPayloadWithResponse("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); } } ``` @@ -546,21 +573,22 @@ public final class SubAccountVMHostPayloadSamples { ### SubAccountTagRules_CreateOrUpdate ```java -/** Samples for SubAccountTagRules CreateOrUpdate. */ +import com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner; + +/** + * Samples for SubAccountTagRules CreateOrUpdate. + */ public final class SubAccountTagRulesCreateOrUpdateSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_CreateOrUpdate.json */ /** * Sample code: SubAccountTagRules_CreateOrUpdate. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountTagRulesCreateOrUpdate(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .subAccountTagRules() - .createOrUpdateWithResponse( - "myResourceGroup", "myMonitor", "SubAccount1", "default", null, com.azure.core.util.Context.NONE); + manager.subAccountTagRules().createOrUpdateWithResponse("myResourceGroup", "myMonitor", "SubAccount1", "default", null, com.azure.core.util.Context.NONE); } } ``` @@ -568,21 +596,20 @@ public final class SubAccountTagRulesCreateOrUpdateSamples { ### SubAccountTagRules_Delete ```java -/** Samples for SubAccountTagRules Delete. */ +/** + * Samples for SubAccountTagRules Delete. + */ public final class SubAccountTagRulesDeleteSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_Delete.json */ /** * Sample code: TagRules_Delete. - * + * * @param manager Entry point to LogzManager. */ public static void tagRulesDelete(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .subAccountTagRules() - .deleteWithResponse( - "myResourceGroup", "myMonitor", "SubAccount1", "default", com.azure.core.util.Context.NONE); + manager.subAccountTagRules().deleteWithResponse("myResourceGroup", "myMonitor", "SubAccount1", "default", com.azure.core.util.Context.NONE); } } ``` @@ -590,21 +617,20 @@ public final class SubAccountTagRulesDeleteSamples { ### SubAccountTagRules_Get ```java -/** Samples for SubAccountTagRules Get. */ +/** + * Samples for SubAccountTagRules Get. + */ public final class SubAccountTagRulesGetSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_Get.json */ /** * Sample code: SubAccountTagRules_Get. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountTagRulesGet(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .subAccountTagRules() - .getWithResponse( - "myResourceGroup", "myMonitor", "SubAccount1", "default", com.azure.core.util.Context.NONE); + manager.subAccountTagRules().getWithResponse("myResourceGroup", "myMonitor", "SubAccount1", "default", com.azure.core.util.Context.NONE); } } ``` @@ -612,20 +638,20 @@ public final class SubAccountTagRulesGetSamples { ### SubAccountTagRules_List ```java -/** Samples for SubAccountTagRules List. */ +/** + * Samples for SubAccountTagRules List. + */ public final class SubAccountTagRulesListSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_List.json */ /** * Sample code: SubAccountTagRules_List. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountTagRulesList(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .subAccountTagRules() - .list("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); + manager.subAccountTagRules().list("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); } } ``` @@ -633,14 +659,16 @@ public final class SubAccountTagRulesListSamples { ### TagRules_CreateOrUpdate ```java -/** Samples for TagRules CreateOrUpdate. */ +/** + * Samples for TagRules CreateOrUpdate. + */ public final class TagRulesCreateOrUpdateSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_CreateOrUpdate.json */ /** * Sample code: TagRules_CreateOrUpdate. - * + * * @param manager Entry point to LogzManager. */ public static void tagRulesCreateOrUpdate(com.azure.resourcemanager.logz.LogzManager manager) { @@ -652,20 +680,20 @@ public final class TagRulesCreateOrUpdateSamples { ### TagRules_Delete ```java -/** Samples for TagRules Delete. */ +/** + * Samples for TagRules Delete. + */ public final class TagRulesDeleteSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_Delete.json */ /** * Sample code: TagRules_Delete. - * + * * @param manager Entry point to LogzManager. */ public static void tagRulesDelete(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .tagRules() - .deleteWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); + manager.tagRules().deleteWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); } } ``` @@ -673,14 +701,16 @@ public final class TagRulesDeleteSamples { ### TagRules_Get ```java -/** Samples for TagRules Get. */ +/** + * Samples for TagRules Get. + */ public final class TagRulesGetSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_Get.json */ /** * Sample code: TagRules_Get. - * + * * @param manager Entry point to LogzManager. */ public static void tagRulesGet(com.azure.resourcemanager.logz.LogzManager manager) { @@ -692,14 +722,16 @@ public final class TagRulesGetSamples { ### TagRules_List ```java -/** Samples for TagRules List. */ +/** + * Samples for TagRules List. + */ public final class TagRulesListSamples { /* * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_List.json */ /** * Sample code: TagRules_List. - * + * * @param manager Entry point to LogzManager. */ public static void tagRulesList(com.azure.resourcemanager.logz.LogzManager manager) { diff --git a/sdk/logz/azure-resourcemanager-logz/pom.xml b/sdk/logz/azure-resourcemanager-logz/pom.xml index fafe6f0678f2..f0855d11c114 100644 --- a/sdk/logz/azure-resourcemanager-logz/pom.xml +++ b/sdk/logz/azure-resourcemanager-logz/pom.xml @@ -1,3 +1,8 @@ + 4.0.0 @@ -38,7 +43,9 @@ UTF-8 - true + 0 + 0 + true diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/LogzManager.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/LogzManager.java index af576f9330fc..5b674a3c5bf8 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/LogzManager.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/LogzManager.java @@ -46,7 +46,9 @@ import java.util.Objects; import java.util.stream.Collectors; -/** Entry point to LogzManager. */ +/** + * Entry point to LogzManager. + */ public final class LogzManager { private Monitors monitors; @@ -67,18 +69,14 @@ public final class LogzManager { private LogzManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new MicrosoftLogzBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); + this.clientObject = new MicrosoftLogzBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval).buildClient(); } /** * Creates an instance of logz service API entry point. - * + * * @param credential the credential to use. * @param profile the Azure profile for client. * @return the logz service API instance. @@ -91,7 +89,7 @@ public static LogzManager authenticate(TokenCredential credential, AzureProfile /** * Creates an instance of logz service API entry point. - * + * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. * @return the logz service API instance. @@ -104,14 +102,16 @@ public static LogzManager authenticate(HttpPipeline httpPipeline, AzureProfile p /** * Gets a Configurable instance that can be used to create LogzManager with optional configuration. - * + * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { return new LogzManager.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); @@ -183,8 +183,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. @@ -201,8 +201,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = - Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { throw LOGGER .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); @@ -222,21 +222,12 @@ public LogzManager authenticate(TokenCredential credential, AzureProfile profile Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.logz") - .append("/") - .append("1.0.0-beta.2"); + userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.logz").append("/") + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); + userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)"); } else { userAgentBuilder.append(" (auto-generated)"); } @@ -255,38 +246,25 @@ public LogzManager authenticate(TokenCredential credential, AzureProfile profile policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])).build(); return new LogzManager(httpPipeline, profile, defaultPollInterval); } } /** * Gets the resource collection API of Monitors. It manages LogzMonitorResource. - * + * * @return Resource collection API of Monitors. */ public Monitors monitors() { @@ -298,7 +276,7 @@ public Monitors monitors() { /** * Gets the resource collection API of Operations. - * + * * @return Resource collection API of Operations. */ public Operations operations() { @@ -310,7 +288,7 @@ public Operations operations() { /** * Gets the resource collection API of TagRules. It manages MonitoringTagRules. - * + * * @return Resource collection API of TagRules. */ public TagRules tagRules() { @@ -322,7 +300,7 @@ public TagRules tagRules() { /** * Gets the resource collection API of SingleSignOns. It manages LogzSingleSignOnResource. - * + * * @return Resource collection API of SingleSignOns. */ public SingleSignOns singleSignOns() { @@ -334,7 +312,7 @@ public SingleSignOns singleSignOns() { /** * Gets the resource collection API of SubAccounts. - * + * * @return Resource collection API of SubAccounts. */ public SubAccounts subAccounts() { @@ -346,7 +324,7 @@ public SubAccounts subAccounts() { /** * Gets the resource collection API of SubAccountTagRules. - * + * * @return Resource collection API of SubAccountTagRules. */ public SubAccountTagRules subAccountTagRules() { @@ -358,7 +336,7 @@ public SubAccountTagRules subAccountTagRules() { /** * Gets the resource collection API of MonitorOperations. - * + * * @return Resource collection API of MonitorOperations. */ public MonitorOperations monitorOperations() { @@ -369,8 +347,10 @@ public MonitorOperations monitorOperations() { } /** - * @return Wrapped service client MicrosoftLogz providing direct access to the underlying auto-generated API - * implementation, based on Azure REST API. + * Gets wrapped service client MicrosoftLogz providing direct access to the underlying auto-generated API + * implementation, based on Azure REST API. + * + * @return Wrapped service client MicrosoftLogz. */ public MicrosoftLogz serviceClient() { return this.clientObject; diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MicrosoftLogz.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MicrosoftLogz.java index 393dac27e465..06ed7807d72f 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MicrosoftLogz.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MicrosoftLogz.java @@ -7,88 +7,90 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for MicrosoftLogz class. */ +/** + * The interface for MicrosoftLogz class. + */ public interface MicrosoftLogz { /** * 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(); /** * Gets the SubAccountsClient object to access its operations. - * + * * @return the SubAccountsClient object. */ SubAccountsClient getSubAccounts(); /** * Gets the SubAccountTagRulesClient object to access its operations. - * + * * @return the SubAccountTagRulesClient object. */ SubAccountTagRulesClient getSubAccountTagRules(); /** * Gets the MonitorOperationsClient object to access its operations. - * + * * @return the MonitorOperationsClient object. */ MonitorOperationsClient getMonitorOperations(); diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MonitorOperationsClient.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MonitorOperationsClient.java index 6589d1f3d16e..f6e7e637fbf9 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MonitorOperationsClient.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MonitorOperationsClient.java @@ -13,11 +13,13 @@ import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner; import com.azure.resourcemanager.logz.models.VMHostUpdateRequest; -/** An instance of this class provides access to all the operations defined in MonitorOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in MonitorOperationsClient. + */ public interface MonitorOperationsClient { /** * Returns the payload that needs to be passed in the request body for installing Logz.io 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. @@ -27,12 +29,12 @@ public interface MonitorOperationsClient { * @return response of payload to be passed while installing VM agent along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response vMHostPayloadWithResponse( - String resourceGroupName, String monitorName, Context context); + Response vMHostPayloadWithResponse(String resourceGroupName, String monitorName, + Context context); /** * Returns the payload that needs to be passed in the request body for installing Logz.io 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. @@ -45,7 +47,7 @@ Response vMHostPayloadWithResponse( /** * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -58,7 +60,7 @@ Response vMHostPayloadWithResponse( /** * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Request body to update the collection for agent installed in the given monitor. @@ -69,12 +71,12 @@ Response vMHostPayloadWithResponse( * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listVmHostUpdate( - String resourceGroupName, String monitorName, VMHostUpdateRequest body, Context context); + PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, + VMHostUpdateRequest body, Context context); /** * List the compute resources currently being monitored by the Logz main account 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. @@ -87,7 +89,7 @@ PagedIterable listVmHostUpdate( /** * List the compute resources currently being monitored by the Logz main account 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. diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MonitorsClient.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MonitorsClient.java index 90e132b429f9..6f00e485f1c5 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MonitorsClient.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/MonitorsClient.java @@ -17,11 +17,13 @@ import com.azure.resourcemanager.logz.models.LogzMonitorResourceUpdateParameters; import com.azure.resourcemanager.logz.models.UserRoleRequest; -/** 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 Logz 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. @@ -34,7 +36,7 @@ public interface MonitorsClient { /** * List the resources currently being monitored by the Logz 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. @@ -44,12 +46,12 @@ public interface MonitorsClient { * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listMonitoredResources( - String resourceGroupName, String monitorName, Context context); + PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + Context context); /** * List all monitors under the specified subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of a list operation as paginated response with {@link PagedIterable}. @@ -59,7 +61,7 @@ PagedIterable listMonitoredResources( /** * List all monitors under the specified subscription. - * + * * @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. @@ -71,7 +73,7 @@ PagedIterable listMonitoredResources( /** * List all monitors under the specified 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. @@ -83,7 +85,7 @@ PagedIterable listMonitoredResources( /** * List all monitors under the specified 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. @@ -96,7 +98,7 @@ PagedIterable listMonitoredResources( /** * Get the properties of a specific 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. @@ -106,12 +108,12 @@ PagedIterable listMonitoredResources( * @return the properties of a specific monitor resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String monitorName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String monitorName, + Context context); /** * Get the properties of a specific 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. @@ -124,7 +126,7 @@ Response getByResourceGroupWithResponse( /** * Create a monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @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. @@ -133,12 +135,12 @@ Response getByResourceGroupWithResponse( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LogzMonitorResourceInner> beginCreate( - String resourceGroupName, String monitorName); + SyncPoller, LogzMonitorResourceInner> beginCreate(String resourceGroupName, + String monitorName); /** * Create a monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body The body parameter. @@ -149,12 +151,12 @@ SyncPoller, LogzMonitorResourceInner> begin * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LogzMonitorResourceInner> beginCreate( - String resourceGroupName, String monitorName, LogzMonitorResourceInner body, Context context); + SyncPoller, LogzMonitorResourceInner> beginCreate(String resourceGroupName, + String monitorName, LogzMonitorResourceInner body, Context context); /** * Create a monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @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. @@ -167,7 +169,7 @@ SyncPoller, LogzMonitorResourceInner> begin /** * Create a monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body The body parameter. @@ -178,12 +180,12 @@ SyncPoller, LogzMonitorResourceInner> begin * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - LogzMonitorResourceInner create( - String resourceGroupName, String monitorName, LogzMonitorResourceInner body, Context context); + LogzMonitorResourceInner create(String resourceGroupName, String monitorName, LogzMonitorResourceInner body, + Context context); /** * Update a monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body The parameters for a PATCH request to a monitor resource. @@ -194,12 +196,12 @@ LogzMonitorResourceInner create( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String monitorName, LogzMonitorResourceUpdateParameters body, Context context); + Response updateWithResponse(String resourceGroupName, String monitorName, + LogzMonitorResourceUpdateParameters body, Context context); /** * Update a 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. @@ -212,7 +214,7 @@ Response updateWithResponse( /** * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. - * + * * @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. @@ -225,7 +227,7 @@ Response updateWithResponse( /** * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. - * + * * @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. @@ -239,7 +241,7 @@ Response updateWithResponse( /** * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. - * + * * @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. @@ -251,7 +253,7 @@ Response updateWithResponse( /** * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. - * + * * @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. @@ -264,7 +266,7 @@ Response updateWithResponse( /** * List the user's roles configured on Logz.io side for the account corresponding to the 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. @@ -277,7 +279,7 @@ Response updateWithResponse( /** * List the user's roles configured on Logz.io side for the account corresponding to the monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Request for checking user's role for Logz.io account. @@ -288,6 +290,6 @@ Response updateWithResponse( * @return response for list of user's role for Logz.io account as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listUserRoles( - String resourceGroupName, String monitorName, UserRoleRequest body, Context context); + PagedIterable listUserRoles(String resourceGroupName, String monitorName, + UserRoleRequest body, Context context); } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/OperationsClient.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/OperationsClient.java index d0cbc38d56bf..c27392105fad 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/OperationsClient.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/OperationsClient.java @@ -10,28 +10,30 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.logz.fluent.models.OperationResultInner; -/** 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 all operations provided by Microsoft.Logz. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of GET request to list the Microsoft.Logz operations as paginated response with {@link - * PagedIterable}. + * @return result of GET request to list the Microsoft.Logz operations as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** * List all operations provided by Microsoft.Logz. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of GET request to list the Microsoft.Logz operations as paginated response with {@link - * PagedIterable}. + * @return result of GET request to list the Microsoft.Logz operations as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SingleSignOnsClient.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SingleSignOnsClient.java index 474920886e4a..331052a9ce5e 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SingleSignOnsClient.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SingleSignOnsClient.java @@ -13,11 +13,13 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.logz.fluent.models.LogzSingleSignOnResourceInner; -/** 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 { /** * List the single sign-on configurations for a given 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. @@ -30,7 +32,7 @@ public interface SingleSignOnsClient { /** * List the single sign-on configurations for a given 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. @@ -44,7 +46,7 @@ public interface SingleSignOnsClient { /** * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -54,12 +56,12 @@ public interface SingleSignOnsClient { * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LogzSingleSignOnResourceInner> beginCreateOrUpdate( - String resourceGroupName, String monitorName, String configurationName); + SyncPoller, LogzSingleSignOnResourceInner> + beginCreateOrUpdate(String resourceGroupName, String monitorName, String configurationName); /** * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -72,15 +74,12 @@ SyncPoller, LogzSingleSignOnResourceIn */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, LogzSingleSignOnResourceInner> beginCreateOrUpdate( - String resourceGroupName, - String monitorName, - String configurationName, - LogzSingleSignOnResourceInner body, + String resourceGroupName, String monitorName, String configurationName, LogzSingleSignOnResourceInner body, Context context); /** * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -90,12 +89,12 @@ SyncPoller, LogzSingleSignOnResourceIn * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - LogzSingleSignOnResourceInner createOrUpdate( - String resourceGroupName, String monitorName, String configurationName); + LogzSingleSignOnResourceInner createOrUpdate(String resourceGroupName, String monitorName, + String configurationName); /** * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -107,16 +106,12 @@ LogzSingleSignOnResourceInner createOrUpdate( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - LogzSingleSignOnResourceInner createOrUpdate( - String resourceGroupName, - String monitorName, - String configurationName, - LogzSingleSignOnResourceInner body, - Context context); + LogzSingleSignOnResourceInner createOrUpdate(String resourceGroupName, String monitorName, String configurationName, + LogzSingleSignOnResourceInner body, Context context); /** * Gets the Logz single sign-on resource for the given Monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -127,12 +122,12 @@ LogzSingleSignOnResourceInner createOrUpdate( * @return the Logz single sign-on resource for the given Monitor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String monitorName, String configurationName, Context context); + Response getWithResponse(String resourceGroupName, String monitorName, + String configurationName, Context context); /** * Gets the Logz single sign-on resource for the given Monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SubAccountTagRulesClient.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SubAccountTagRulesClient.java index 266a8ec61c2a..32eabeefff9c 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SubAccountTagRulesClient.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SubAccountTagRulesClient.java @@ -12,11 +12,13 @@ import com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner; import com.azure.resourcemanager.logz.models.SubAccountTagRulesDeleteResponse; -/** An instance of this class provides access to all the operations defined in SubAccountTagRulesClient. */ +/** + * An instance of this class provides access to all the operations defined in SubAccountTagRulesClient. + */ public interface SubAccountTagRulesClient { /** * List the tag rules for a given sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -30,7 +32,7 @@ public interface SubAccountTagRulesClient { /** * List the tag rules for a given sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -41,12 +43,12 @@ public interface SubAccountTagRulesClient { * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String monitorName, String subAccountName, Context context); + PagedIterable list(String resourceGroupName, String monitorName, String subAccountName, + Context context); /** * Create or update a tag rule set for a given sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -59,17 +61,12 @@ PagedIterable list( * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String monitorName, - String subAccountName, - String ruleSetName, - MonitoringTagRulesInner body, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, MonitoringTagRulesInner body, Context context); /** * Create or update a tag rule set for a given sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -80,12 +77,12 @@ Response createOrUpdateWithResponse( * @return capture logs and metrics of Azure resources based on ARM tags. */ @ServiceMethod(returns = ReturnType.SINGLE) - MonitoringTagRulesInner createOrUpdate( - String resourceGroupName, String monitorName, String subAccountName, String ruleSetName); + MonitoringTagRulesInner createOrUpdate(String resourceGroupName, String monitorName, String subAccountName, + String ruleSetName); /** * Get a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -97,12 +94,12 @@ MonitoringTagRulesInner createOrUpdate( * @return a tag rule set for a given monitor resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String monitorName, String subAccountName, String ruleSetName, Context context); + Response getWithResponse(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, Context context); /** * Get a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -113,12 +110,12 @@ Response getWithResponse( * @return a tag rule set for a given monitor resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - MonitoringTagRulesInner get( - String resourceGroupName, String monitorName, String subAccountName, String ruleSetName); + MonitoringTagRulesInner get(String resourceGroupName, String monitorName, String subAccountName, + String ruleSetName); /** * Delete a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -130,12 +127,12 @@ MonitoringTagRulesInner get( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - SubAccountTagRulesDeleteResponse deleteWithResponse( - String resourceGroupName, String monitorName, String subAccountName, String ruleSetName, Context context); + SubAccountTagRulesDeleteResponse deleteWithResponse(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, Context context); /** * Delete a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SubAccountsClient.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SubAccountsClient.java index 472f99c89734..96190415d013 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SubAccountsClient.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/SubAccountsClient.java @@ -18,11 +18,13 @@ import com.azure.resourcemanager.logz.models.LogzMonitorResourceUpdateParameters; import com.azure.resourcemanager.logz.models.VMHostUpdateRequest; -/** An instance of this class provides access to all the operations defined in SubAccountsClient. */ +/** + * An instance of this class provides access to all the operations defined in SubAccountsClient. + */ public interface SubAccountsClient { /** * List the sub account under a given 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. @@ -35,7 +37,7 @@ public interface SubAccountsClient { /** * List the sub account under a given 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. @@ -49,7 +51,7 @@ public interface SubAccountsClient { /** * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -59,12 +61,12 @@ public interface SubAccountsClient { * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LogzMonitorResourceInner> beginCreate( - String resourceGroupName, String monitorName, String subAccountName); + SyncPoller, LogzMonitorResourceInner> beginCreate(String resourceGroupName, + String monitorName, String subAccountName); /** * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -76,16 +78,12 @@ SyncPoller, LogzMonitorResourceInner> begin * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LogzMonitorResourceInner> beginCreate( - String resourceGroupName, - String monitorName, - String subAccountName, - LogzMonitorResourceInner body, - Context context); + SyncPoller, LogzMonitorResourceInner> beginCreate(String resourceGroupName, + String monitorName, String subAccountName, LogzMonitorResourceInner body, Context context); /** * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -99,7 +97,7 @@ SyncPoller, LogzMonitorResourceInner> begin /** * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -111,16 +109,12 @@ SyncPoller, LogzMonitorResourceInner> begin * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - LogzMonitorResourceInner create( - String resourceGroupName, - String monitorName, - String subAccountName, - LogzMonitorResourceInner body, - Context context); + LogzMonitorResourceInner create(String resourceGroupName, String monitorName, String subAccountName, + LogzMonitorResourceInner body, Context context); /** * Get a sub account under a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -131,12 +125,12 @@ LogzMonitorResourceInner create( * @return a sub account under a given monitor resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String monitorName, String subAccountName, Context context); + Response getWithResponse(String resourceGroupName, String monitorName, + String subAccountName, Context context); /** * Get a sub account under a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -150,7 +144,7 @@ Response getWithResponse( /** * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -164,7 +158,7 @@ Response getWithResponse( /** * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -175,12 +169,12 @@ Response getWithResponse( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String monitorName, String subAccountName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, String subAccountName, + Context context); /** * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -193,7 +187,7 @@ SyncPoller, Void> beginDelete( /** * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -207,7 +201,7 @@ SyncPoller, Void> beginDelete( /** * Update a monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -219,16 +213,12 @@ SyncPoller, Void> beginDelete( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String monitorName, - String subAccountName, - LogzMonitorResourceUpdateParameters body, - Context context); + Response updateWithResponse(String resourceGroupName, String monitorName, + String subAccountName, LogzMonitorResourceUpdateParameters body, Context context); /** * Update a monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -242,7 +232,7 @@ Response updateWithResponse( /** * List the resources currently being monitored by the Logz sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -252,12 +242,12 @@ Response updateWithResponse( * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listMonitoredResources( - String resourceGroupName, String monitorName, String subAccountName); + PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + String subAccountName); /** * List the resources currently being monitored by the Logz sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -268,12 +258,12 @@ PagedIterable listMonitoredResources( * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listMonitoredResources( - String resourceGroupName, String monitorName, String subAccountName, Context context); + PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + String subAccountName, Context context); /** * Returns the payload that needs to be passed as a request for installing Logz.io agent on a VM. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -284,12 +274,12 @@ PagedIterable listMonitoredResources( * @return response of payload to be passed while installing VM agent along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response vMHostPayloadWithResponse( - String resourceGroupName, String monitorName, String subAccountName, Context context); + Response vMHostPayloadWithResponse(String resourceGroupName, String monitorName, + String subAccountName, Context context); /** * Returns the payload that needs to be passed as a request for installing Logz.io agent on a VM. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -303,7 +293,7 @@ Response vMHostPayloadWithResponse( /** * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -313,12 +303,12 @@ Response vMHostPayloadWithResponse( * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listVmHostUpdate( - String resourceGroupName, String monitorName, String subAccountName); + PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, + String subAccountName); /** * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -330,12 +320,12 @@ PagedIterable listVmHostUpdate( * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listVmHostUpdate( - String resourceGroupName, String monitorName, String subAccountName, VMHostUpdateRequest body, Context context); + PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, + String subAccountName, VMHostUpdateRequest body, Context context); /** * List the compute resources currently being monitored by the Logz sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -349,7 +339,7 @@ PagedIterable listVmHostUpdate( /** * List the compute resources currently being monitored by the Logz sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -360,6 +350,6 @@ PagedIterable listVmHostUpdate( * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listVMHosts( - String resourceGroupName, String monitorName, String subAccountName, Context context); + PagedIterable listVMHosts(String resourceGroupName, String monitorName, String subAccountName, + Context context); } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/TagRulesClient.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/TagRulesClient.java index 7d85f505f943..ae831bccc9b1 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/TagRulesClient.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/TagRulesClient.java @@ -12,11 +12,13 @@ import com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner; import com.azure.resourcemanager.logz.models.TagRulesDeleteResponse; -/** 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 { /** * List the tag rules for a given 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. @@ -29,7 +31,7 @@ public interface TagRulesClient { /** * List the tag rules for a given 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. @@ -43,7 +45,7 @@ public interface TagRulesClient { /** * Create or update a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -55,16 +57,12 @@ public interface TagRulesClient { * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String monitorName, - String ruleSetName, - MonitoringTagRulesInner body, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + String ruleSetName, MonitoringTagRulesInner body, Context context); /** * Create or update a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -78,7 +76,7 @@ Response createOrUpdateWithResponse( /** * Get a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -89,12 +87,12 @@ Response createOrUpdateWithResponse( * @return a tag rule set for a given monitor resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String monitorName, String ruleSetName, Context context); + Response getWithResponse(String resourceGroupName, String monitorName, String ruleSetName, + Context context); /** * Get a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -108,7 +106,7 @@ Response getWithResponse( /** * Delete a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -119,12 +117,12 @@ Response getWithResponse( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - TagRulesDeleteResponse deleteWithResponse( - String resourceGroupName, String monitorName, String ruleSetName, Context context); + TagRulesDeleteResponse deleteWithResponse(String resourceGroupName, String monitorName, String ruleSetName, + Context context); /** * Delete a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/LogzMonitorResourceInner.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/LogzMonitorResourceInner.java index 82130da884af..07ec8fc51ae4 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/LogzMonitorResourceInner.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/LogzMonitorResourceInner.java @@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The LogzMonitorResource model. */ +/** + * The LogzMonitorResource model. + */ @Fluent public final class LogzMonitorResourceInner extends Resource { /* @@ -33,13 +35,15 @@ public final class LogzMonitorResourceInner extends Resource { @JsonProperty(value = "identity") private IdentityProperties identity; - /** Creates an instance of LogzMonitorResourceInner class. */ + /** + * Creates an instance of LogzMonitorResourceInner class. + */ public LogzMonitorResourceInner() { } /** * Get the systemData property: The system metadata relating to this resource. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -48,7 +52,7 @@ public SystemData systemData() { /** * Get the properties property: Properties specific to the monitor resource. - * + * * @return the properties value. */ public MonitorProperties properties() { @@ -57,7 +61,7 @@ public MonitorProperties properties() { /** * Set the properties property: Properties specific to the monitor resource. - * + * * @param properties the properties value to set. * @return the LogzMonitorResourceInner object itself. */ @@ -68,7 +72,7 @@ public LogzMonitorResourceInner withProperties(MonitorProperties properties) { /** * Get the identity property: The identity property. - * + * * @return the identity value. */ public IdentityProperties identity() { @@ -77,7 +81,7 @@ public IdentityProperties identity() { /** * Set the identity property: The identity property. - * + * * @param identity the identity value to set. * @return the LogzMonitorResourceInner object itself. */ @@ -86,14 +90,18 @@ public LogzMonitorResourceInner withIdentity(IdentityProperties identity) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public LogzMonitorResourceInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public LogzMonitorResourceInner withTags(Map tags) { super.withTags(tags); @@ -102,7 +110,7 @@ public LogzMonitorResourceInner withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/LogzSingleSignOnResourceInner.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/LogzSingleSignOnResourceInner.java index 4a826de2b6c7..3bbdd0df5573 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/LogzSingleSignOnResourceInner.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/LogzSingleSignOnResourceInner.java @@ -10,7 +10,9 @@ import com.azure.resourcemanager.logz.models.LogzSingleSignOnProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** The LogzSingleSignOnResource model. */ +/** + * The LogzSingleSignOnResource model. + */ @Fluent public final class LogzSingleSignOnResourceInner extends ProxyResource { /* @@ -25,13 +27,15 @@ public final class LogzSingleSignOnResourceInner extends ProxyResource { @JsonProperty(value = "properties") private LogzSingleSignOnProperties properties; - /** Creates an instance of LogzSingleSignOnResourceInner class. */ + /** + * Creates an instance of LogzSingleSignOnResourceInner class. + */ public LogzSingleSignOnResourceInner() { } /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -40,7 +44,7 @@ public SystemData systemData() { /** * Get the properties property: The properties property. - * + * * @return the properties value. */ public LogzSingleSignOnProperties properties() { @@ -49,7 +53,7 @@ public LogzSingleSignOnProperties properties() { /** * Set the properties property: The properties property. - * + * * @param properties the properties value to set. * @return the LogzSingleSignOnResourceInner object itself. */ @@ -60,7 +64,7 @@ public LogzSingleSignOnResourceInner withProperties(LogzSingleSignOnProperties p /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/MonitoredResourceInner.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/MonitoredResourceInner.java index 4b56219c5914..029cae327e00 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/MonitoredResourceInner.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/MonitoredResourceInner.java @@ -8,7 +8,9 @@ import com.azure.core.management.SystemData; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of a resource currently being monitored by the Logz monitor resource. */ +/** + * The properties of a resource currently being monitored by the Logz monitor resource. + */ @Fluent public final class MonitoredResourceInner { /* @@ -47,13 +49,15 @@ public final class MonitoredResourceInner { @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() { @@ -62,7 +66,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. */ @@ -73,7 +77,7 @@ public MonitoredResourceInner withId(String id) { /** * Get the sendingMetrics property: Flag indicating if resource is sending metrics to Logz. - * + * * @return the sendingMetrics value. */ public Boolean sendingMetrics() { @@ -82,7 +86,7 @@ public Boolean sendingMetrics() { /** * Set the sendingMetrics property: Flag indicating if resource is sending metrics to Logz. - * + * * @param sendingMetrics the sendingMetrics value to set. * @return the MonitoredResourceInner object itself. */ @@ -94,7 +98,7 @@ public MonitoredResourceInner withSendingMetrics(Boolean sendingMetrics) { /** * 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() { @@ -104,7 +108,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. */ @@ -115,7 +119,7 @@ public MonitoredResourceInner withReasonForMetricsStatus(String reasonForMetrics /** * Get the sendingLogs property: Flag indicating if resource is sending logs to Logz. - * + * * @return the sendingLogs value. */ public Boolean sendingLogs() { @@ -124,7 +128,7 @@ public Boolean sendingLogs() { /** * Set the sendingLogs property: Flag indicating if resource is sending logs to Logz. - * + * * @param sendingLogs the sendingLogs value to set. * @return the MonitoredResourceInner object itself. */ @@ -135,7 +139,7 @@ public MonitoredResourceInner withSendingLogs(Boolean sendingLogs) { /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -144,7 +148,7 @@ public SystemData systemData() { /** * 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() { @@ -153,7 +157,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. */ @@ -164,7 +168,7 @@ public MonitoredResourceInner withReasonForLogsStatus(String reasonForLogsStatus /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/MonitoringTagRulesInner.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/MonitoringTagRulesInner.java index 2f4bfc15b339..1d3bb7f30a8b 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/MonitoringTagRulesInner.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/MonitoringTagRulesInner.java @@ -10,7 +10,9 @@ import com.azure.resourcemanager.logz.models.MonitoringTagRulesProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Capture logs and metrics of Azure resources based on ARM tags. */ +/** + * Capture logs and metrics of Azure resources based on ARM tags. + */ @Fluent public final class MonitoringTagRulesInner extends ProxyResource { /* @@ -25,13 +27,15 @@ public final class MonitoringTagRulesInner extends ProxyResource { @JsonProperty(value = "properties") private MonitoringTagRulesProperties properties; - /** Creates an instance of MonitoringTagRulesInner class. */ + /** + * Creates an instance of MonitoringTagRulesInner class. + */ public MonitoringTagRulesInner() { } /** * Get the systemData property: The system metadata relating to this resource. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -40,7 +44,7 @@ public SystemData systemData() { /** * Get the properties property: Definition of the properties for a TagRules resource. - * + * * @return the properties value. */ public MonitoringTagRulesProperties properties() { @@ -49,7 +53,7 @@ public MonitoringTagRulesProperties properties() { /** * Set the properties property: Definition of the properties for a TagRules resource. - * + * * @param properties the properties value to set. * @return the MonitoringTagRulesInner object itself. */ @@ -60,7 +64,7 @@ public MonitoringTagRulesInner withProperties(MonitoringTagRulesProperties prope /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/OperationResultInner.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/OperationResultInner.java index b5f600bf4c9c..5578f742cab6 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/OperationResultInner.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/OperationResultInner.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.logz.models.OperationDisplay; import com.fasterxml.jackson.annotation.JsonProperty; -/** A Microsoft.Logz REST API operation. */ +/** + * A Microsoft.Logz REST API operation. + */ @Fluent public final class OperationResultInner { /* @@ -35,13 +37,15 @@ public final class OperationResultInner { @JsonProperty(value = "origin") private String origin; - /** Creates an instance of OperationResultInner class. */ + /** + * Creates an instance of OperationResultInner class. + */ public OperationResultInner() { } /** * Get the name property: Operation name, i.e., {provider}/{resource}/{operation}. - * + * * @return the name value. */ public String name() { @@ -50,7 +54,7 @@ public String name() { /** * Set the name property: Operation name, i.e., {provider}/{resource}/{operation}. - * + * * @param name the name value to set. * @return the OperationResultInner object itself. */ @@ -61,7 +65,7 @@ public OperationResultInner withName(String name) { /** * Get the isDataAction property: Indicates whether the operation is a data action. - * + * * @return the isDataAction value. */ public Boolean isDataAction() { @@ -70,7 +74,7 @@ public Boolean isDataAction() { /** * Set the isDataAction property: Indicates whether the operation is a data action. - * + * * @param isDataAction the isDataAction value to set. * @return the OperationResultInner object itself. */ @@ -81,7 +85,7 @@ public OperationResultInner withIsDataAction(Boolean isDataAction) { /** * Get the display property: The object that represents the operation. - * + * * @return the display value. */ public OperationDisplay display() { @@ -90,7 +94,7 @@ public OperationDisplay display() { /** * Set the display property: The object that represents the operation. - * + * * @param display the display value to set. * @return the OperationResultInner object itself. */ @@ -101,7 +105,7 @@ public OperationResultInner withDisplay(OperationDisplay display) { /** * Get the origin property: Origin of the operation. - * + * * @return the origin value. */ public String origin() { @@ -110,7 +114,7 @@ public String origin() { /** * Set the origin property: Origin of the operation. - * + * * @param origin the origin value to set. * @return the OperationResultInner object itself. */ @@ -121,7 +125,7 @@ public OperationResultInner withOrigin(String origin) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/UserRoleResponseInner.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/UserRoleResponseInner.java index b8873cb4ebdd..832e2987bdae 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/UserRoleResponseInner.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/UserRoleResponseInner.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.logz.models.UserRole; import com.fasterxml.jackson.annotation.JsonProperty; -/** Response for checking user's role for Logz.io account. */ +/** + * Response for checking user's role for Logz.io account. + */ @Fluent public final class UserRoleResponseInner { /* @@ -17,13 +19,15 @@ public final class UserRoleResponseInner { @JsonProperty(value = "role") private UserRole role; - /** Creates an instance of UserRoleResponseInner class. */ + /** + * Creates an instance of UserRoleResponseInner class. + */ public UserRoleResponseInner() { } /** * Get the role property: User roles on configured in Logz.io account. - * + * * @return the role value. */ public UserRole role() { @@ -32,7 +36,7 @@ public UserRole role() { /** * Set the role property: User roles on configured in Logz.io account. - * + * * @param role the role value to set. * @return the UserRoleResponseInner object itself. */ @@ -43,7 +47,7 @@ public UserRoleResponseInner withRole(UserRole role) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/VMExtensionPayloadInner.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/VMExtensionPayloadInner.java index 675f6c905bf6..b23faddec08c 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/VMExtensionPayloadInner.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/VMExtensionPayloadInner.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** 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 { /* @@ -22,13 +24,15 @@ public final class VMExtensionPayloadInner { @JsonProperty(value = "region") private String region; - /** Creates an instance of VMExtensionPayloadInner class. */ + /** + * Creates an instance of VMExtensionPayloadInner class. + */ public VMExtensionPayloadInner() { } /** * Get the apiKey property: API Key corresponding to the resource. - * + * * @return the apiKey value. */ public String apiKey() { @@ -37,7 +41,7 @@ public String apiKey() { /** * Set the apiKey property: API Key corresponding to the resource. - * + * * @param apiKey the apiKey value to set. * @return the VMExtensionPayloadInner object itself. */ @@ -48,7 +52,7 @@ public VMExtensionPayloadInner withApiKey(String apiKey) { /** * Get the region property: Logz.io region where the resource has been created. - * + * * @return the region value. */ public String region() { @@ -57,7 +61,7 @@ public String region() { /** * Set the region property: Logz.io region where the resource has been created. - * + * * @param region the region value to set. * @return the VMExtensionPayloadInner object itself. */ @@ -68,7 +72,7 @@ public VMExtensionPayloadInner withRegion(String region) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/VMResourcesInner.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/VMResourcesInner.java index f14e23c0cff0..4e198281f76d 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/VMResourcesInner.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/VMResourcesInner.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** VM Resource Ids. */ +/** + * VM Resource Ids. + */ @Fluent public final class VMResourcesInner { /* @@ -22,13 +24,15 @@ public final class VMResourcesInner { @JsonProperty(value = "agentVersion") private String agentVersion; - /** Creates an instance of VMResourcesInner class. */ + /** + * Creates an instance of VMResourcesInner class. + */ public VMResourcesInner() { } /** * Get the id property: Request of a list vm host update operation. - * + * * @return the id value. */ public String id() { @@ -37,7 +41,7 @@ public String id() { /** * Set the id property: Request of a list vm host update operation. - * + * * @param id the id value to set. * @return the VMResourcesInner object itself. */ @@ -48,7 +52,7 @@ public VMResourcesInner withId(String id) { /** * Get the agentVersion property: Version of the Logz agent installed on the VM. - * + * * @return the agentVersion value. */ public String agentVersion() { @@ -57,7 +61,7 @@ public String agentVersion() { /** * Set the agentVersion property: Version of the Logz agent installed on the VM. - * + * * @param agentVersion the agentVersion value to set. * @return the VMResourcesInner object itself. */ @@ -68,7 +72,7 @@ public VMResourcesInner withAgentVersion(String agentVersion) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/package-info.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/package-info.java index b224bb213068..d3e1ac5930d2 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/models/package-info.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/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 MicrosoftLogz. null. */ +/** + * Package containing the inner data models for MicrosoftLogz. + * null. + */ package com.azure.resourcemanager.logz.fluent.models; diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/package-info.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/package-info.java index 00f933cdfd71..06ec5aa8ae87 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/fluent/package-info.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/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 MicrosoftLogz. null. */ +/** + * Package containing the service clients for MicrosoftLogz. + * null. + */ package com.azure.resourcemanager.logz.fluent; diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/LogzMonitorResourceImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/LogzMonitorResourceImpl.java index 82681b6661e9..3ad679224d4f 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/LogzMonitorResourceImpl.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/LogzMonitorResourceImpl.java @@ -95,20 +95,14 @@ public LogzMonitorResourceImpl withExistingResourceGroup(String resourceGroupNam } public LogzMonitorResource create() { - this.innerObject = - serviceManager - .serviceClient() - .getMonitors() - .create(resourceGroupName, monitorName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getMonitors().create(resourceGroupName, monitorName, + this.innerModel(), Context.NONE); return this; } public LogzMonitorResource create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMonitors() - .create(resourceGroupName, monitorName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getMonitors().create(resourceGroupName, monitorName, + this.innerModel(), context); return this; } @@ -124,27 +118,19 @@ public LogzMonitorResourceImpl update() { } public LogzMonitorResource apply() { - this.innerObject = - serviceManager - .serviceClient() - .getMonitors() - .updateWithResponse(resourceGroupName, monitorName, updateBody, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getMonitors() + .updateWithResponse(resourceGroupName, monitorName, updateBody, Context.NONE).getValue(); return this; } public LogzMonitorResource apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMonitors() - .updateWithResponse(resourceGroupName, monitorName, updateBody, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getMonitors() + .updateWithResponse(resourceGroupName, monitorName, updateBody, context).getValue(); return this; } - LogzMonitorResourceImpl( - LogzMonitorResourceInner innerObject, com.azure.resourcemanager.logz.LogzManager serviceManager) { + LogzMonitorResourceImpl(LogzMonitorResourceInner innerObject, + com.azure.resourcemanager.logz.LogzManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -152,22 +138,14 @@ public LogzMonitorResource apply(Context context) { } public LogzMonitorResource refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getMonitors() - .getByResourceGroupWithResponse(resourceGroupName, monitorName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getMonitors() + .getByResourceGroupWithResponse(resourceGroupName, monitorName, Context.NONE).getValue(); return this; } public LogzMonitorResource refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMonitors() - .getByResourceGroupWithResponse(resourceGroupName, monitorName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getMonitors() + .getByResourceGroupWithResponse(resourceGroupName, monitorName, context).getValue(); return this; } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/LogzSingleSignOnResourceImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/LogzSingleSignOnResourceImpl.java index 5652cd107512..2e87762166a4 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/LogzSingleSignOnResourceImpl.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/LogzSingleSignOnResourceImpl.java @@ -61,20 +61,14 @@ public LogzSingleSignOnResourceImpl withExistingMonitor(String resourceGroupName } public LogzSingleSignOnResource create() { - this.innerObject = - serviceManager - .serviceClient() - .getSingleSignOns() - .createOrUpdate(resourceGroupName, monitorName, configurationName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getSingleSignOns().createOrUpdate(resourceGroupName, + monitorName, configurationName, this.innerModel(), Context.NONE); return this; } public LogzSingleSignOnResource create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getSingleSignOns() - .createOrUpdate(resourceGroupName, monitorName, configurationName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getSingleSignOns().createOrUpdate(resourceGroupName, + monitorName, configurationName, this.innerModel(), context); return this; } @@ -89,25 +83,19 @@ public LogzSingleSignOnResourceImpl update() { } public LogzSingleSignOnResource apply() { - this.innerObject = - serviceManager - .serviceClient() - .getSingleSignOns() - .createOrUpdate(resourceGroupName, monitorName, configurationName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getSingleSignOns().createOrUpdate(resourceGroupName, + monitorName, configurationName, this.innerModel(), Context.NONE); return this; } public LogzSingleSignOnResource apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getSingleSignOns() - .createOrUpdate(resourceGroupName, monitorName, configurationName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getSingleSignOns().createOrUpdate(resourceGroupName, + monitorName, configurationName, this.innerModel(), context); return this; } - LogzSingleSignOnResourceImpl( - LogzSingleSignOnResourceInner innerObject, com.azure.resourcemanager.logz.LogzManager serviceManager) { + LogzSingleSignOnResourceImpl(LogzSingleSignOnResourceInner innerObject, + com.azure.resourcemanager.logz.LogzManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -116,22 +104,14 @@ public LogzSingleSignOnResource apply(Context context) { } public LogzSingleSignOnResource refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getSingleSignOns() - .getWithResponse(resourceGroupName, monitorName, configurationName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getSingleSignOns() + .getWithResponse(resourceGroupName, monitorName, configurationName, Context.NONE).getValue(); return this; } public LogzSingleSignOnResource refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getSingleSignOns() - .getWithResponse(resourceGroupName, monitorName, configurationName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getSingleSignOns() + .getWithResponse(resourceGroupName, monitorName, configurationName, context).getValue(); return this; } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MicrosoftLogzBuilder.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MicrosoftLogzBuilder.java index 7e1ed7f7f44a..04b0bb0be8d6 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MicrosoftLogzBuilder.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MicrosoftLogzBuilder.java @@ -14,8 +14,10 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the MicrosoftLogzImpl type. */ -@ServiceClientBuilder(serviceClients = {MicrosoftLogzImpl.class}) +/** + * A builder for creating a new instance of the MicrosoftLogzImpl type. + */ +@ServiceClientBuilder(serviceClients = { MicrosoftLogzImpl.class }) public final class MicrosoftLogzBuilder { /* * The ID of the target subscription. @@ -24,7 +26,7 @@ public final class MicrosoftLogzBuilder { /** * Sets The ID of the target subscription. - * + * * @param subscriptionId the subscriptionId value. * @return the MicrosoftLogzBuilder. */ @@ -40,7 +42,7 @@ public MicrosoftLogzBuilder subscriptionId(String subscriptionId) { /** * Sets server parameter. - * + * * @param endpoint the endpoint value. * @return the MicrosoftLogzBuilder. */ @@ -56,7 +58,7 @@ public MicrosoftLogzBuilder endpoint(String endpoint) { /** * Sets The environment to connect to. - * + * * @param environment the environment value. * @return the MicrosoftLogzBuilder. */ @@ -72,7 +74,7 @@ public MicrosoftLogzBuilder environment(AzureEnvironment environment) { /** * Sets The HTTP pipeline to send requests through. - * + * * @param pipeline the pipeline value. * @return the MicrosoftLogzBuilder. */ @@ -88,7 +90,7 @@ public MicrosoftLogzBuilder pipeline(HttpPipeline pipeline) { /** * Sets The default poll interval for long-running operation. - * + * * @param defaultPollInterval the defaultPollInterval value. * @return the MicrosoftLogzBuilder. */ @@ -104,7 +106,7 @@ public MicrosoftLogzBuilder defaultPollInterval(Duration defaultPollInterval) { /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the MicrosoftLogzBuilder. */ @@ -115,30 +117,20 @@ public MicrosoftLogzBuilder serializerAdapter(SerializerAdapter serializerAdapte /** * Builds an instance of MicrosoftLogzImpl with the provided parameters. - * + * * @return an instance of MicrosoftLogzImpl. */ public MicrosoftLogzImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = - (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval = - (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = - (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - MicrosoftLogzImpl client = - new MicrosoftLogzImpl( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - subscriptionId, - localEndpoint); + HttpPipeline localPipeline = (pipeline != null) ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + MicrosoftLogzImpl client = new MicrosoftLogzImpl(localPipeline, localSerializerAdapter, + localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MicrosoftLogzImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MicrosoftLogzImpl.java index 8691eaa5aacc..6f9192b7ad2f 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MicrosoftLogzImpl.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MicrosoftLogzImpl.java @@ -39,159 +39,187 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the MicrosoftLogzImpl type. */ +/** + * Initializes a new instance of the MicrosoftLogzImpl type. + */ @ServiceClient(builder = MicrosoftLogzBuilder.class) public final class MicrosoftLogzImpl implements MicrosoftLogz { - /** 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() { return this.singleSignOns; } - /** The SubAccountsClient object to access its operations. */ + /** + * The SubAccountsClient object to access its operations. + */ private final SubAccountsClient subAccounts; /** * Gets the SubAccountsClient object to access its operations. - * + * * @return the SubAccountsClient object. */ public SubAccountsClient getSubAccounts() { return this.subAccounts; } - /** The SubAccountTagRulesClient object to access its operations. */ + /** + * The SubAccountTagRulesClient object to access its operations. + */ private final SubAccountTagRulesClient subAccountTagRules; /** * Gets the SubAccountTagRulesClient object to access its operations. - * + * * @return the SubAccountTagRulesClient object. */ public SubAccountTagRulesClient getSubAccountTagRules() { return this.subAccountTagRules; } - /** The MonitorOperationsClient object to access its operations. */ + /** + * The MonitorOperationsClient object to access its operations. + */ private final MonitorOperationsClient monitorOperations; /** * Gets the MonitorOperationsClient object to access its operations. - * + * * @return the MonitorOperationsClient object. */ public MonitorOperationsClient getMonitorOperations() { @@ -200,7 +228,7 @@ public MonitorOperationsClient getMonitorOperations() { /** * Initializes an instance of MicrosoftLogz 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. @@ -208,13 +236,8 @@ public MonitorOperationsClient getMonitorOperations() { * @param subscriptionId The ID of the target subscription. * @param endpoint server parameter. */ - MicrosoftLogzImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { + MicrosoftLogzImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, + AzureEnvironment environment, String subscriptionId, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; @@ -232,7 +255,7 @@ public MonitorOperationsClient getMonitorOperations() { /** * Gets default client context. - * + * * @return the default client context. */ public Context getContext() { @@ -241,7 +264,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. */ @@ -251,7 +274,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. @@ -261,26 +284,15 @@ public Context mergeContext(Context context) { * @param type of final result. * @return poller flux for poll result and final result. */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); } /** * Gets the final result, or an error, based on last async poll response. - * + * * @param response the last async poll response. * @param type of poll result. * @param type of final result. @@ -293,19 +305,16 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, HttpResponse errorResponse = null; PollResult.Error lroError = response.getValue().getError(); if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); errorMessage = response.getValue().getError().getMessage(); String errorBody = response.getValue().getError().getResponseBody(); if (errorBody != null) { // try to deserialize error body to ManagementError try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class, + SerializerEncoding.JSON); if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorOperationsClientImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorOperationsClientImpl.java index be12da1fc432..373fa959ee8c 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorOperationsClientImpl.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorOperationsClientImpl.java @@ -34,22 +34,28 @@ import com.azure.resourcemanager.logz.models.VMResourcesListResponse; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in MonitorOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in MonitorOperationsClient. + */ public final class MonitorOperationsClientImpl implements MonitorOperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final MonitorOperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final MicrosoftLogzImpl client; /** * Initializes an instance of MonitorOperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ MonitorOperationsClientImpl(MicrosoftLogzImpl client) { - this.service = - RestProxy.create(MonitorOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(MonitorOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -60,98 +66,72 @@ public final class MonitorOperationsClientImpl implements MonitorOperationsClien @Host("{$host}") @ServiceInterface(name = "MicrosoftLogzMonitor") public interface MonitorOperationsService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/vmHostPayload") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/vmHostPayload") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> vMHostPayload( - @HostParam("$host") String endpoint, + Mono> vMHostPayload(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/vmHostUpdate") - @ExpectedResponses({200}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/vmHostUpdate") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listVmHostUpdate( - @HostParam("$host") String endpoint, + Mono> listVmHostUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") VMHostUpdateRequest body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/listVMHosts") - @ExpectedResponses({200}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") VMHostUpdateRequest body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/listVMHosts") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listVMHosts( - @HostParam("$host") String endpoint, + Mono> listVMHosts(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listVmHostUpdateNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listVMHostsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Returns the payload that needs to be passed in the request body for installing Logz.io 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> vMHostPayloadWithResponseAsync( - String resourceGroupName, String monitorName) { + private Mono> vMHostPayloadWithResponseAsync(String resourceGroupName, + String monitorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -162,23 +142,14 @@ private Mono> vMHostPayloadWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .vMHostPayload( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.vMHostPayload(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns the payload that needs to be passed in the request body for installing Logz.io 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. @@ -186,22 +157,18 @@ private Mono> vMHostPayloadWithResponseAsync( * @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> vMHostPayloadWithResponseAsync( - String resourceGroupName, String monitorName, Context context) { + private Mono> vMHostPayloadWithResponseAsync(String resourceGroupName, + String monitorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -212,20 +179,13 @@ private Mono> vMHostPayloadWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .vMHostPayload( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - accept, - context); + return service.vMHostPayload(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, this.client.getApiVersion(), accept, context); } /** * Returns the payload that needs to be passed in the request body for installing Logz.io 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. @@ -241,7 +201,7 @@ private Mono vMHostPayloadAsync(String resourceGroupNam /** * Returns the payload that needs to be passed in the request body for installing Logz.io 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. @@ -251,14 +211,14 @@ private Mono vMHostPayloadAsync(String resourceGroupNam * @return response of payload to be passed while installing VM agent along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response vMHostPayloadWithResponse( - String resourceGroupName, String monitorName, Context context) { + public Response vMHostPayloadWithResponse(String resourceGroupName, String monitorName, + Context context) { return vMHostPayloadWithResponseAsync(resourceGroupName, monitorName, context).block(); } /** * Returns the payload that needs to be passed in the request body for installing Logz.io 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. @@ -273,7 +233,7 @@ public VMExtensionPayloadInner vMHostPayload(String resourceGroupName, String mo /** * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Request body to update the collection for agent installed in the given monitor. @@ -281,22 +241,18 @@ public VMExtensionPayloadInner vMHostPayload(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 response of a list VM Host Update Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVmHostUpdateSinglePageAsync( - String resourceGroupName, String monitorName, VMHostUpdateRequest body) { + private Mono> listVmHostUpdateSinglePageAsync(String resourceGroupName, + String monitorName, VMHostUpdateRequest body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -310,33 +266,16 @@ private Mono> listVmHostUpdateSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listVmHostUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - body, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listVmHostUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), body, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Request body to update the collection for agent installed in the given monitor. @@ -345,22 +284,18 @@ private Mono> listVmHostUpdateSinglePageAsync( * @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 Update Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVmHostUpdateSinglePageAsync( - String resourceGroupName, String monitorName, VMHostUpdateRequest body, Context context) { + private Mono> listVmHostUpdateSinglePageAsync(String resourceGroupName, + String monitorName, VMHostUpdateRequest body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -375,29 +310,15 @@ private Mono> listVmHostUpdateSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listVmHostUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - body, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listVmHostUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, this.client.getApiVersion(), body, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Request body to update the collection for agent installed in the given monitor. @@ -407,16 +328,15 @@ private Mono> listVmHostUpdateSinglePageAsync( * @return response of a list VM Host Update Operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listVmHostUpdateAsync( - String resourceGroupName, String monitorName, VMHostUpdateRequest body) { - return new PagedFlux<>( - () -> listVmHostUpdateSinglePageAsync(resourceGroupName, monitorName, body), + private PagedFlux listVmHostUpdateAsync(String resourceGroupName, String monitorName, + VMHostUpdateRequest body) { + return new PagedFlux<>(() -> listVmHostUpdateSinglePageAsync(resourceGroupName, monitorName, body), nextLink -> listVmHostUpdateNextSinglePageAsync(nextLink)); } /** * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -427,14 +347,13 @@ private PagedFlux listVmHostUpdateAsync( @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listVmHostUpdateAsync(String resourceGroupName, String monitorName) { final VMHostUpdateRequest body = null; - return new PagedFlux<>( - () -> listVmHostUpdateSinglePageAsync(resourceGroupName, monitorName, body), + return new PagedFlux<>(() -> listVmHostUpdateSinglePageAsync(resourceGroupName, monitorName, body), nextLink -> listVmHostUpdateNextSinglePageAsync(nextLink)); } /** * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Request body to update the collection for agent installed in the given monitor. @@ -445,16 +364,15 @@ private PagedFlux listVmHostUpdateAsync(String resourceGroupNa * @return response of a list VM Host Update Operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listVmHostUpdateAsync( - String resourceGroupName, String monitorName, VMHostUpdateRequest body, Context context) { - return new PagedFlux<>( - () -> listVmHostUpdateSinglePageAsync(resourceGroupName, monitorName, body, context), + private PagedFlux listVmHostUpdateAsync(String resourceGroupName, String monitorName, + VMHostUpdateRequest body, Context context) { + return new PagedFlux<>(() -> listVmHostUpdateSinglePageAsync(resourceGroupName, monitorName, body, context), nextLink -> listVmHostUpdateNextSinglePageAsync(nextLink, context)); } /** * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -470,7 +388,7 @@ public PagedIterable listVmHostUpdate(String resourceGroupName /** * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Request body to update the collection for agent installed in the given monitor. @@ -481,36 +399,32 @@ public PagedIterable listVmHostUpdate(String resourceGroupName * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listVmHostUpdate( - String resourceGroupName, String monitorName, VMHostUpdateRequest body, Context context) { + public PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, + VMHostUpdateRequest body, Context context) { return new PagedIterable<>(listVmHostUpdateAsync(resourceGroupName, monitorName, body, context)); } /** * List the compute resources currently being monitored by the Logz main account 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 Update Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVMHostsSinglePageAsync( - String resourceGroupName, String monitorName) { + private Mono> listVMHostsSinglePageAsync(String resourceGroupName, + String monitorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -521,32 +435,16 @@ private Mono> listVMHostsSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listVMHosts( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listVMHosts(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List the compute resources currently being monitored by the Logz main account 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. @@ -554,22 +452,18 @@ private Mono> listVMHostsSinglePageAsync( * @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 Update Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVMHostsSinglePageAsync( - String resourceGroupName, String monitorName, Context context) { + private Mono> listVMHostsSinglePageAsync(String resourceGroupName, + String monitorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -581,28 +475,15 @@ private Mono> listVMHostsSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listVMHosts( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listVMHosts(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List the compute resources currently being monitored by the Logz main account 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. @@ -612,14 +493,13 @@ private Mono> listVMHostsSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listVMHostsAsync(String resourceGroupName, String monitorName) { - return new PagedFlux<>( - () -> listVMHostsSinglePageAsync(resourceGroupName, monitorName), + return new PagedFlux<>(() -> listVMHostsSinglePageAsync(resourceGroupName, monitorName), nextLink -> listVMHostsNextSinglePageAsync(nextLink)); } /** * List the compute resources currently being monitored by the Logz main account 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. @@ -629,16 +509,15 @@ private PagedFlux listVMHostsAsync(String resourceGroupName, S * @return response of a list VM Host Update Operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listVMHostsAsync( - String resourceGroupName, String monitorName, Context context) { - return new PagedFlux<>( - () -> listVMHostsSinglePageAsync(resourceGroupName, monitorName, context), + private PagedFlux listVMHostsAsync(String resourceGroupName, String monitorName, + Context context) { + return new PagedFlux<>(() -> listVMHostsSinglePageAsync(resourceGroupName, monitorName, context), nextLink -> listVMHostsNextSinglePageAsync(nextLink, context)); } /** * List the compute resources currently being monitored by the Logz main account 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. @@ -653,7 +532,7 @@ public PagedIterable listVMHosts(String resourceGroupName, Str /** * List the compute resources currently being monitored by the Logz main account 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. @@ -669,14 +548,15 @@ public PagedIterable listVMHosts(String resourceGroupName, Str /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 Update Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listVmHostUpdateNextSinglePageAsync(String nextLink) { @@ -684,75 +564,58 @@ private Mono> listVmHostUpdateNextSinglePageAsyn return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listVmHostUpdateNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 Update Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVmHostUpdateNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listVmHostUpdateNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listVmHostUpdateNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listVmHostUpdateNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 Update Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listVMHostsNextSinglePageAsync(String nextLink) { @@ -760,37 +623,29 @@ private Mono> listVMHostsNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listVMHostsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 Update Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listVMHostsNextSinglePageAsync(String nextLink, Context context) { @@ -798,23 +653,13 @@ private Mono> listVMHostsNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listVMHostsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listVMHostsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorOperationsImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorOperationsImpl.java index 27e1daad47ad..02800d25fd6a 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorOperationsImpl.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorOperationsImpl.java @@ -24,21 +24,18 @@ public final class MonitorOperationsImpl implements MonitorOperations { private final com.azure.resourcemanager.logz.LogzManager serviceManager; - public MonitorOperationsImpl( - MonitorOperationsClient innerClient, com.azure.resourcemanager.logz.LogzManager serviceManager) { + public MonitorOperationsImpl(MonitorOperationsClient innerClient, + com.azure.resourcemanager.logz.LogzManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response vMHostPayloadWithResponse( - String resourceGroupName, String monitorName, Context context) { - Response inner = - this.serviceClient().vMHostPayloadWithResponse(resourceGroupName, monitorName, context); + public Response vMHostPayloadWithResponse(String resourceGroupName, String monitorName, + Context context) { + Response inner + = this.serviceClient().vMHostPayloadWithResponse(resourceGroupName, monitorName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new VMExtensionPayloadImpl(inner.getValue(), this.manager())); } else { return null; @@ -59,10 +56,10 @@ public PagedIterable listVmHostUpdate(String resourceGroupName, Str return Utils.mapPage(inner, inner1 -> new VMResourcesImpl(inner1, this.manager())); } - public PagedIterable listVmHostUpdate( - String resourceGroupName, String monitorName, VMHostUpdateRequest body, Context context) { - PagedIterable inner = - this.serviceClient().listVmHostUpdate(resourceGroupName, monitorName, body, context); + public PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, + VMHostUpdateRequest body, Context context) { + PagedIterable inner + = this.serviceClient().listVmHostUpdate(resourceGroupName, monitorName, body, context); return Utils.mapPage(inner, inner1 -> new VMResourcesImpl(inner1, this.manager())); } @@ -72,8 +69,8 @@ public PagedIterable listVMHosts(String resourceGroupName, String m } public PagedIterable listVMHosts(String resourceGroupName, String monitorName, Context context) { - PagedIterable inner = - this.serviceClient().listVMHosts(resourceGroupName, monitorName, context); + PagedIterable inner + = this.serviceClient().listVMHosts(resourceGroupName, monitorName, context); return Utils.mapPage(inner, inner1 -> new VMResourcesImpl(inner1, this.manager())); } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitoredResourceImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitoredResourceImpl.java index 7d93209c8e0b..04cc9cf746fa 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitoredResourceImpl.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitoredResourceImpl.java @@ -13,8 +13,8 @@ public final class MonitoredResourceImpl implements MonitoredResource { private final com.azure.resourcemanager.logz.LogzManager serviceManager; - MonitoredResourceImpl( - MonitoredResourceInner innerObject, com.azure.resourcemanager.logz.LogzManager serviceManager) { + MonitoredResourceImpl(MonitoredResourceInner innerObject, + com.azure.resourcemanager.logz.LogzManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitoringTagRulesImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitoringTagRulesImpl.java index c7820bc49c52..8d20df2ea6a0 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitoringTagRulesImpl.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitoringTagRulesImpl.java @@ -61,23 +61,16 @@ public MonitoringTagRulesImpl withExistingMonitor(String resourceGroupName, Stri } public MonitoringTagRules create() { - this.innerObject = - serviceManager - .serviceClient() - .getTagRules() - .createOrUpdateWithResponse( - resourceGroupName, monitorName, ruleSetName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getTagRules() + .createOrUpdateWithResponse(resourceGroupName, monitorName, ruleSetName, this.innerModel(), Context.NONE) + .getValue(); return this; } public MonitoringTagRules create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getTagRules() - .createOrUpdateWithResponse(resourceGroupName, monitorName, ruleSetName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getTagRules() + .createOrUpdateWithResponse(resourceGroupName, monitorName, ruleSetName, this.innerModel(), context) + .getValue(); return this; } @@ -92,28 +85,21 @@ public MonitoringTagRulesImpl update() { } public MonitoringTagRules apply() { - this.innerObject = - serviceManager - .serviceClient() - .getTagRules() - .createOrUpdateWithResponse( - resourceGroupName, monitorName, ruleSetName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getTagRules() + .createOrUpdateWithResponse(resourceGroupName, monitorName, ruleSetName, this.innerModel(), Context.NONE) + .getValue(); return this; } public MonitoringTagRules apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getTagRules() - .createOrUpdateWithResponse(resourceGroupName, monitorName, ruleSetName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getTagRules() + .createOrUpdateWithResponse(resourceGroupName, monitorName, ruleSetName, this.innerModel(), context) + .getValue(); return this; } - MonitoringTagRulesImpl( - MonitoringTagRulesInner innerObject, com.azure.resourcemanager.logz.LogzManager serviceManager) { + MonitoringTagRulesImpl(MonitoringTagRulesInner innerObject, + com.azure.resourcemanager.logz.LogzManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); @@ -122,22 +108,14 @@ public MonitoringTagRules apply(Context context) { } public MonitoringTagRules refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getTagRules() - .getWithResponse(resourceGroupName, monitorName, ruleSetName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getTagRules() + .getWithResponse(resourceGroupName, monitorName, ruleSetName, Context.NONE).getValue(); return this; } public MonitoringTagRules refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getTagRules() - .getWithResponse(resourceGroupName, monitorName, ruleSetName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getTagRules() + .getWithResponse(resourceGroupName, monitorName, ruleSetName, context).getValue(); return this; } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorsClientImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorsClientImpl.java index cf2a999fdfee..a08931448782 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorsClientImpl.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorsClientImpl.java @@ -46,17 +46,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 MicrosoftLogzImpl client; /** * Initializes an instance of MonitorsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ MonitorsClientImpl(MicrosoftLogzImpl client) { @@ -65,172 +71,123 @@ public final class MonitorsClientImpl implements MonitorsClient { } /** - * The interface defining all the services for MicrosoftLogzMonitors to be used by the proxy service to perform REST - * calls. + * The interface defining all the services for MicrosoftLogzMonitors to be used by the proxy service to perform + * REST calls. */ @Host("{$host}") @ServiceInterface(name = "MicrosoftLogzMonitor") public interface MonitorsService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/listMonitoredResources") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/listMonitoredResources") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listMonitoredResources( - @HostParam("$host") String endpoint, + Mono> listMonitoredResources(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Logz/monitors") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}") - @ExpectedResponses({200}) + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}") - @ExpectedResponses({200, 201}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create( - @HostParam("$host") String endpoint, + Mono>> create(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") LogzMonitorResourceInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}") - @ExpectedResponses({200}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") LogzMonitorResourceInner body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, + Mono> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") LogzMonitorResourceUpdateParameters body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}") - @ExpectedResponses({200, 202, 204}) + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/listUserRoles") - @ExpectedResponses({200}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/listUserRoles") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listUserRoles( - @HostParam("$host") String endpoint, + Mono> listUserRoles(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") UserRoleRequest body, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") UserRoleRequest body, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listMonitoredResourcesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listUserRolesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List the resources currently being monitored by the Logz 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. @@ -239,19 +196,15 @@ Mono> listUserRolesNext( * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMonitoredResourcesSinglePageAsync( - String resourceGroupName, String monitorName) { + private Mono> listMonitoredResourcesSinglePageAsync(String resourceGroupName, + String monitorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -263,31 +216,16 @@ private Mono> listMonitoredResourcesSingle final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listMonitoredResources( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listMonitoredResources(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List the resources currently being monitored by the Logz 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. @@ -297,19 +235,15 @@ private Mono> listMonitoredResourcesSingle * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMonitoredResourcesSinglePageAsync( - String resourceGroupName, String monitorName, Context context) { + private Mono> listMonitoredResourcesSinglePageAsync(String resourceGroupName, + String monitorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -321,28 +255,15 @@ private Mono> listMonitoredResourcesSingle final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listMonitoredResources( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listMonitoredResources(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List the resources currently being monitored by the Logz 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. @@ -351,16 +272,15 @@ private Mono> listMonitoredResourcesSingle * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listMonitoredResourcesAsync( - String resourceGroupName, String monitorName) { - return new PagedFlux<>( - () -> listMonitoredResourcesSinglePageAsync(resourceGroupName, monitorName), + private PagedFlux listMonitoredResourcesAsync(String resourceGroupName, + String monitorName) { + return new PagedFlux<>(() -> listMonitoredResourcesSinglePageAsync(resourceGroupName, monitorName), nextLink -> listMonitoredResourcesNextSinglePageAsync(nextLink)); } /** * List the resources currently being monitored by the Logz 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. @@ -370,16 +290,15 @@ private PagedFlux listMonitoredResourcesAsync( * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listMonitoredResourcesAsync( - String resourceGroupName, String monitorName, Context context) { - return new PagedFlux<>( - () -> listMonitoredResourcesSinglePageAsync(resourceGroupName, monitorName, context), + private PagedFlux listMonitoredResourcesAsync(String resourceGroupName, String monitorName, + Context context) { + return new PagedFlux<>(() -> listMonitoredResourcesSinglePageAsync(resourceGroupName, monitorName, context), nextLink -> listMonitoredResourcesNextSinglePageAsync(nextLink, context)); } /** * List the resources currently being monitored by the Logz 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. @@ -394,7 +313,7 @@ public PagedIterable listMonitoredResources(String resou /** * List the resources currently being monitored by the Logz 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. @@ -404,14 +323,14 @@ public PagedIterable listMonitoredResources(String resou * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMonitoredResources( - String resourceGroupName, String monitorName, Context context) { + public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + Context context) { return new PagedIterable<>(listMonitoredResourcesAsync(resourceGroupName, monitorName, context)); } /** * List all monitors under the specified subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. @@ -419,43 +338,25 @@ public PagedIterable listMonitoredResources( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List all monitors under the specified subscription. - * + * * @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. @@ -465,53 +366,38 @@ private Mono> listSinglePageAsync() { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List all monitors under the specified subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * List all monitors under the specified subscription. - * + * * @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. @@ -520,13 +406,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** * List all monitors under the specified subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of a list operation as paginated response with {@link PagedIterable}. @@ -538,7 +424,7 @@ public PagedIterable list() { /** * List all monitors under the specified subscription. - * + * * @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. @@ -552,7 +438,7 @@ public PagedIterable list(Context context) { /** * List all monitors under the specified 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. @@ -562,16 +448,12 @@ public PagedIterable list(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -579,31 +461,16 @@ private Mono> listByResourceGroupSingleP } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List all monitors under the specified 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. @@ -612,19 +479,15 @@ private Mono> listByResourceGroupSingleP * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -633,27 +496,15 @@ private Mono> listByResourceGroupSingleP final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List all monitors under the specified 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. @@ -662,14 +513,13 @@ private Mono> listByResourceGroupSingleP */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * List all monitors under the specified 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. @@ -679,14 +529,13 @@ private PagedFlux listByResourceGroupAsync(String reso */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * List all monitors under the specified 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. @@ -700,7 +549,7 @@ public PagedIterable listByResourceGroup(String resour /** * List all monitors under the specified 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. @@ -715,29 +564,25 @@ public PagedIterable listByResourceGroup(String resour /** * Get the properties of a specific 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 the properties of a specific monitor resource along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String monitorName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String monitorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -749,22 +594,14 @@ private Mono> getByResourceGroupWithResponseA final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - accept, - context)) + context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the properties of a specific 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. @@ -772,22 +609,18 @@ private Mono> getByResourceGroupWithResponseA * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a specific monitor resource along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String monitorName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String monitorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -798,20 +631,13 @@ private Mono> getByResourceGroupWithResponseA } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, this.client.getApiVersion(), accept, context); } /** * Get the properties of a specific 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. @@ -827,7 +653,7 @@ private Mono getByResourceGroupAsync(String resourceGr /** * Get the properties of a specific 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. @@ -837,14 +663,14 @@ private Mono getByResourceGroupAsync(String resourceGr * @return the properties of a specific monitor resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String monitorName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, + String monitorName, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, monitorName, context).block(); } /** * Get the properties of a specific 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. @@ -859,7 +685,7 @@ public LogzMonitorResourceInner getByResourceGroup(String resourceGroupName, Str /** * Create a monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body The body parameter. @@ -869,19 +695,15 @@ public LogzMonitorResourceInner getByResourceGroup(String resourceGroupName, Str * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, String monitorName, LogzMonitorResourceInner body) { + private Mono>> createWithResponseAsync(String resourceGroupName, String monitorName, + LogzMonitorResourceInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -895,24 +717,14 @@ private Mono>> createWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - body, - accept, - context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create a monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body The body parameter. @@ -923,19 +735,15 @@ private Mono>> createWithResponseAsync( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, String monitorName, LogzMonitorResourceInner body, Context context) { + private Mono>> createWithResponseAsync(String resourceGroupName, String monitorName, + LogzMonitorResourceInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -949,21 +757,13 @@ private Mono>> createWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - body, - accept, - context); + return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, this.client.getApiVersion(), body, accept, context); } /** * Create a monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body The body parameter. @@ -973,22 +773,17 @@ private Mono>> createWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LogzMonitorResourceInner> beginCreateAsync( - String resourceGroupName, String monitorName, LogzMonitorResourceInner body) { + private PollerFlux, LogzMonitorResourceInner> + beginCreateAsync(String resourceGroupName, String monitorName, LogzMonitorResourceInner body) { Mono>> mono = createWithResponseAsync(resourceGroupName, monitorName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - LogzMonitorResourceInner.class, - LogzMonitorResourceInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LogzMonitorResourceInner.class, LogzMonitorResourceInner.class, + this.client.getContext()); } /** * Create a monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @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. @@ -997,23 +792,18 @@ private PollerFlux, LogzMonitorResourceInne * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LogzMonitorResourceInner> beginCreateAsync( - String resourceGroupName, String monitorName) { + private PollerFlux, LogzMonitorResourceInner> + beginCreateAsync(String resourceGroupName, String monitorName) { final LogzMonitorResourceInner body = null; Mono>> mono = createWithResponseAsync(resourceGroupName, monitorName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - LogzMonitorResourceInner.class, - LogzMonitorResourceInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LogzMonitorResourceInner.class, LogzMonitorResourceInner.class, + this.client.getContext()); } /** * Create a monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body The body parameter. @@ -1024,23 +814,17 @@ private PollerFlux, LogzMonitorResourceInne * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LogzMonitorResourceInner> beginCreateAsync( - String resourceGroupName, String monitorName, LogzMonitorResourceInner body, Context context) { + private PollerFlux, LogzMonitorResourceInner> + beginCreateAsync(String resourceGroupName, String monitorName, LogzMonitorResourceInner body, Context context) { context = this.client.mergeContext(context); Mono>> mono = createWithResponseAsync(resourceGroupName, monitorName, body, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - LogzMonitorResourceInner.class, - LogzMonitorResourceInner.class, - context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LogzMonitorResourceInner.class, LogzMonitorResourceInner.class, context); } /** * Create a monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @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. @@ -1049,15 +833,15 @@ private PollerFlux, LogzMonitorResourceInne * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LogzMonitorResourceInner> beginCreate( - String resourceGroupName, String monitorName) { + public SyncPoller, LogzMonitorResourceInner> + beginCreate(String resourceGroupName, String monitorName) { final LogzMonitorResourceInner body = null; return this.beginCreateAsync(resourceGroupName, monitorName, body).getSyncPoller(); } /** * Create a monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body The body parameter. @@ -1068,14 +852,14 @@ public SyncPoller, LogzMonitorResourceInner * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LogzMonitorResourceInner> beginCreate( - String resourceGroupName, String monitorName, LogzMonitorResourceInner body, Context context) { + public SyncPoller, LogzMonitorResourceInner> + beginCreate(String resourceGroupName, String monitorName, LogzMonitorResourceInner body, Context context) { return this.beginCreateAsync(resourceGroupName, monitorName, body, context).getSyncPoller(); } /** * Create a monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body The body parameter. @@ -1085,16 +869,15 @@ public SyncPoller, LogzMonitorResourceInner * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String monitorName, LogzMonitorResourceInner body) { - return beginCreateAsync(resourceGroupName, monitorName, body) - .last() + private Mono createAsync(String resourceGroupName, String monitorName, + LogzMonitorResourceInner body) { + return beginCreateAsync(resourceGroupName, monitorName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create a monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @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. @@ -1105,14 +888,13 @@ private Mono createAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync(String resourceGroupName, String monitorName) { final LogzMonitorResourceInner body = null; - return beginCreateAsync(resourceGroupName, monitorName, body) - .last() + return beginCreateAsync(resourceGroupName, monitorName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create a monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body The body parameter. @@ -1123,16 +905,15 @@ private Mono createAsync(String resourceGroupName, Str * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String monitorName, LogzMonitorResourceInner body, Context context) { - return beginCreateAsync(resourceGroupName, monitorName, body, context) - .last() + private Mono createAsync(String resourceGroupName, String monitorName, + LogzMonitorResourceInner body, Context context) { + return beginCreateAsync(resourceGroupName, monitorName, body, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create a monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @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. @@ -1148,7 +929,7 @@ public LogzMonitorResourceInner create(String resourceGroupName, String monitorN /** * Create a monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body The body parameter. @@ -1159,14 +940,14 @@ public LogzMonitorResourceInner create(String resourceGroupName, String monitorN * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LogzMonitorResourceInner create( - String resourceGroupName, String monitorName, LogzMonitorResourceInner body, Context context) { + public LogzMonitorResourceInner create(String resourceGroupName, String monitorName, LogzMonitorResourceInner body, + Context context) { return createAsync(resourceGroupName, monitorName, body, context).block(); } /** * Update a monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body The parameters for a PATCH request to a monitor resource. @@ -1176,19 +957,15 @@ public LogzMonitorResourceInner create( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String monitorName, LogzMonitorResourceUpdateParameters body) { + private Mono> updateWithResponseAsync(String resourceGroupName, + String monitorName, LogzMonitorResourceUpdateParameters body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1202,24 +979,14 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - body, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update a monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body The parameters for a PATCH request to a monitor resource. @@ -1230,19 +997,15 @@ private Mono> updateWithResponseAsync( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String monitorName, LogzMonitorResourceUpdateParameters body, Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, + String monitorName, LogzMonitorResourceUpdateParameters body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1256,21 +1019,13 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - body, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, this.client.getApiVersion(), body, accept, context); } /** * Update a 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. @@ -1287,7 +1042,7 @@ private Mono updateAsync(String resourceGroupName, Str /** * Update a monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body The parameters for a PATCH request to a monitor resource. @@ -1298,14 +1053,14 @@ private Mono updateAsync(String resourceGroupName, Str * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String monitorName, LogzMonitorResourceUpdateParameters body, Context context) { + public Response updateWithResponse(String resourceGroupName, String monitorName, + LogzMonitorResourceUpdateParameters body, Context context) { return updateWithResponseAsync(resourceGroupName, monitorName, body, context).block(); } /** * Update a 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. @@ -1321,7 +1076,7 @@ public LogzMonitorResourceInner update(String resourceGroupName, String monitorN /** * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. - * + * * @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. @@ -1332,16 +1087,12 @@ public LogzMonitorResourceInner update(String resourceGroupName, String monitorN @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String monitorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1352,23 +1103,14 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. - * + * * @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. @@ -1378,19 +1120,15 @@ private Mono>> deleteWithResponseAsync(String resource * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String monitorName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String monitorName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1401,20 +1139,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, this.client.getApiVersion(), accept, context); } /** * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. - * + * * @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. @@ -1425,15 +1156,13 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, monitorName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. - * + * * @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. @@ -1443,18 +1172,17 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String monitorName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, monitorName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. - * + * * @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. @@ -1469,7 +1197,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. - * + * * @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. @@ -1479,14 +1207,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String monitorName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, + Context context) { return this.beginDeleteAsync(resourceGroupName, monitorName, context).getSyncPoller(); } /** * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. - * + * * @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. @@ -1501,7 +1229,7 @@ private Mono deleteAsync(String resourceGroupName, String monitorName) { /** * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. - * + * * @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. @@ -1512,14 +1240,13 @@ private Mono deleteAsync(String resourceGroupName, String monitorName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String monitorName, Context context) { - return beginDeleteAsync(resourceGroupName, monitorName, context) - .last() + return beginDeleteAsync(resourceGroupName, monitorName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. - * + * * @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. @@ -1533,7 +1260,7 @@ public void delete(String resourceGroupName, String monitorName) { /** * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. - * + * * @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. @@ -1548,7 +1275,7 @@ public void delete(String resourceGroupName, String monitorName, Context context /** * List the user's roles configured on Logz.io side for the account corresponding to the monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Request for checking user's role for Logz.io account. @@ -1556,22 +1283,18 @@ public void delete(String resourceGroupName, String monitorName, Context context * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response for list of user's role for Logz.io account along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listUserRolesSinglePageAsync( - String resourceGroupName, String monitorName, UserRoleRequest body) { + private Mono> listUserRolesSinglePageAsync(String resourceGroupName, + String monitorName, UserRoleRequest body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1585,33 +1308,16 @@ private Mono> listUserRolesSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listUserRoles( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - body, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listUserRoles(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), body, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List the user's roles configured on Logz.io side for the account corresponding to the monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Request for checking user's role for Logz.io account. @@ -1620,22 +1326,18 @@ private Mono> listUserRolesSinglePageAsync( * @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 list of user's role for Logz.io account along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listUserRolesSinglePageAsync( - String resourceGroupName, String monitorName, UserRoleRequest body, Context context) { + private Mono> listUserRolesSinglePageAsync(String resourceGroupName, + String monitorName, UserRoleRequest body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1650,29 +1352,15 @@ private Mono> listUserRolesSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listUserRoles( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - body, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listUserRoles(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, + this.client.getApiVersion(), body, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List the user's roles configured on Logz.io side for the account corresponding to the monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Request for checking user's role for Logz.io account. @@ -1682,16 +1370,15 @@ private Mono> listUserRolesSinglePageAsync( * @return response for list of user's role for Logz.io account as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listUserRolesAsync( - String resourceGroupName, String monitorName, UserRoleRequest body) { - return new PagedFlux<>( - () -> listUserRolesSinglePageAsync(resourceGroupName, monitorName, body), + private PagedFlux listUserRolesAsync(String resourceGroupName, String monitorName, + UserRoleRequest body) { + return new PagedFlux<>(() -> listUserRolesSinglePageAsync(resourceGroupName, monitorName, body), nextLink -> listUserRolesNextSinglePageAsync(nextLink)); } /** * List the user's roles configured on Logz.io side for the account corresponding to the 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. @@ -1702,14 +1389,13 @@ private PagedFlux listUserRolesAsync( @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listUserRolesAsync(String resourceGroupName, String monitorName) { final UserRoleRequest body = null; - return new PagedFlux<>( - () -> listUserRolesSinglePageAsync(resourceGroupName, monitorName, body), + return new PagedFlux<>(() -> listUserRolesSinglePageAsync(resourceGroupName, monitorName, body), nextLink -> listUserRolesNextSinglePageAsync(nextLink)); } /** * List the user's roles configured on Logz.io side for the account corresponding to the monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Request for checking user's role for Logz.io account. @@ -1720,16 +1406,15 @@ private PagedFlux listUserRolesAsync(String resourceGroup * @return response for list of user's role for Logz.io account as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listUserRolesAsync( - String resourceGroupName, String monitorName, UserRoleRequest body, Context context) { - return new PagedFlux<>( - () -> listUserRolesSinglePageAsync(resourceGroupName, monitorName, body, context), + private PagedFlux listUserRolesAsync(String resourceGroupName, String monitorName, + UserRoleRequest body, Context context) { + return new PagedFlux<>(() -> listUserRolesSinglePageAsync(resourceGroupName, monitorName, body, context), nextLink -> listUserRolesNextSinglePageAsync(nextLink, context)); } /** * List the user's roles configured on Logz.io side for the account corresponding to the 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. @@ -1745,7 +1430,7 @@ public PagedIterable listUserRoles(String resourceGroupNa /** * List the user's roles configured on Logz.io side for the account corresponding to the monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Request for checking user's role for Logz.io account. @@ -1756,16 +1441,17 @@ public PagedIterable listUserRoles(String resourceGroupNa * @return response for list of user's role for Logz.io account as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listUserRoles( - String resourceGroupName, String monitorName, UserRoleRequest body, Context context) { + public PagedIterable listUserRoles(String resourceGroupName, String monitorName, + UserRoleRequest body, Context context) { return new PagedIterable<>(listUserRolesAsync(resourceGroupName, monitorName, body, context)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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. @@ -1777,32 +1463,24 @@ private Mono> listMonitoredResourcesNextSi return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listMonitoredResourcesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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. @@ -1810,37 +1488,28 @@ private Mono> listMonitoredResourcesNextSi * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMonitoredResourcesNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listMonitoredResourcesNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listMonitoredResourcesNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listMonitoredResourcesNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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. @@ -1852,32 +1521,24 @@ private Mono> listBySubscriptionNextSing return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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. @@ -1885,37 +1546,28 @@ private Mono> listBySubscriptionNextSing * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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. @@ -1927,32 +1579,24 @@ private Mono> listByResourceGroupNextSin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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. @@ -1960,42 +1604,33 @@ private Mono> listByResourceGroupNextSin * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 list of user's role for Logz.io account along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listUserRolesNextSinglePageAsync(String nextLink) { @@ -2003,62 +1638,44 @@ private Mono> listUserRolesNextSinglePageAs return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listUserRolesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 list of user's role for Logz.io account along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listUserRolesNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listUserRolesNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listUserRolesNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listUserRolesNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorsImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorsImpl.java index 4c79b74b738d..d7ba8b634550 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorsImpl.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/MonitorsImpl.java @@ -32,15 +32,15 @@ public MonitorsImpl(MonitorsClient innerClient, com.azure.resourcemanager.logz.L } public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName) { - PagedIterable inner = - this.serviceClient().listMonitoredResources(resourceGroupName, monitorName); + PagedIterable inner + = this.serviceClient().listMonitoredResources(resourceGroupName, monitorName); return Utils.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); + 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())); } @@ -60,20 +60,17 @@ public PagedIterable listByResourceGroup(String resourceGro } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); return Utils.mapPage(inner, inner1 -> new LogzMonitorResourceImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String monitorName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, monitorName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, String monitorName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, monitorName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new LogzMonitorResourceImpl(inner.getValue(), this.manager())); } else { return null; @@ -102,28 +99,23 @@ public PagedIterable listUserRoles(String resourceGroupName, S return Utils.mapPage(inner, inner1 -> new UserRoleResponseImpl(inner1, this.manager())); } - public PagedIterable listUserRoles( - String resourceGroupName, String monitorName, UserRoleRequest body, Context context) { - PagedIterable inner = - this.serviceClient().listUserRoles(resourceGroupName, monitorName, body, context); + public PagedIterable listUserRoles(String resourceGroupName, String monitorName, + UserRoleRequest body, Context context) { + PagedIterable inner + = this.serviceClient().listUserRoles(resourceGroupName, monitorName, body, context); return Utils.mapPage(inner, inner1 -> new UserRoleResponseImpl(inner1, this.manager())); } public LogzMonitorResource getById(String id) { String resourceGroupName = Utils.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))); + 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"); if (monitorName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, monitorName, Context.NONE).getValue(); } @@ -131,18 +123,13 @@ public LogzMonitorResource getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.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))); + 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"); if (monitorName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, monitorName, context); } @@ -150,18 +137,13 @@ public Response getByIdWithResponse(String id, Context cont public void deleteById(String id) { String resourceGroupName = Utils.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))); + 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"); if (monitorName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); } this.delete(resourceGroupName, monitorName, Context.NONE); } @@ -169,18 +151,13 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.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))); + 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"); if (monitorName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); } this.delete(resourceGroupName, monitorName, context); } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/OperationsClientImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/OperationsClientImpl.java index ff6398cd2f45..f3f669a8e578 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/OperationsClientImpl.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/OperationsClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.logz.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 MicrosoftLogzImpl client; /** * Initializes an instance of OperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OperationsClientImpl(MicrosoftLogzImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,95 +62,70 @@ public final class OperationsClientImpl implements OperationsClient { @Host("{$host}") @ServiceInterface(name = "MicrosoftLogzOperati") public interface OperationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.Logz/operations") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * List all operations provided by Microsoft.Logz. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of GET request to list the Microsoft.Logz operations along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List all operations provided by Microsoft.Logz. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of GET request to list the Microsoft.Logz operations along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List all operations provided by Microsoft.Logz. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of GET request to list the Microsoft.Logz operations as paginated response with {@link PagedFlux}. @@ -156,7 +137,7 @@ private PagedFlux listAsync() { /** * List all operations provided by Microsoft.Logz. - * + * * @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. @@ -165,17 +146,17 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List all operations provided by Microsoft.Logz. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of GET request to list the Microsoft.Logz operations as paginated response with {@link - * PagedIterable}. + * @return result of GET request to list the Microsoft.Logz operations as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -184,13 +165,13 @@ public PagedIterable list() { /** * List all operations provided by Microsoft.Logz. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of GET request to list the Microsoft.Logz operations as paginated response with {@link - * PagedIterable}. + * @return result of GET request to list the Microsoft.Logz operations as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -199,14 +180,15 @@ 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. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of GET request to list the Microsoft.Logz operations along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -214,37 +196,28 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of GET request to list the Microsoft.Logz operations 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) { @@ -252,23 +225,13 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SingleSignOnsClientImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SingleSignOnsClientImpl.java index 654fdca2151a..8dc245ef4e4b 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SingleSignOnsClientImpl.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SingleSignOnsClientImpl.java @@ -37,94 +37,80 @@ 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 MicrosoftLogzImpl client; /** * Initializes an instance of SingleSignOnsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SingleSignOnsClientImpl(MicrosoftLogzImpl client) { - this.service = - RestProxy.create(SingleSignOnsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(SingleSignOnsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for MicrosoftLogzSingleSignOns to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for MicrosoftLogzSingleSignOns to be used by the proxy service to + * perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "MicrosoftLogzSingleS") public interface SingleSignOnsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/singleSignOnConfigurations") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/singleSignOnConfigurations") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/singleSignOnConfigurations/{configurationName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/singleSignOnConfigurations/{configurationName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @PathParam("configurationName") String configurationName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") LogzSingleSignOnResourceInner body, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("configurationName") String configurationName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") LogzSingleSignOnResourceInner body, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/singleSignOnConfigurations/{configurationName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/singleSignOnConfigurations/{configurationName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @PathParam("configurationName") String configurationName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("configurationName") String configurationName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List the single sign-on configurations for a given 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. @@ -133,19 +119,15 @@ Mono> listNext( * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String monitorName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String monitorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -156,32 +138,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List the single sign-on configurations for a given 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. @@ -191,19 +157,15 @@ private Mono> listSinglePageAsync( * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String monitorName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String monitorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -215,28 +177,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List the single sign-on configurations for a given 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. @@ -246,13 +195,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String monitorName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, monitorName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * List the single sign-on configurations for a given 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. @@ -262,16 +211,15 @@ private PagedFlux listAsync(String resourceGroupN * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String monitorName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, monitorName, context), + private PagedFlux listAsync(String resourceGroupName, String monitorName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List the single sign-on configurations for a given 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. @@ -286,7 +234,7 @@ public PagedIterable list(String resourceGroupNam /** * List the single sign-on configurations for a given 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. @@ -296,14 +244,14 @@ public PagedIterable list(String resourceGroupNam * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String monitorName, Context context) { + public PagedIterable list(String resourceGroupName, String monitorName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, monitorName, context)); } /** * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -314,19 +262,15 @@ public PagedIterable list( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String monitorName, String configurationName, LogzSingleSignOnResourceInner body) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String monitorName, String configurationName, LogzSingleSignOnResourceInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -344,25 +288,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - configurationName, - this.client.getApiVersion(), - body, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, configurationName, this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -374,23 +307,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String monitorName, - String configurationName, - LogzSingleSignOnResourceInner body, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String monitorName, String configurationName, LogzSingleSignOnResourceInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -408,22 +333,13 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - configurationName, - this.client.getApiVersion(), - body, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, configurationName, this.client.getApiVersion(), body, accept, context); } /** * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -435,26 +351,18 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LogzSingleSignOnResourceInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String monitorName, - String configurationName, + beginCreateOrUpdateAsync(String resourceGroupName, String monitorName, String configurationName, LogzSingleSignOnResourceInner body) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - LogzSingleSignOnResourceInner.class, - LogzSingleSignOnResourceInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LogzSingleSignOnResourceInner.class, LogzSingleSignOnResourceInner.class, + this.client.getContext()); } /** * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -467,21 +375,16 @@ private Mono>> createOrUpdateWithResponseAsync( private PollerFlux, LogzSingleSignOnResourceInner> beginCreateOrUpdateAsync(String resourceGroupName, String monitorName, String configurationName) { final LogzSingleSignOnResourceInner body = null; - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - LogzSingleSignOnResourceInner.class, - LogzSingleSignOnResourceInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LogzSingleSignOnResourceInner.class, LogzSingleSignOnResourceInner.class, + this.client.getContext()); } /** * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -494,28 +397,19 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LogzSingleSignOnResourceInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String monitorName, - String configurationName, - LogzSingleSignOnResourceInner body, - Context context) { + beginCreateOrUpdateAsync(String resourceGroupName, String monitorName, String configurationName, + LogzSingleSignOnResourceInner body, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - LogzSingleSignOnResourceInner.class, - LogzSingleSignOnResourceInner.class, - context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, monitorName, configurationName, body, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LogzSingleSignOnResourceInner.class, LogzSingleSignOnResourceInner.class, + context); } /** * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -525,15 +419,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LogzSingleSignOnResourceInner> beginCreateOrUpdate( - String resourceGroupName, String monitorName, String configurationName) { + public SyncPoller, LogzSingleSignOnResourceInner> + beginCreateOrUpdate(String resourceGroupName, String monitorName, String configurationName) { final LogzSingleSignOnResourceInner body = null; return this.beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, body).getSyncPoller(); } /** * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -546,19 +440,15 @@ public SyncPoller, LogzSingleSignOnRes */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LogzSingleSignOnResourceInner> beginCreateOrUpdate( - String resourceGroupName, - String monitorName, - String configurationName, - LogzSingleSignOnResourceInner body, + String resourceGroupName, String monitorName, String configurationName, LogzSingleSignOnResourceInner body, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, body, context) + return this.beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, body, context) .getSyncPoller(); } /** * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -569,16 +459,15 @@ public SyncPoller, LogzSingleSignOnRes * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String monitorName, String configurationName, LogzSingleSignOnResourceInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, body) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String monitorName, + String configurationName, LogzSingleSignOnResourceInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -588,17 +477,16 @@ private Mono createOrUpdateAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String monitorName, String configurationName) { + private Mono createOrUpdateAsync(String resourceGroupName, String monitorName, + String configurationName) { final LogzSingleSignOnResourceInner body = null; - return beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, body) - .last() + return beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -610,20 +498,15 @@ private Mono createOrUpdateAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String monitorName, - String configurationName, - LogzSingleSignOnResourceInner body, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, body, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String monitorName, + String configurationName, LogzSingleSignOnResourceInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, monitorName, configurationName, body, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -633,15 +516,15 @@ private Mono createOrUpdateAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LogzSingleSignOnResourceInner createOrUpdate( - String resourceGroupName, String monitorName, String configurationName) { + public LogzSingleSignOnResourceInner createOrUpdate(String resourceGroupName, String monitorName, + String configurationName) { final LogzSingleSignOnResourceInner body = null; return createOrUpdateAsync(resourceGroupName, monitorName, configurationName, body).block(); } /** * Configures single-sign-on for this resource. This operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -653,18 +536,14 @@ public LogzSingleSignOnResourceInner createOrUpdate( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LogzSingleSignOnResourceInner createOrUpdate( - String resourceGroupName, - String monitorName, - String configurationName, - LogzSingleSignOnResourceInner body, - Context context) { + public LogzSingleSignOnResourceInner createOrUpdate(String resourceGroupName, String monitorName, + String configurationName, LogzSingleSignOnResourceInner body, Context context) { return createOrUpdateAsync(resourceGroupName, monitorName, configurationName, body, context).block(); } /** * Gets the Logz single sign-on resource for the given Monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -672,22 +551,18 @@ public LogzSingleSignOnResourceInner createOrUpdate( * @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 Logz single sign-on resource for the given Monitor along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String monitorName, String configurationName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String monitorName, String configurationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -702,24 +577,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - configurationName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, configurationName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the Logz single sign-on resource for the given Monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -728,22 +593,18 @@ private Mono> getWithResponseAsync( * @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 Logz single sign-on resource for the given Monitor along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String monitorName, String configurationName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String monitorName, String configurationName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -758,21 +619,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - configurationName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, + configurationName, this.client.getApiVersion(), accept, context); } /** * Gets the Logz single sign-on resource for the given Monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -782,15 +635,15 @@ private Mono> getWithResponseAsync( * @return the Logz single sign-on resource for the given Monitor on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String monitorName, String configurationName) { + private Mono getAsync(String resourceGroupName, String monitorName, + String configurationName) { return getWithResponseAsync(resourceGroupName, monitorName, configurationName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets the Logz single sign-on resource for the given Monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -801,14 +654,14 @@ private Mono getAsync( * @return the Logz single sign-on resource for the given Monitor along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String monitorName, String configurationName, Context context) { + public Response getWithResponse(String resourceGroupName, String monitorName, + String configurationName, Context context) { return getWithResponseAsync(resourceGroupName, monitorName, configurationName, context).block(); } /** * Gets the Logz single sign-on resource for the given Monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -824,9 +677,10 @@ public LogzSingleSignOnResourceInner get(String resourceGroupName, String monito /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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. @@ -838,31 +692,22 @@ private Mono> listNextSinglePageAsy return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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. @@ -870,29 +715,19 @@ private Mono> listNextSinglePageAsy * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SingleSignOnsImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SingleSignOnsImpl.java index f12186fedfa3..7262c5ac3298 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SingleSignOnsImpl.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SingleSignOnsImpl.java @@ -21,8 +21,8 @@ public final class SingleSignOnsImpl implements SingleSignOns { private final com.azure.resourcemanager.logz.LogzManager serviceManager; - public SingleSignOnsImpl( - SingleSignOnsClient innerClient, com.azure.resourcemanager.logz.LogzManager serviceManager) { + public SingleSignOnsImpl(SingleSignOnsClient innerClient, + com.azure.resourcemanager.logz.LogzManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -33,20 +33,17 @@ public PagedIterable list(String resourceGroupName, St } public PagedIterable list(String resourceGroupName, String monitorName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, monitorName, context); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, monitorName, context); return Utils.mapPage(inner, inner1 -> new LogzSingleSignOnResourceImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String monitorName, String configurationName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, monitorName, configurationName, context); + public Response getWithResponse(String resourceGroupName, String monitorName, + String configurationName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, monitorName, configurationName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new LogzSingleSignOnResourceImpl(inner.getValue(), this.manager())); } else { return null; @@ -54,8 +51,8 @@ public Response getWithResponse( } public LogzSingleSignOnResource get(String resourceGroupName, String monitorName, String configurationName) { - LogzSingleSignOnResourceInner inner = - this.serviceClient().get(resourceGroupName, monitorName, configurationName); + LogzSingleSignOnResourceInner inner + = this.serviceClient().get(resourceGroupName, monitorName, configurationName); if (inner != null) { return new LogzSingleSignOnResourceImpl(inner, this.manager()); } else { @@ -66,28 +63,18 @@ public LogzSingleSignOnResource get(String resourceGroupName, String monitorName public LogzSingleSignOnResource getById(String id) { String resourceGroupName = Utils.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))); + 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"); if (monitorName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); } String configurationName = Utils.getValueFromIdByName(id, "singleSignOnConfigurations"); if (configurationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'singleSignOnConfigurations'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'singleSignOnConfigurations'.", id))); } return this.getWithResponse(resourceGroupName, monitorName, configurationName, Context.NONE).getValue(); } @@ -95,28 +82,18 @@ public LogzSingleSignOnResource getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.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))); + 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"); if (monitorName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); } String configurationName = Utils.getValueFromIdByName(id, "singleSignOnConfigurations"); if (configurationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'singleSignOnConfigurations'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'singleSignOnConfigurations'.", id))); } return this.getWithResponse(resourceGroupName, monitorName, configurationName, context); } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountTagRulesClientImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountTagRulesClientImpl.java index 478f84f86d54..d5915e38c4a2 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountTagRulesClientImpl.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountTagRulesClientImpl.java @@ -34,22 +34,28 @@ import com.azure.resourcemanager.logz.models.SubAccountTagRulesDeleteResponse; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SubAccountTagRulesClient. */ +/** + * An instance of this class provides access to all the operations defined in SubAccountTagRulesClient. + */ public final class SubAccountTagRulesClientImpl implements SubAccountTagRulesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SubAccountTagRulesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final MicrosoftLogzImpl client; /** * Initializes an instance of SubAccountTagRulesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SubAccountTagRulesClientImpl(MicrosoftLogzImpl client) { - this.service = - RestProxy.create(SubAccountTagRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(SubAccountTagRulesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -60,88 +66,59 @@ public final class SubAccountTagRulesClientImpl implements SubAccountTagRulesCli @Host("{$host}") @ServiceInterface(name = "MicrosoftLogzSubAcco") public interface SubAccountTagRulesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/accounts/{subAccountName}/tagRules") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}/tagRules") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @PathParam("subAccountName") String subAccountName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/accounts/{subAccountName}/tagRules/{ruleSetName}") - @ExpectedResponses({200}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}/tagRules/{ruleSetName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @PathParam("subAccountName") String subAccountName, - @PathParam("ruleSetName") String ruleSetName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") MonitoringTagRulesInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/accounts/{subAccountName}/tagRules/{ruleSetName}") - @ExpectedResponses({200}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @PathParam("ruleSetName") String ruleSetName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") MonitoringTagRulesInner body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}/tagRules/{ruleSetName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @PathParam("subAccountName") String subAccountName, - @PathParam("ruleSetName") String ruleSetName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/accounts/{subAccountName}/tagRules/{ruleSetName}") - @ExpectedResponses({200, 202, 204}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @PathParam("ruleSetName") String ruleSetName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}/tagRules/{ruleSetName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono delete( - @HostParam("$host") String endpoint, + Mono delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @PathParam("subAccountName") String subAccountName, - @PathParam("ruleSetName") String ruleSetName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @PathParam("ruleSetName") String ruleSetName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List the tag rules for a given sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -151,19 +128,15 @@ Mono> listNext( * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String monitorName, String subAccountName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String monitorName, String subAccountName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -177,33 +150,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, subAccountName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List the tag rules for a given sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -214,19 +170,15 @@ private Mono> listSinglePageAsync( * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String monitorName, String subAccountName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String monitorName, String subAccountName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -241,29 +193,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, + subAccountName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List the tag rules for a given sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -273,16 +211,15 @@ private Mono> listSinglePageAsync( * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String monitorName, String subAccountName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, monitorName, subAccountName), + private PagedFlux listAsync(String resourceGroupName, String monitorName, + String subAccountName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, subAccountName), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List the tag rules for a given sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -293,16 +230,15 @@ private PagedFlux listAsync( * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String monitorName, String subAccountName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, monitorName, subAccountName, context), + private PagedFlux listAsync(String resourceGroupName, String monitorName, + String subAccountName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, subAccountName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List the tag rules for a given sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -312,14 +248,14 @@ private PagedFlux listAsync( * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String monitorName, String subAccountName) { + public PagedIterable list(String resourceGroupName, String monitorName, + String subAccountName) { return new PagedIterable<>(listAsync(resourceGroupName, monitorName, subAccountName)); } /** * List the tag rules for a given sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -330,14 +266,14 @@ public PagedIterable list( * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String monitorName, String subAccountName, Context context) { + public PagedIterable list(String resourceGroupName, String monitorName, + String subAccountName, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, monitorName, subAccountName, context)); } /** * Create or update a tag rule set for a given sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -347,26 +283,18 @@ public PagedIterable list( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String monitorName, - String subAccountName, - String ruleSetName, - MonitoringTagRulesInner body) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String monitorName, String subAccountName, String ruleSetName, MonitoringTagRulesInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -386,26 +314,15 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - ruleSetName, - this.client.getApiVersion(), - body, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, subAccountName, ruleSetName, this.client.getApiVersion(), body, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or update a tag rule set for a given sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -416,27 +333,18 @@ private Mono> createOrUpdateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String monitorName, - String subAccountName, - String ruleSetName, - MonitoringTagRulesInner body, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String monitorName, String subAccountName, String ruleSetName, MonitoringTagRulesInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -456,23 +364,13 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - ruleSetName, - this.client.getApiVersion(), - body, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, subAccountName, ruleSetName, this.client.getApiVersion(), body, accept, context); } /** * Create or update a tag rule set for a given sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -483,8 +381,8 @@ private Mono> createOrUpdateWithResponseAsync( * @return capture logs and metrics of Azure resources based on ARM tags on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String monitorName, String subAccountName, String ruleSetName) { + private Mono createOrUpdateAsync(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName) { final MonitoringTagRulesInner body = null; return createOrUpdateWithResponseAsync(resourceGroupName, monitorName, subAccountName, ruleSetName, body) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -492,7 +390,7 @@ private Mono createOrUpdateAsync( /** * Create or update a tag rule set for a given sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -505,21 +403,15 @@ private Mono createOrUpdateAsync( * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String monitorName, - String subAccountName, - String ruleSetName, - MonitoringTagRulesInner body, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, monitorName, subAccountName, ruleSetName, body, context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, MonitoringTagRulesInner body, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, monitorName, subAccountName, ruleSetName, body, + context).block(); } /** * Create or update a tag rule set for a given sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -530,17 +422,16 @@ public Response createOrUpdateWithResponse( * @return capture logs and metrics of Azure resources based on ARM tags. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MonitoringTagRulesInner createOrUpdate( - String resourceGroupName, String monitorName, String subAccountName, String ruleSetName) { + public MonitoringTagRulesInner createOrUpdate(String resourceGroupName, String monitorName, String subAccountName, + String ruleSetName) { final MonitoringTagRulesInner body = null; - return createOrUpdateWithResponse( - resourceGroupName, monitorName, subAccountName, ruleSetName, body, Context.NONE) - .getValue(); + return createOrUpdateWithResponse(resourceGroupName, monitorName, subAccountName, ruleSetName, body, + Context.NONE).getValue(); } /** * Get a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -549,22 +440,18 @@ public MonitoringTagRulesInner createOrUpdate( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a tag rule set for a given monitor resource along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String monitorName, String subAccountName, String ruleSetName) { + private Mono> getWithResponseAsync(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -582,24 +469,14 @@ private Mono> getWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - ruleSetName, - this.client.getApiVersion(), - accept, - context)) + context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, subAccountName, ruleSetName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -609,22 +486,18 @@ private Mono> getWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a tag rule set for a given monitor resource along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String monitorName, String subAccountName, String ruleSetName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -641,22 +514,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - ruleSetName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, + subAccountName, ruleSetName, this.client.getApiVersion(), accept, context); } /** * Get a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -667,15 +531,15 @@ private Mono> getWithResponseAsync( * @return a tag rule set for a given monitor resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String monitorName, String subAccountName, String ruleSetName) { + private Mono getAsync(String resourceGroupName, String monitorName, String subAccountName, + String ruleSetName) { return getWithResponseAsync(resourceGroupName, monitorName, subAccountName, ruleSetName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -687,14 +551,14 @@ private Mono getAsync( * @return a tag rule set for a given monitor resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String monitorName, String subAccountName, String ruleSetName, Context context) { + public Response getWithResponse(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, Context context) { return getWithResponseAsync(resourceGroupName, monitorName, subAccountName, ruleSetName, context).block(); } /** * Get a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -705,14 +569,14 @@ public Response getWithResponse( * @return a tag rule set for a given monitor resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MonitoringTagRulesInner get( - String resourceGroupName, String monitorName, String subAccountName, String ruleSetName) { + public MonitoringTagRulesInner get(String resourceGroupName, String monitorName, String subAccountName, + String ruleSetName) { return getWithResponse(resourceGroupName, monitorName, subAccountName, ruleSetName, Context.NONE).getValue(); } /** * Delete a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -723,19 +587,15 @@ public MonitoringTagRulesInner get( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteWithResponseAsync( - String resourceGroupName, String monitorName, String subAccountName, String ruleSetName) { + private Mono deleteWithResponseAsync(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -753,24 +613,14 @@ private Mono deleteWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - ruleSetName, - this.client.getApiVersion(), - accept, - context)) + context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, subAccountName, ruleSetName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -782,19 +632,15 @@ private Mono deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteWithResponseAsync( - String resourceGroupName, String monitorName, String subAccountName, String ruleSetName, Context context) { + private Mono deleteWithResponseAsync(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -811,22 +657,13 @@ private Mono deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - ruleSetName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, subAccountName, ruleSetName, this.client.getApiVersion(), accept, context); } /** * Delete a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -837,15 +674,15 @@ private Mono deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String monitorName, String subAccountName, String ruleSetName) { + private Mono deleteAsync(String resourceGroupName, String monitorName, String subAccountName, + String ruleSetName) { return deleteWithResponseAsync(resourceGroupName, monitorName, subAccountName, ruleSetName) .flatMap(ignored -> Mono.empty()); } /** * Delete a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -857,14 +694,14 @@ private Mono deleteAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SubAccountTagRulesDeleteResponse deleteWithResponse( - String resourceGroupName, String monitorName, String subAccountName, String ruleSetName, Context context) { + public SubAccountTagRulesDeleteResponse deleteWithResponse(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, Context context) { return deleteWithResponseAsync(resourceGroupName, monitorName, subAccountName, ruleSetName, context).block(); } /** * Delete a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -880,9 +717,10 @@ public void delete(String resourceGroupName, String monitorName, String subAccou /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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. @@ -894,31 +732,22 @@ private Mono> listNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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. @@ -931,23 +760,13 @@ private Mono> listNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountTagRulesImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountTagRulesImpl.java index 66902846c09d..d898587fe02b 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountTagRulesImpl.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountTagRulesImpl.java @@ -22,51 +22,41 @@ public final class SubAccountTagRulesImpl implements SubAccountTagRules { private final com.azure.resourcemanager.logz.LogzManager serviceManager; - public SubAccountTagRulesImpl( - SubAccountTagRulesClient innerClient, com.azure.resourcemanager.logz.LogzManager serviceManager) { + public SubAccountTagRulesImpl(SubAccountTagRulesClient innerClient, + com.azure.resourcemanager.logz.LogzManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceGroupName, String monitorName, String subAccountName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, monitorName, subAccountName); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, monitorName, subAccountName); return Utils.mapPage(inner, inner1 -> new MonitoringTagRulesImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String monitorName, String subAccountName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, monitorName, subAccountName, context); + public PagedIterable list(String resourceGroupName, String monitorName, String subAccountName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, monitorName, subAccountName, context); return Utils.mapPage(inner, inner1 -> new MonitoringTagRulesImpl(inner1, this.manager())); } - public Response createOrUpdateWithResponse( - String resourceGroupName, - String monitorName, - String subAccountName, - String ruleSetName, - MonitoringTagRulesInner body, - Context context) { - Response inner = - this - .serviceClient() - .createOrUpdateWithResponse(resourceGroupName, monitorName, subAccountName, ruleSetName, body, context); + public Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, MonitoringTagRulesInner body, Context context) { + Response inner = this.serviceClient().createOrUpdateWithResponse(resourceGroupName, + monitorName, subAccountName, ruleSetName, body, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new MonitoringTagRulesImpl(inner.getValue(), this.manager())); } else { return null; } } - public MonitoringTagRules createOrUpdate( - String resourceGroupName, String monitorName, String subAccountName, String ruleSetName) { - MonitoringTagRulesInner inner = - this.serviceClient().createOrUpdate(resourceGroupName, monitorName, subAccountName, ruleSetName); + public MonitoringTagRules createOrUpdate(String resourceGroupName, String monitorName, String subAccountName, + String ruleSetName) { + MonitoringTagRulesInner inner + = this.serviceClient().createOrUpdate(resourceGroupName, monitorName, subAccountName, ruleSetName); if (inner != null) { return new MonitoringTagRulesImpl(inner, this.manager()); } else { @@ -74,25 +64,22 @@ public MonitoringTagRules createOrUpdate( } } - public Response getWithResponse( - String resourceGroupName, String monitorName, String subAccountName, String ruleSetName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, monitorName, subAccountName, ruleSetName, context); + public Response getWithResponse(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, monitorName, + subAccountName, ruleSetName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new MonitoringTagRulesImpl(inner.getValue(), this.manager())); } else { return null; } } - public MonitoringTagRules get( - String resourceGroupName, String monitorName, String subAccountName, String ruleSetName) { - MonitoringTagRulesInner inner = - this.serviceClient().get(resourceGroupName, monitorName, subAccountName, ruleSetName); + public MonitoringTagRules get(String resourceGroupName, String monitorName, String subAccountName, + String ruleSetName) { + MonitoringTagRulesInner inner + = this.serviceClient().get(resourceGroupName, monitorName, subAccountName, ruleSetName); if (inner != null) { return new MonitoringTagRulesImpl(inner, this.manager()); } else { @@ -100,11 +87,10 @@ public MonitoringTagRules get( } } - public SubAccountTagRulesDeleteResponse deleteWithResponse( - String resourceGroupName, String monitorName, String subAccountName, String ruleSetName, Context context) { - return this - .serviceClient() - .deleteWithResponse(resourceGroupName, monitorName, subAccountName, ruleSetName, context); + public SubAccountTagRulesDeleteResponse deleteWithResponse(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, monitorName, subAccountName, ruleSetName, + context); } public void delete(String resourceGroupName, String monitorName, String subAccountName, String ruleSetName) { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountsClientImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountsClientImpl.java index dbff0cf9ee4f..237d3719453e 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountsClientImpl.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountsClientImpl.java @@ -47,22 +47,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in SubAccountsClient. */ +/** + * An instance of this class provides access to all the operations defined in SubAccountsClient. + */ public final class SubAccountsClientImpl implements SubAccountsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SubAccountsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final MicrosoftLogzImpl client; /** * Initializes an instance of SubAccountsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SubAccountsClientImpl(MicrosoftLogzImpl client) { - this.service = - RestProxy.create(SubAccountsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(SubAccountsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -73,196 +79,134 @@ public final class SubAccountsClientImpl implements SubAccountsClient { @Host("{$host}") @ServiceInterface(name = "MicrosoftLogzSubAcco") public interface SubAccountsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/accounts") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/accounts/{subAccountName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create( - @HostParam("$host") String endpoint, + Mono>> create(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @PathParam("subAccountName") String subAccountName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") LogzMonitorResourceInner body, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") LogzMonitorResourceInner body, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/accounts/{subAccountName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @PathParam("subAccountName") String subAccountName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/accounts/{subAccountName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @PathParam("subAccountName") String subAccountName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/accounts/{subAccountName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, + Mono> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @PathParam("subAccountName") String subAccountName, - @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") LogzMonitorResourceUpdateParameters body, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/accounts/{subAccountName}/listMonitoredResources") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}/listMonitoredResources") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listMonitoredResources( - @HostParam("$host") String endpoint, + Mono> listMonitoredResources(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @PathParam("subAccountName") String subAccountName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/accounts/{subAccountName}/vmHostPayload") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}/vmHostPayload") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> vMHostPayload( - @HostParam("$host") String endpoint, + Mono> vMHostPayload(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @PathParam("subAccountName") String subAccountName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/accounts/{subAccountName}/vmHostUpdate") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}/vmHostUpdate") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listVmHostUpdate( - @HostParam("$host") String endpoint, + Mono> listVmHostUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @PathParam("subAccountName") String subAccountName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") VMHostUpdateRequest body, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") VMHostUpdateRequest body, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/accounts/{subAccountName}/listVMHosts") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/accounts/{subAccountName}/listVMHosts") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listVMHosts( - @HostParam("$host") String endpoint, + Mono> listVMHosts(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @PathParam("subAccountName") String subAccountName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("subAccountName") String subAccountName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listMonitoredResourcesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listVmHostUpdateNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listVMHostsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List the sub account under a given 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. @@ -271,19 +215,15 @@ Mono> listVMHostsNext( * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String monitorName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String monitorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -294,32 +234,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List the sub account under a given 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. @@ -329,19 +253,15 @@ private Mono> listSinglePageAsync( * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String monitorName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String monitorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -353,28 +273,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List the sub account under a given 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. @@ -384,13 +291,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String monitorName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, monitorName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * List the sub account under a given 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. @@ -400,16 +307,15 @@ private PagedFlux listAsync(String resourceGroupName, * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String monitorName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, monitorName, context), + private PagedFlux listAsync(String resourceGroupName, String monitorName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List the sub account under a given 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. @@ -424,7 +330,7 @@ public PagedIterable list(String resourceGroupName, St /** * List the sub account under a given 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. @@ -440,7 +346,7 @@ public PagedIterable list(String resourceGroupName, St /** * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -451,19 +357,15 @@ public PagedIterable list(String resourceGroupName, St * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, String monitorName, String subAccountName, LogzMonitorResourceInner body) { + private Mono>> createWithResponseAsync(String resourceGroupName, String monitorName, + String subAccountName, LogzMonitorResourceInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -480,25 +382,14 @@ private Mono>> createWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - this.client.getApiVersion(), - body, - accept, - context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, subAccountName, this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -510,23 +401,15 @@ private Mono>> createWithResponseAsync( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, - String monitorName, - String subAccountName, - LogzMonitorResourceInner body, - Context context) { + private Mono>> createWithResponseAsync(String resourceGroupName, String monitorName, + String subAccountName, LogzMonitorResourceInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -543,22 +426,13 @@ private Mono>> createWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - this.client.getApiVersion(), - body, - accept, - context); + return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, subAccountName, this.client.getApiVersion(), body, accept, context); } /** * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -571,21 +445,16 @@ private Mono>> createWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LogzMonitorResourceInner> beginCreateAsync( String resourceGroupName, String monitorName, String subAccountName, LogzMonitorResourceInner body) { - Mono>> mono = - createWithResponseAsync(resourceGroupName, monitorName, subAccountName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - LogzMonitorResourceInner.class, - LogzMonitorResourceInner.class, - this.client.getContext()); + Mono>> mono + = createWithResponseAsync(resourceGroupName, monitorName, subAccountName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LogzMonitorResourceInner.class, LogzMonitorResourceInner.class, + this.client.getContext()); } /** * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -595,24 +464,19 @@ private PollerFlux, LogzMonitorResourceInne * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LogzMonitorResourceInner> beginCreateAsync( - String resourceGroupName, String monitorName, String subAccountName) { + private PollerFlux, LogzMonitorResourceInner> + beginCreateAsync(String resourceGroupName, String monitorName, String subAccountName) { final LogzMonitorResourceInner body = null; - Mono>> mono = - createWithResponseAsync(resourceGroupName, monitorName, subAccountName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - LogzMonitorResourceInner.class, - LogzMonitorResourceInner.class, - this.client.getContext()); + Mono>> mono + = createWithResponseAsync(resourceGroupName, monitorName, subAccountName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LogzMonitorResourceInner.class, LogzMonitorResourceInner.class, + this.client.getContext()); } /** * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -625,27 +489,18 @@ private PollerFlux, LogzMonitorResourceInne */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, LogzMonitorResourceInner> beginCreateAsync( - String resourceGroupName, - String monitorName, - String subAccountName, - LogzMonitorResourceInner body, + String resourceGroupName, String monitorName, String subAccountName, LogzMonitorResourceInner body, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createWithResponseAsync(resourceGroupName, monitorName, subAccountName, body, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - LogzMonitorResourceInner.class, - LogzMonitorResourceInner.class, - context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, monitorName, subAccountName, body, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LogzMonitorResourceInner.class, LogzMonitorResourceInner.class, context); } /** * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -655,15 +510,15 @@ private PollerFlux, LogzMonitorResourceInne * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LogzMonitorResourceInner> beginCreate( - String resourceGroupName, String monitorName, String subAccountName) { + public SyncPoller, LogzMonitorResourceInner> + beginCreate(String resourceGroupName, String monitorName, String subAccountName) { final LogzMonitorResourceInner body = null; return this.beginCreateAsync(resourceGroupName, monitorName, subAccountName, body).getSyncPoller(); } /** * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -676,17 +531,14 @@ public SyncPoller, LogzMonitorResourceInner */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LogzMonitorResourceInner> beginCreate( - String resourceGroupName, - String monitorName, - String subAccountName, - LogzMonitorResourceInner body, + String resourceGroupName, String monitorName, String subAccountName, LogzMonitorResourceInner body, Context context) { return this.beginCreateAsync(resourceGroupName, monitorName, subAccountName, body, context).getSyncPoller(); } /** * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -697,16 +549,15 @@ public SyncPoller, LogzMonitorResourceInner * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String monitorName, String subAccountName, LogzMonitorResourceInner body) { - return beginCreateAsync(resourceGroupName, monitorName, subAccountName, body) - .last() + private Mono createAsync(String resourceGroupName, String monitorName, + String subAccountName, LogzMonitorResourceInner body) { + return beginCreateAsync(resourceGroupName, monitorName, subAccountName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -716,17 +567,16 @@ private Mono createAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String monitorName, String subAccountName) { + private Mono createAsync(String resourceGroupName, String monitorName, + String subAccountName) { final LogzMonitorResourceInner body = null; - return beginCreateAsync(resourceGroupName, monitorName, subAccountName, body) - .last() + return beginCreateAsync(resourceGroupName, monitorName, subAccountName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -738,20 +588,15 @@ private Mono createAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, - String monitorName, - String subAccountName, - LogzMonitorResourceInner body, - Context context) { - return beginCreateAsync(resourceGroupName, monitorName, subAccountName, body, context) - .last() + private Mono createAsync(String resourceGroupName, String monitorName, + String subAccountName, LogzMonitorResourceInner body, Context context) { + return beginCreateAsync(resourceGroupName, monitorName, subAccountName, body, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -768,7 +613,7 @@ public LogzMonitorResourceInner create(String resourceGroupName, String monitorN /** * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -780,18 +625,14 @@ public LogzMonitorResourceInner create(String resourceGroupName, String monitorN * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LogzMonitorResourceInner create( - String resourceGroupName, - String monitorName, - String subAccountName, - LogzMonitorResourceInner body, - Context context) { + public LogzMonitorResourceInner create(String resourceGroupName, String monitorName, String subAccountName, + LogzMonitorResourceInner body, Context context) { return createAsync(resourceGroupName, monitorName, subAccountName, body, context).block(); } /** * Get a sub account under a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -799,22 +640,18 @@ public LogzMonitorResourceInner create( * @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 sub account under a given monitor resource along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String monitorName, String subAccountName) { + private Mono> getWithResponseAsync(String resourceGroupName, String monitorName, + String subAccountName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -828,24 +665,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, subAccountName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a sub account under a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -854,22 +681,18 @@ private Mono> getWithResponseAsync( * @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 sub account under a given monitor resource along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String monitorName, String subAccountName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String monitorName, + String subAccountName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -883,21 +706,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, + subAccountName, this.client.getApiVersion(), accept, context); } /** * Get a sub account under a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -907,15 +722,15 @@ private Mono> getWithResponseAsync( * @return a sub account under a given monitor resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String monitorName, String subAccountName) { + private Mono getAsync(String resourceGroupName, String monitorName, + String subAccountName) { return getWithResponseAsync(resourceGroupName, monitorName, subAccountName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a sub account under a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -926,14 +741,14 @@ private Mono getAsync( * @return a sub account under a given monitor resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String monitorName, String subAccountName, Context context) { + public Response getWithResponse(String resourceGroupName, String monitorName, + String subAccountName, Context context) { return getWithResponseAsync(resourceGroupName, monitorName, subAccountName, context).block(); } /** * Get a sub account under a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -949,7 +764,7 @@ public LogzMonitorResourceInner get(String resourceGroupName, String monitorName /** * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -959,19 +774,15 @@ public LogzMonitorResourceInner get(String resourceGroupName, String monitorName * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String monitorName, String subAccountName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String monitorName, + String subAccountName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -985,24 +796,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, subAccountName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1013,19 +814,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String monitorName, String subAccountName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String monitorName, + String subAccountName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1039,21 +836,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, subAccountName, this.client.getApiVersion(), accept, context); } /** * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1063,18 +852,16 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String monitorName, String subAccountName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName, + String subAccountName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, monitorName, subAccountName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1085,19 +872,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String monitorName, String subAccountName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String monitorName, + String subAccountName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, monitorName, subAccountName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, monitorName, subAccountName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1107,14 +893,14 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String monitorName, String subAccountName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, + String subAccountName) { return this.beginDeleteAsync(resourceGroupName, monitorName, subAccountName).getSyncPoller(); } /** * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1125,14 +911,14 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String monitorName, String subAccountName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String monitorName, + String subAccountName, Context context) { return this.beginDeleteAsync(resourceGroupName, monitorName, subAccountName, context).getSyncPoller(); } /** * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1143,14 +929,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String monitorName, String subAccountName) { - return beginDeleteAsync(resourceGroupName, monitorName, subAccountName) - .last() + return beginDeleteAsync(resourceGroupName, monitorName, subAccountName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1161,16 +946,15 @@ private Mono deleteAsync(String resourceGroupName, String monitorName, Str * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String monitorName, String subAccountName, Context context) { - return beginDeleteAsync(resourceGroupName, monitorName, subAccountName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String monitorName, String subAccountName, + Context context) { + return beginDeleteAsync(resourceGroupName, monitorName, subAccountName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1185,7 +969,7 @@ public void delete(String resourceGroupName, String monitorName, String subAccou /** * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1201,7 +985,7 @@ public void delete(String resourceGroupName, String monitorName, String subAccou /** * Update a monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1212,19 +996,15 @@ public void delete(String resourceGroupName, String monitorName, String subAccou * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String monitorName, String subAccountName, LogzMonitorResourceUpdateParameters body) { + private Mono> updateWithResponseAsync(String resourceGroupName, + String monitorName, String subAccountName, LogzMonitorResourceUpdateParameters body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1241,25 +1021,14 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - this.client.getApiVersion(), - body, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, subAccountName, this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update a monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1271,23 +1040,15 @@ private Mono> updateWithResponseAsync( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String monitorName, - String subAccountName, - LogzMonitorResourceUpdateParameters body, - Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, + String monitorName, String subAccountName, LogzMonitorResourceUpdateParameters body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1304,22 +1065,13 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - this.client.getApiVersion(), - body, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, subAccountName, this.client.getApiVersion(), body, accept, context); } /** * Update a monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1329,8 +1081,8 @@ private Mono> updateWithResponseAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String monitorName, String subAccountName) { + private Mono updateAsync(String resourceGroupName, String monitorName, + String subAccountName) { final LogzMonitorResourceUpdateParameters body = null; return updateWithResponseAsync(resourceGroupName, monitorName, subAccountName, body) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -1338,7 +1090,7 @@ private Mono updateAsync( /** * Update a monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1350,18 +1102,14 @@ private Mono updateAsync( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String monitorName, - String subAccountName, - LogzMonitorResourceUpdateParameters body, - Context context) { + public Response updateWithResponse(String resourceGroupName, String monitorName, + String subAccountName, LogzMonitorResourceUpdateParameters body, Context context) { return updateWithResponseAsync(resourceGroupName, monitorName, subAccountName, body, context).block(); } /** * Update a monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1378,7 +1126,7 @@ public LogzMonitorResourceInner update(String resourceGroupName, String monitorN /** * List the resources currently being monitored by the Logz sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1388,19 +1136,15 @@ public LogzMonitorResourceInner update(String resourceGroupName, String monitorN * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMonitoredResourcesSinglePageAsync( - String resourceGroupName, String monitorName, String subAccountName) { + private Mono> listMonitoredResourcesSinglePageAsync(String resourceGroupName, + String monitorName, String subAccountName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1415,32 +1159,16 @@ private Mono> listMonitoredResourcesSingle final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listMonitoredResources( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listMonitoredResources(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, subAccountName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List the resources currently being monitored by the Logz sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1451,19 +1179,15 @@ private Mono> listMonitoredResourcesSingle * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMonitoredResourcesSinglePageAsync( - String resourceGroupName, String monitorName, String subAccountName, Context context) { + private Mono> listMonitoredResourcesSinglePageAsync(String resourceGroupName, + String monitorName, String subAccountName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1478,29 +1202,15 @@ private Mono> listMonitoredResourcesSingle final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listMonitoredResources( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listMonitoredResources(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, subAccountName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List the resources currently being monitored by the Logz sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1510,8 +1220,8 @@ private Mono> listMonitoredResourcesSingle * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listMonitoredResourcesAsync( - String resourceGroupName, String monitorName, String subAccountName) { + private PagedFlux listMonitoredResourcesAsync(String resourceGroupName, String monitorName, + String subAccountName) { return new PagedFlux<>( () -> listMonitoredResourcesSinglePageAsync(resourceGroupName, monitorName, subAccountName), nextLink -> listMonitoredResourcesNextSinglePageAsync(nextLink)); @@ -1519,7 +1229,7 @@ private PagedFlux listMonitoredResourcesAsync( /** * List the resources currently being monitored by the Logz sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1530,8 +1240,8 @@ private PagedFlux listMonitoredResourcesAsync( * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listMonitoredResourcesAsync( - String resourceGroupName, String monitorName, String subAccountName, Context context) { + private PagedFlux listMonitoredResourcesAsync(String resourceGroupName, String monitorName, + String subAccountName, Context context) { return new PagedFlux<>( () -> listMonitoredResourcesSinglePageAsync(resourceGroupName, monitorName, subAccountName, context), nextLink -> listMonitoredResourcesNextSinglePageAsync(nextLink, context)); @@ -1539,7 +1249,7 @@ private PagedFlux listMonitoredResourcesAsync( /** * List the resources currently being monitored by the Logz sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1549,14 +1259,14 @@ private PagedFlux listMonitoredResourcesAsync( * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMonitoredResources( - String resourceGroupName, String monitorName, String subAccountName) { + public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + String subAccountName) { return new PagedIterable<>(listMonitoredResourcesAsync(resourceGroupName, monitorName, subAccountName)); } /** * List the resources currently being monitored by the Logz sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1567,15 +1277,15 @@ public PagedIterable listMonitoredResources( * @return response of a list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMonitoredResources( - String resourceGroupName, String monitorName, String subAccountName, Context context) { + public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + String subAccountName, Context context) { return new PagedIterable<>( listMonitoredResourcesAsync(resourceGroupName, monitorName, subAccountName, context)); } /** * Returns the payload that needs to be passed as a request for installing Logz.io agent on a VM. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1583,22 +1293,18 @@ public PagedIterable listMonitoredResources( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of 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> vMHostPayloadWithResponseAsync( - String resourceGroupName, String monitorName, String subAccountName) { + private Mono> vMHostPayloadWithResponseAsync(String resourceGroupName, + String monitorName, String subAccountName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1612,24 +1318,14 @@ private Mono> vMHostPayloadWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .vMHostPayload( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.vMHostPayload(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, subAccountName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns the payload that needs to be passed as a request for installing Logz.io agent on a VM. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1638,22 +1334,18 @@ private Mono> vMHostPayloadWithResponseAsync( * @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> vMHostPayloadWithResponseAsync( - String resourceGroupName, String monitorName, String subAccountName, Context context) { + private Mono> vMHostPayloadWithResponseAsync(String resourceGroupName, + String monitorName, String subAccountName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1667,21 +1359,13 @@ private Mono> vMHostPayloadWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .vMHostPayload( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - this.client.getApiVersion(), - accept, - context); + return service.vMHostPayload(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, subAccountName, this.client.getApiVersion(), accept, context); } /** * Returns the payload that needs to be passed as a request for installing Logz.io agent on a VM. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1691,15 +1375,15 @@ private Mono> vMHostPayloadWithResponseAsync( * @return response of payload to be passed while installing VM agent on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono vMHostPayloadAsync( - String resourceGroupName, String monitorName, String subAccountName) { + private Mono vMHostPayloadAsync(String resourceGroupName, String monitorName, + String subAccountName) { return vMHostPayloadWithResponseAsync(resourceGroupName, monitorName, subAccountName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Returns the payload that needs to be passed as a request for installing Logz.io agent on a VM. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1710,14 +1394,14 @@ private Mono vMHostPayloadAsync( * @return response of payload to be passed while installing VM agent along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response vMHostPayloadWithResponse( - String resourceGroupName, String monitorName, String subAccountName, Context context) { + public Response vMHostPayloadWithResponse(String resourceGroupName, String monitorName, + String subAccountName, Context context) { return vMHostPayloadWithResponseAsync(resourceGroupName, monitorName, subAccountName, context).block(); } /** * Returns the payload that needs to be passed as a request for installing Logz.io agent on a VM. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1733,7 +1417,7 @@ public VMExtensionPayloadInner vMHostPayload(String resourceGroupName, String mo /** * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1742,22 +1426,18 @@ public VMExtensionPayloadInner vMHostPayload(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 response of a list VM Host Update Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVmHostUpdateSinglePageAsync( - String resourceGroupName, String monitorName, String subAccountName, VMHostUpdateRequest body) { + private Mono> listVmHostUpdateSinglePageAsync(String resourceGroupName, + String monitorName, String subAccountName, VMHostUpdateRequest body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1774,34 +1454,16 @@ private Mono> listVmHostUpdateSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listVmHostUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - this.client.getApiVersion(), - body, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listVmHostUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, subAccountName, this.client.getApiVersion(), body, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1811,26 +1473,18 @@ private Mono> listVmHostUpdateSinglePageAsync( * @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 Update Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVmHostUpdateSinglePageAsync( - String resourceGroupName, - String monitorName, - String subAccountName, - VMHostUpdateRequest body, - Context context) { + private Mono> listVmHostUpdateSinglePageAsync(String resourceGroupName, + String monitorName, String subAccountName, VMHostUpdateRequest body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1848,30 +1502,15 @@ private Mono> listVmHostUpdateSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listVmHostUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - this.client.getApiVersion(), - body, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listVmHostUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, subAccountName, this.client.getApiVersion(), body, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1882,8 +1521,8 @@ private Mono> listVmHostUpdateSinglePageAsync( * @return response of a list VM Host Update Operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listVmHostUpdateAsync( - String resourceGroupName, String monitorName, String subAccountName, VMHostUpdateRequest body) { + private PagedFlux listVmHostUpdateAsync(String resourceGroupName, String monitorName, + String subAccountName, VMHostUpdateRequest body) { return new PagedFlux<>( () -> listVmHostUpdateSinglePageAsync(resourceGroupName, monitorName, subAccountName, body), nextLink -> listVmHostUpdateNextSinglePageAsync(nextLink)); @@ -1891,7 +1530,7 @@ private PagedFlux listVmHostUpdateAsync( /** * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1901,8 +1540,8 @@ private PagedFlux listVmHostUpdateAsync( * @return response of a list VM Host Update Operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listVmHostUpdateAsync( - String resourceGroupName, String monitorName, String subAccountName) { + private PagedFlux listVmHostUpdateAsync(String resourceGroupName, String monitorName, + String subAccountName) { final VMHostUpdateRequest body = null; return new PagedFlux<>( () -> listVmHostUpdateSinglePageAsync(resourceGroupName, monitorName, subAccountName, body), @@ -1911,7 +1550,7 @@ private PagedFlux listVmHostUpdateAsync( /** * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1923,12 +1562,8 @@ private PagedFlux listVmHostUpdateAsync( * @return response of a list VM Host Update Operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listVmHostUpdateAsync( - String resourceGroupName, - String monitorName, - String subAccountName, - VMHostUpdateRequest body, - Context context) { + private PagedFlux listVmHostUpdateAsync(String resourceGroupName, String monitorName, + String subAccountName, VMHostUpdateRequest body, Context context) { return new PagedFlux<>( () -> listVmHostUpdateSinglePageAsync(resourceGroupName, monitorName, subAccountName, body, context), nextLink -> listVmHostUpdateNextSinglePageAsync(nextLink, context)); @@ -1936,7 +1571,7 @@ private PagedFlux listVmHostUpdateAsync( /** * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1946,15 +1581,15 @@ private PagedFlux listVmHostUpdateAsync( * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listVmHostUpdate( - String resourceGroupName, String monitorName, String subAccountName) { + public PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, + String subAccountName) { final VMHostUpdateRequest body = null; return new PagedIterable<>(listVmHostUpdateAsync(resourceGroupName, monitorName, subAccountName, body)); } /** * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1966,19 +1601,15 @@ public PagedIterable listVmHostUpdate( * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listVmHostUpdate( - String resourceGroupName, - String monitorName, - String subAccountName, - VMHostUpdateRequest body, - Context context) { + public PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, + String subAccountName, VMHostUpdateRequest body, Context context) { return new PagedIterable<>( listVmHostUpdateAsync(resourceGroupName, monitorName, subAccountName, body, context)); } /** * List the compute resources currently being monitored by the Logz sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -1986,22 +1617,18 @@ public PagedIterable listVmHostUpdate( * @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 Update Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVMHostsSinglePageAsync( - String resourceGroupName, String monitorName, String subAccountName) { + private Mono> listVMHostsSinglePageAsync(String resourceGroupName, + String monitorName, String subAccountName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2015,33 +1642,16 @@ private Mono> listVMHostsSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listVMHosts( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listVMHosts(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, subAccountName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List the compute resources currently being monitored by the Logz sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -2050,22 +1660,18 @@ private Mono> listVMHostsSinglePageAsync( * @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 Update Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVMHostsSinglePageAsync( - String resourceGroupName, String monitorName, String subAccountName, Context context) { + private Mono> listVMHostsSinglePageAsync(String resourceGroupName, + String monitorName, String subAccountName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2080,29 +1686,15 @@ private Mono> listVMHostsSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listVMHosts( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - subAccountName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listVMHosts(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, + subAccountName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List the compute resources currently being monitored by the Logz sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -2112,16 +1704,15 @@ private Mono> listVMHostsSinglePageAsync( * @return response of a list VM Host Update Operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listVMHostsAsync( - String resourceGroupName, String monitorName, String subAccountName) { - return new PagedFlux<>( - () -> listVMHostsSinglePageAsync(resourceGroupName, monitorName, subAccountName), + private PagedFlux listVMHostsAsync(String resourceGroupName, String monitorName, + String subAccountName) { + return new PagedFlux<>(() -> listVMHostsSinglePageAsync(resourceGroupName, monitorName, subAccountName), nextLink -> listVMHostsNextSinglePageAsync(nextLink)); } /** * List the compute resources currently being monitored by the Logz sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -2132,8 +1723,8 @@ private PagedFlux listVMHostsAsync( * @return response of a list VM Host Update Operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listVMHostsAsync( - String resourceGroupName, String monitorName, String subAccountName, Context context) { + private PagedFlux listVMHostsAsync(String resourceGroupName, String monitorName, + String subAccountName, Context context) { return new PagedFlux<>( () -> listVMHostsSinglePageAsync(resourceGroupName, monitorName, subAccountName, context), nextLink -> listVMHostsNextSinglePageAsync(nextLink, context)); @@ -2141,7 +1732,7 @@ private PagedFlux listVMHostsAsync( /** * List the compute resources currently being monitored by the Logz sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -2151,14 +1742,14 @@ private PagedFlux listVMHostsAsync( * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listVMHosts( - String resourceGroupName, String monitorName, String subAccountName) { + public PagedIterable listVMHosts(String resourceGroupName, String monitorName, + String subAccountName) { return new PagedIterable<>(listVMHostsAsync(resourceGroupName, monitorName, subAccountName)); } /** * List the compute resources currently being monitored by the Logz sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -2169,16 +1760,17 @@ public PagedIterable listVMHosts( * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listVMHosts( - String resourceGroupName, String monitorName, String subAccountName, Context context) { + public PagedIterable listVMHosts(String resourceGroupName, String monitorName, + String subAccountName, Context context) { return new PagedIterable<>(listVMHostsAsync(resourceGroupName, monitorName, subAccountName, context)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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. @@ -2190,31 +1782,22 @@ private Mono> listNextSinglePageAsync(St return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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. @@ -2227,31 +1810,22 @@ private Mono> listNextSinglePageAsync(St return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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. @@ -2263,32 +1837,24 @@ private Mono> listMonitoredResourcesNextSi return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listMonitoredResourcesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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. @@ -2296,42 +1862,33 @@ private Mono> listMonitoredResourcesNextSi * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listMonitoredResourcesNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listMonitoredResourcesNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listMonitoredResourcesNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listMonitoredResourcesNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 Update Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listVmHostUpdateNextSinglePageAsync(String nextLink) { @@ -2339,75 +1896,58 @@ private Mono> listVmHostUpdateNextSinglePageAsyn return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listVmHostUpdateNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 Update Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listVmHostUpdateNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listVmHostUpdateNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listVmHostUpdateNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listVmHostUpdateNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 Update Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listVMHostsNextSinglePageAsync(String nextLink) { @@ -2415,37 +1955,29 @@ private Mono> listVMHostsNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listVMHostsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 Update Operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listVMHostsNextSinglePageAsync(String nextLink, Context context) { @@ -2453,23 +1985,13 @@ private Mono> listVMHostsNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listVMHostsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listVMHostsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountsImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountsImpl.java index 8e6658e2e1fa..b96357f50635 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountsImpl.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/SubAccountsImpl.java @@ -40,8 +40,8 @@ public PagedIterable list(String resourceGroupName, String } public PagedIterable list(String resourceGroupName, String monitorName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, monitorName, context); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, monitorName, context); return Utils.mapPage(inner, inner1 -> new LogzMonitorResourceImpl(inner1, this.manager())); } @@ -54,14 +54,10 @@ public LogzMonitorResource create(String resourceGroupName, String monitorName, } } - public LogzMonitorResource create( - String resourceGroupName, - String monitorName, - String subAccountName, - LogzMonitorResourceInner body, - Context context) { - LogzMonitorResourceInner inner = - this.serviceClient().create(resourceGroupName, monitorName, subAccountName, body, context); + public LogzMonitorResource create(String resourceGroupName, String monitorName, String subAccountName, + LogzMonitorResourceInner body, Context context) { + LogzMonitorResourceInner inner + = this.serviceClient().create(resourceGroupName, monitorName, subAccountName, body, context); if (inner != null) { return new LogzMonitorResourceImpl(inner, this.manager()); } else { @@ -69,15 +65,12 @@ public LogzMonitorResource create( } } - public Response getWithResponse( - String resourceGroupName, String monitorName, String subAccountName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, monitorName, subAccountName, context); + public Response getWithResponse(String resourceGroupName, String monitorName, + String subAccountName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, monitorName, subAccountName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new LogzMonitorResourceImpl(inner.getValue(), this.manager())); } else { return null; @@ -101,19 +94,12 @@ public void delete(String resourceGroupName, String monitorName, String subAccou this.serviceClient().delete(resourceGroupName, monitorName, subAccountName, context); } - public Response updateWithResponse( - String resourceGroupName, - String monitorName, - String subAccountName, - LogzMonitorResourceUpdateParameters body, - Context context) { - Response inner = - this.serviceClient().updateWithResponse(resourceGroupName, monitorName, subAccountName, body, context); + public Response updateWithResponse(String resourceGroupName, String monitorName, + String subAccountName, LogzMonitorResourceUpdateParameters body, Context context) { + Response inner + = this.serviceClient().updateWithResponse(resourceGroupName, monitorName, subAccountName, body, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new LogzMonitorResourceImpl(inner.getValue(), this.manager())); } else { return null; @@ -129,29 +115,26 @@ public LogzMonitorResource update(String resourceGroupName, String monitorName, } } - public PagedIterable listMonitoredResources( - String resourceGroupName, String monitorName, String subAccountName) { - PagedIterable inner = - this.serviceClient().listMonitoredResources(resourceGroupName, monitorName, subAccountName); + public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + String subAccountName) { + PagedIterable inner + = this.serviceClient().listMonitoredResources(resourceGroupName, monitorName, subAccountName); return Utils.mapPage(inner, inner1 -> new MonitoredResourceImpl(inner1, this.manager())); } - public PagedIterable listMonitoredResources( - String resourceGroupName, String monitorName, String subAccountName, Context context) { - PagedIterable inner = - this.serviceClient().listMonitoredResources(resourceGroupName, monitorName, subAccountName, context); + public PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + String subAccountName, Context context) { + PagedIterable inner + = this.serviceClient().listMonitoredResources(resourceGroupName, monitorName, subAccountName, context); return Utils.mapPage(inner, inner1 -> new MonitoredResourceImpl(inner1, this.manager())); } - public Response vMHostPayloadWithResponse( - String resourceGroupName, String monitorName, String subAccountName, Context context) { - Response inner = - this.serviceClient().vMHostPayloadWithResponse(resourceGroupName, monitorName, subAccountName, context); + public Response vMHostPayloadWithResponse(String resourceGroupName, String monitorName, + String subAccountName, Context context) { + Response inner + = this.serviceClient().vMHostPayloadWithResponse(resourceGroupName, monitorName, subAccountName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new VMExtensionPayloadImpl(inner.getValue(), this.manager())); } else { return null; @@ -159,8 +142,8 @@ public Response vMHostPayloadWithResponse( } public VMExtensionPayload vMHostPayload(String resourceGroupName, String monitorName, String subAccountName) { - VMExtensionPayloadInner inner = - this.serviceClient().vMHostPayload(resourceGroupName, monitorName, subAccountName); + VMExtensionPayloadInner inner + = this.serviceClient().vMHostPayload(resourceGroupName, monitorName, subAccountName); if (inner != null) { return new VMExtensionPayloadImpl(inner, this.manager()); } else { @@ -168,34 +151,30 @@ public VMExtensionPayload vMHostPayload(String resourceGroupName, String monitor } } - public PagedIterable listVmHostUpdate( - String resourceGroupName, String monitorName, String subAccountName) { - PagedIterable inner = - this.serviceClient().listVmHostUpdate(resourceGroupName, monitorName, subAccountName); + public PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, + String subAccountName) { + PagedIterable inner + = this.serviceClient().listVmHostUpdate(resourceGroupName, monitorName, subAccountName); return Utils.mapPage(inner, inner1 -> new VMResourcesImpl(inner1, this.manager())); } - public PagedIterable listVmHostUpdate( - String resourceGroupName, - String monitorName, - String subAccountName, - VMHostUpdateRequest body, - Context context) { - PagedIterable inner = - this.serviceClient().listVmHostUpdate(resourceGroupName, monitorName, subAccountName, body, context); + public PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, + String subAccountName, VMHostUpdateRequest body, Context context) { + PagedIterable inner + = this.serviceClient().listVmHostUpdate(resourceGroupName, monitorName, subAccountName, body, context); return Utils.mapPage(inner, inner1 -> new VMResourcesImpl(inner1, this.manager())); } public PagedIterable listVMHosts(String resourceGroupName, String monitorName, String subAccountName) { - PagedIterable inner = - this.serviceClient().listVMHosts(resourceGroupName, monitorName, subAccountName); + PagedIterable inner + = this.serviceClient().listVMHosts(resourceGroupName, monitorName, subAccountName); return Utils.mapPage(inner, inner1 -> new VMResourcesImpl(inner1, this.manager())); } - public PagedIterable listVMHosts( - String resourceGroupName, String monitorName, String subAccountName, Context context) { - PagedIterable inner = - this.serviceClient().listVMHosts(resourceGroupName, monitorName, subAccountName, context); + public PagedIterable listVMHosts(String resourceGroupName, String monitorName, String subAccountName, + Context context) { + PagedIterable inner + = this.serviceClient().listVMHosts(resourceGroupName, monitorName, subAccountName, context); return Utils.mapPage(inner, inner1 -> new VMResourcesImpl(inner1, this.manager())); } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/TagRulesClientImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/TagRulesClientImpl.java index 782bb856fc78..281bb13795c1 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/TagRulesClientImpl.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/TagRulesClientImpl.java @@ -34,17 +34,23 @@ import com.azure.resourcemanager.logz.models.TagRulesDeleteResponse; 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 MicrosoftLogzImpl client; /** * Initializes an instance of TagRulesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ TagRulesClientImpl(MicrosoftLogzImpl client) { @@ -53,90 +59,64 @@ public final class TagRulesClientImpl implements TagRulesClient { } /** - * The interface defining all the services for MicrosoftLogzTagRules to be used by the proxy service to perform REST - * calls. + * The interface defining all the services for MicrosoftLogzTagRules to be used by the proxy service to perform + * REST calls. */ @Host("{$host}") @ServiceInterface(name = "MicrosoftLogzTagRule") public interface TagRulesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/tagRules") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/tagRules") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/tagRules/{ruleSetName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/tagRules/{ruleSetName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @PathParam("ruleSetName") String ruleSetName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") MonitoringTagRulesInner body, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("ruleSetName") String ruleSetName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") MonitoringTagRulesInner body, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/tagRules/{ruleSetName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/tagRules/{ruleSetName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @PathParam("ruleSetName") String ruleSetName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("ruleSetName") String ruleSetName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors" - + "/{monitorName}/tagRules/{ruleSetName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logz/monitors/{monitorName}/tagRules/{ruleSetName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono delete( - @HostParam("$host") String endpoint, + Mono delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("monitorName") String monitorName, - @PathParam("ruleSetName") String ruleSetName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("monitorName") String monitorName, + @PathParam("ruleSetName") String ruleSetName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List the tag rules for a given 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. @@ -145,19 +125,15 @@ Mono> listNext( * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String monitorName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String monitorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -168,32 +144,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List the tag rules for a given 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. @@ -203,19 +163,15 @@ private Mono> listSinglePageAsync( * @return response of a list operation along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String monitorName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String monitorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -227,28 +183,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List the tag rules for a given 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. @@ -258,13 +201,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String monitorName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, monitorName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * List the tag rules for a given 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. @@ -274,16 +217,15 @@ private PagedFlux listAsync(String resourceGroupName, S * @return response of a list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String monitorName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, monitorName, context), + private PagedFlux listAsync(String resourceGroupName, String monitorName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, monitorName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List the tag rules for a given 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. @@ -298,7 +240,7 @@ public PagedIterable list(String resourceGroupName, Str /** * List the tag rules for a given 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. @@ -314,7 +256,7 @@ public PagedIterable list(String resourceGroupName, Str /** * Create or update a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -323,22 +265,18 @@ public PagedIterable list(String resourceGroupName, Str * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String monitorName, String ruleSetName, MonitoringTagRulesInner body) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String monitorName, String ruleSetName, MonitoringTagRulesInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -355,25 +293,14 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - ruleSetName, - this.client.getApiVersion(), - body, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, ruleSetName, this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or update a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -383,26 +310,18 @@ private Mono> createOrUpdateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String monitorName, - String ruleSetName, - MonitoringTagRulesInner body, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String monitorName, String ruleSetName, MonitoringTagRulesInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -419,22 +338,13 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - ruleSetName, - this.client.getApiVersion(), - body, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, ruleSetName, this.client.getApiVersion(), body, accept, context); } /** * Create or update a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -444,8 +354,8 @@ private Mono> createOrUpdateWithResponseAsync( * @return capture logs and metrics of Azure resources based on ARM tags on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String monitorName, String ruleSetName) { + private Mono createOrUpdateAsync(String resourceGroupName, String monitorName, + String ruleSetName) { final MonitoringTagRulesInner body = null; return createOrUpdateWithResponseAsync(resourceGroupName, monitorName, ruleSetName, body) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -453,7 +363,7 @@ private Mono createOrUpdateAsync( /** * Create or update a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -465,18 +375,14 @@ private Mono createOrUpdateAsync( * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String monitorName, - String ruleSetName, - MonitoringTagRulesInner body, - Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + String ruleSetName, MonitoringTagRulesInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, monitorName, ruleSetName, body, context).block(); } /** * Create or update a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -493,7 +399,7 @@ public MonitoringTagRulesInner createOrUpdate(String resourceGroupName, String m /** * Get a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -501,22 +407,18 @@ public MonitoringTagRulesInner createOrUpdate(String resourceGroupName, String m * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a tag rule set for a given monitor resource along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String monitorName, String ruleSetName) { + private Mono> getWithResponseAsync(String resourceGroupName, String monitorName, + String ruleSetName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -530,24 +432,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - ruleSetName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, ruleSetName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -556,22 +448,18 @@ private Mono> getWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a tag rule set for a given monitor resource along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String monitorName, String ruleSetName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String monitorName, + String ruleSetName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -585,21 +473,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - ruleSetName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, + ruleSetName, this.client.getApiVersion(), accept, context); } /** * Get a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -616,7 +496,7 @@ private Mono getAsync(String resourceGroupName, String /** * Get a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -627,14 +507,14 @@ private Mono getAsync(String resourceGroupName, String * @return a tag rule set for a given monitor resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String monitorName, String ruleSetName, Context context) { + public Response getWithResponse(String resourceGroupName, String monitorName, + String ruleSetName, Context context) { return getWithResponseAsync(resourceGroupName, monitorName, ruleSetName, context).block(); } /** * Get a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -650,7 +530,7 @@ public MonitoringTagRulesInner get(String resourceGroupName, String monitorName, /** * Delete a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -660,19 +540,15 @@ public MonitoringTagRulesInner get(String resourceGroupName, String monitorName, * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteWithResponseAsync( - String resourceGroupName, String monitorName, String ruleSetName) { + private Mono deleteWithResponseAsync(String resourceGroupName, String monitorName, + String ruleSetName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -686,24 +562,14 @@ private Mono deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - ruleSetName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, monitorName, ruleSetName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -714,19 +580,15 @@ private Mono deleteWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteWithResponseAsync( - String resourceGroupName, String monitorName, String ruleSetName, Context context) { + private Mono deleteWithResponseAsync(String resourceGroupName, String monitorName, + String ruleSetName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -740,21 +602,13 @@ private Mono deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - monitorName, - ruleSetName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + monitorName, ruleSetName, this.client.getApiVersion(), accept, context); } /** * Delete a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -770,7 +624,7 @@ private Mono deleteAsync(String resourceGroupName, String monitorName, Str /** * Delete a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -781,14 +635,14 @@ private Mono deleteAsync(String resourceGroupName, String monitorName, Str * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public TagRulesDeleteResponse deleteWithResponse( - String resourceGroupName, String monitorName, String ruleSetName, Context context) { + public TagRulesDeleteResponse deleteWithResponse(String resourceGroupName, String monitorName, String ruleSetName, + Context context) { return deleteWithResponseAsync(resourceGroupName, monitorName, ruleSetName, context).block(); } /** * Delete a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -803,9 +657,10 @@ public void delete(String resourceGroupName, String monitorName, String ruleSetN /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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. @@ -817,31 +672,22 @@ private Mono> listNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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. @@ -854,23 +700,13 @@ private Mono> listNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/TagRulesImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/TagRulesImpl.java index e198b47298d3..0d9f5e81c1c4 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/TagRulesImpl.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/TagRulesImpl.java @@ -33,20 +33,17 @@ public PagedIterable list(String resourceGroupName, String m } public PagedIterable list(String resourceGroupName, String monitorName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, monitorName, context); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, monitorName, context); return Utils.mapPage(inner, inner1 -> new MonitoringTagRulesImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String monitorName, String ruleSetName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, monitorName, ruleSetName, context); + public Response getWithResponse(String resourceGroupName, String monitorName, + String ruleSetName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, monitorName, ruleSetName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new MonitoringTagRulesImpl(inner.getValue(), this.manager())); } else { return null; @@ -62,8 +59,8 @@ public MonitoringTagRules get(String resourceGroupName, String monitorName, Stri } } - public TagRulesDeleteResponse deleteWithResponse( - String resourceGroupName, String monitorName, String ruleSetName, Context context) { + public TagRulesDeleteResponse deleteWithResponse(String resourceGroupName, String monitorName, String ruleSetName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, monitorName, ruleSetName, context); } @@ -74,25 +71,18 @@ public void delete(String resourceGroupName, String monitorName, String ruleSetN public MonitoringTagRules getById(String id) { String resourceGroupName = Utils.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))); + 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"); if (monitorName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); } String ruleSetName = Utils.getValueFromIdByName(id, "tagRules"); if (ruleSetName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'tagRules'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tagRules'.", id))); } return this.getWithResponse(resourceGroupName, monitorName, ruleSetName, Context.NONE).getValue(); } @@ -100,25 +90,18 @@ public MonitoringTagRules getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.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))); + 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"); if (monitorName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); } String ruleSetName = Utils.getValueFromIdByName(id, "tagRules"); if (ruleSetName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'tagRules'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tagRules'.", id))); } return this.getWithResponse(resourceGroupName, monitorName, ruleSetName, context); } @@ -126,25 +109,18 @@ public Response getByIdWithResponse(String id, Context conte public void deleteById(String id) { String resourceGroupName = Utils.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))); + 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"); if (monitorName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); } String ruleSetName = Utils.getValueFromIdByName(id, "tagRules"); if (ruleSetName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'tagRules'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tagRules'.", id))); } this.deleteWithResponse(resourceGroupName, monitorName, ruleSetName, Context.NONE); } @@ -152,25 +128,18 @@ public void deleteById(String id) { public TagRulesDeleteResponse deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.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))); + 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"); if (monitorName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'monitors'.", id))); } String ruleSetName = Utils.getValueFromIdByName(id, "tagRules"); if (ruleSetName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'tagRules'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'tagRules'.", id))); } return this.deleteWithResponse(resourceGroupName, monitorName, ruleSetName, context); } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/Utils.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/Utils.java index e7e56c7c41b8..46cfcaacb89e 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/Utils.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/Utils.java @@ -20,6 +20,9 @@ import reactor.core.publisher.Flux; final class Utils { + private Utils() { + } + static String getValueFromIdByName(String id, String name) { if (id == null) { return null; @@ -38,6 +41,7 @@ static String getValueFromIdByName(String id, String name) { } } return null; + } static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { @@ -60,7 +64,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); @@ -71,10 +75,11 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } } return null; + } static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl(pageIterable, mapper); + return new PagedIterableImpl<>(pageIterable, mapper); } private static final class PagedIterableImpl extends PagedIterable { @@ -84,26 +89,17 @@ private static final class PagedIterableImpl extends PagedIterable { private final Function, PagedResponse> pageMapper; private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); this.pagedIterable = pagedIterable; this.mapper = mapper; this.pageMapper = getPageMapper(mapper); } private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); } @Override @@ -133,30 +129,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); } } @@ -198,7 +191,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/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/VMExtensionPayloadImpl.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/VMExtensionPayloadImpl.java index eb74c4dc9d02..836a0a640eba 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/VMExtensionPayloadImpl.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/VMExtensionPayloadImpl.java @@ -12,8 +12,8 @@ public final class VMExtensionPayloadImpl implements VMExtensionPayload { private final com.azure.resourcemanager.logz.LogzManager serviceManager; - VMExtensionPayloadImpl( - VMExtensionPayloadInner innerObject, com.azure.resourcemanager.logz.LogzManager serviceManager) { + VMExtensionPayloadImpl(VMExtensionPayloadInner innerObject, + com.azure.resourcemanager.logz.LogzManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/package-info.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/package-info.java index de37fabad058..90394e8e3684 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/implementation/package-info.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/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 MicrosoftLogz. null. */ +/** + * Package containing the implementations for MicrosoftLogz. + * null. + */ package com.azure.resourcemanager.logz.implementation; diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/FilteringTag.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/FilteringTag.java index b328cb66a9e9..99a75a196b93 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/FilteringTag.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/FilteringTag.java @@ -31,13 +31,15 @@ public final class FilteringTag { @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 +48,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 +59,7 @@ public FilteringTag withName(String name) { /** * Get the value property: The value of the tag. - * + * * @return the value value. */ public String value() { @@ -66,7 +68,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 +79,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 +88,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,7 +99,7 @@ public FilteringTag withAction(TagAction action) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/IdentityProperties.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/IdentityProperties.java index b5e3ad4ea9b6..8d541efbeefe 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/IdentityProperties.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/IdentityProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The IdentityProperties model. */ +/** + * The IdentityProperties model. + */ @Fluent public final class IdentityProperties { /* @@ -28,13 +30,15 @@ public final class IdentityProperties { @JsonProperty(value = "type") private ManagedIdentityTypes type; - /** Creates an instance of IdentityProperties class. */ + /** + * Creates an instance of IdentityProperties class. + */ public IdentityProperties() { } /** * Get the principalId property: The identity ID. - * + * * @return the principalId value. */ public String principalId() { @@ -43,7 +47,7 @@ public String principalId() { /** * Get the tenantId property: The tenant ID of resource. - * + * * @return the tenantId value. */ public String tenantId() { @@ -52,7 +56,7 @@ public String tenantId() { /** * Get the type property: The type property. - * + * * @return the type value. */ public ManagedIdentityTypes type() { @@ -61,7 +65,7 @@ public ManagedIdentityTypes type() { /** * Set the type property: The type property. - * + * * @param type the type value to set. * @return the IdentityProperties object itself. */ @@ -72,7 +76,7 @@ public IdentityProperties withType(ManagedIdentityTypes type) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LiftrResourceCategories.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LiftrResourceCategories.java index 94ab7a97e075..0930026aa4de 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LiftrResourceCategories.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LiftrResourceCategories.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for LiftrResourceCategories. */ +/** + * Defines values for LiftrResourceCategories. + */ 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,7 +33,7 @@ public LiftrResourceCategories() { /** * Creates or finds a LiftrResourceCategories from its string representation. - * + * * @param name a name to look for. * @return the corresponding LiftrResourceCategories. */ @@ -38,7 +44,7 @@ public static LiftrResourceCategories fromString(String name) { /** * Gets known LiftrResourceCategories values. - * + * * @return known LiftrResourceCategories values. */ public static Collection values() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogRules.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogRules.java index 1c8fbc8b6945..c78bfe21f6ff 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogRules.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogRules.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; 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 { /* @@ -38,13 +40,15 @@ public final class LogRules { @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 Boolean sendAadLogs() { @@ -53,7 +57,7 @@ public Boolean 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(Boolean sendAadLogs) { /** * Get the sendSubscriptionLogs property: Flag specifying if subscription logs should be sent for the Monitor * resource. - * + * * @return the sendSubscriptionLogs value. */ public Boolean sendSubscriptionLogs() { @@ -75,7 +79,7 @@ public Boolean 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(Boolean sendSubscriptionLogs) { /** * Get the sendActivityLogs property: Flag specifying if activity logs from Azure resources should be sent for the * Monitor resource. - * + * * @return the sendActivityLogs value. */ public Boolean sendActivityLogs() { @@ -97,7 +101,7 @@ public Boolean 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. */ @@ -111,7 +115,7 @@ public LogRules withSendActivityLogs(Boolean sendActivityLogs) { * 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() { @@ -123,7 +127,7 @@ public List filteringTags() { * 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() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResource.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResource.java index 9a196664291f..e0cbcfbb0fdb 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResource.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResource.java @@ -11,109 +11,118 @@ import com.azure.resourcemanager.logz.fluent.models.LogzMonitorResourceInner; import java.util.Map; -/** An immutable client-side representation of LogzMonitorResource. */ +/** + * An immutable client-side representation of LogzMonitorResource. + */ public interface LogzMonitorResource { /** * 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: The system metadata relating to this resource. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the properties property: Properties specific to the monitor resource. - * + * * @return the properties value. */ MonitorProperties properties(); /** * Gets the identity property: The identity property. - * + * * @return the identity value. */ IdentityProperties identity(); /** * 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.logz.fluent.models.LogzMonitorResourceInner object. - * + * * @return the inner object. */ LogzMonitorResourceInner innerModel(); - /** The entirety of the LogzMonitorResource definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the LogzMonitorResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The LogzMonitorResource definition stages. */ + + /** + * The LogzMonitorResource definition stages. + */ interface DefinitionStages { - /** The first stage of the LogzMonitorResource definition. */ + /** + * The first stage of the LogzMonitorResource definition. + */ interface Blank extends WithLocation { } - /** The stage of the LogzMonitorResource definition allowing to specify location. */ + + /** + * The stage of the LogzMonitorResource 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. */ @@ -121,22 +130,26 @@ 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 LogzMonitorResource definition allowing to specify parent resource. */ + + /** + * The stage of the LogzMonitorResource 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. */ WithCreate withExistingResourceGroup(String resourceGroupName); } + /** * The stage of the LogzMonitorResource definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. @@ -145,108 +158,129 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithIdentity { /** * Executes the create request. - * + * * @return the created resource. */ LogzMonitorResource create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ LogzMonitorResource create(Context context); } - /** The stage of the LogzMonitorResource definition allowing to specify tags. */ + + /** + * The stage of the LogzMonitorResource 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 LogzMonitorResource definition allowing to specify properties. */ + + /** + * The stage of the LogzMonitorResource definition allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: Properties specific to the monitor resource.. - * + * * @param properties Properties specific to the monitor resource. * @return the next definition stage. */ WithCreate withProperties(MonitorProperties properties); } - /** The stage of the LogzMonitorResource definition allowing to specify identity. */ + + /** + * The stage of the LogzMonitorResource definition allowing to specify identity. + */ interface WithIdentity { /** * Specifies the identity property: The identity property.. - * + * * @param identity The identity property. * @return the next definition stage. */ WithCreate withIdentity(IdentityProperties identity); } } + /** * Begins update for the LogzMonitorResource resource. - * + * * @return the stage of resource update. */ LogzMonitorResource.Update update(); - /** The template for LogzMonitorResource update. */ + /** + * The template for LogzMonitorResource update. + */ interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ LogzMonitorResource apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ LogzMonitorResource apply(Context context); } - /** The LogzMonitorResource update stages. */ + + /** + * The LogzMonitorResource update stages. + */ interface UpdateStages { - /** The stage of the LogzMonitorResource update allowing to specify tags. */ + /** + * The stage of the LogzMonitorResource update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: The new tags of the monitor resource.. - * + * * @param tags The new tags of the monitor resource. * @return the next definition stage. */ Update withTags(Map tags); } - /** The stage of the LogzMonitorResource update allowing to specify properties. */ + + /** + * The stage of the LogzMonitorResource update allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: The set of properties that can be update in a PATCH request to a * monitor resource.. - * + * * @param properties The set of properties that can be update in a PATCH request to a monitor resource. * @return the next definition stage. */ Update withProperties(MonitorUpdateProperties properties); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ LogzMonitorResource refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -254,7 +288,7 @@ interface WithProperties { /** * List the resources currently being monitored by the Logz 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 response of a list operation as paginated response with {@link PagedIterable}. @@ -263,7 +297,7 @@ interface WithProperties { /** * List the resources currently being monitored by the Logz 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. @@ -274,7 +308,7 @@ interface WithProperties { /** * List the user's roles configured on Logz.io side for the account corresponding to the 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 response for list of user's role for Logz.io account as paginated response with {@link PagedIterable}. @@ -283,7 +317,7 @@ interface WithProperties { /** * List the user's roles configured on Logz.io side for the account corresponding to the monitor resource. - * + * * @param body Request for checking user's role for Logz.io account. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResourceListResponse.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResourceListResponse.java index 45e048b7d36c..2438fff084ac 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResourceListResponse.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResourceListResponse.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Response of a list operation. */ +/** + * Response of a list operation. + */ @Fluent public final class LogzMonitorResourceListResponse { /* @@ -24,13 +26,15 @@ public final class LogzMonitorResourceListResponse { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of LogzMonitorResourceListResponse class. */ + /** + * Creates an instance of LogzMonitorResourceListResponse class. + */ public LogzMonitorResourceListResponse() { } /** * Get the value property: Results of a list operation. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: Results of a list operation. - * + * * @param value the value value to set. * @return the LogzMonitorResourceListResponse object itself. */ @@ -50,7 +54,7 @@ public LogzMonitorResourceListResponse withValue(List /** * Get the nextLink property: Link to the next set of results, if any. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Set the nextLink property: Link to the next set of results, if any. - * + * * @param nextLink the nextLink value to set. * @return the LogzMonitorResourceListResponse object itself. */ @@ -70,7 +74,7 @@ public LogzMonitorResourceListResponse withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResourceUpdateParameters.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResourceUpdateParameters.java index a4a14b333119..2ad0b0de8af7 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResourceUpdateParameters.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzMonitorResourceUpdateParameters.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The parameters for a PATCH request to a monitor resource. */ +/** + * The parameters for a PATCH request to a monitor resource. + */ @Fluent public final class LogzMonitorResourceUpdateParameters { /* @@ -25,13 +27,15 @@ public final class LogzMonitorResourceUpdateParameters { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of LogzMonitorResourceUpdateParameters class. */ + /** + * Creates an instance of LogzMonitorResourceUpdateParameters class. + */ public LogzMonitorResourceUpdateParameters() { } /** * Get the properties property: The set of properties that can be update in a PATCH request to a monitor resource. - * + * * @return the properties value. */ public MonitorUpdateProperties properties() { @@ -40,7 +44,7 @@ public MonitorUpdateProperties properties() { /** * Set the properties property: The set of properties that can be update in a PATCH request to a monitor resource. - * + * * @param properties the properties value to set. * @return the LogzMonitorResourceUpdateParameters object itself. */ @@ -51,7 +55,7 @@ public LogzMonitorResourceUpdateParameters withProperties(MonitorUpdatePropertie /** * Get the tags property: The new tags of the monitor resource. - * + * * @return the tags value. */ public Map tags() { @@ -60,7 +64,7 @@ public Map tags() { /** * Set the tags property: The new tags of the monitor resource. - * + * * @param tags the tags value to set. * @return the LogzMonitorResourceUpdateParameters object itself. */ @@ -71,7 +75,7 @@ public LogzMonitorResourceUpdateParameters withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzOrganizationProperties.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzOrganizationProperties.java index 42a1b4936cb5..fb087da131d3 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzOrganizationProperties.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzOrganizationProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The LogzOrganizationProperties model. */ +/** + * The LogzOrganizationProperties model. + */ @Fluent public final class LogzOrganizationProperties { /* @@ -34,13 +36,15 @@ public final class LogzOrganizationProperties { @JsonProperty(value = "singleSignOnUrl") private String singleSignOnUrl; - /** Creates an instance of LogzOrganizationProperties class. */ + /** + * Creates an instance of LogzOrganizationProperties class. + */ public LogzOrganizationProperties() { } /** * Get the companyName property: Name of the Logz organization. - * + * * @return the companyName value. */ public String companyName() { @@ -49,7 +53,7 @@ public String companyName() { /** * Set the companyName property: Name of the Logz organization. - * + * * @param companyName the companyName value to set. * @return the LogzOrganizationProperties object itself. */ @@ -60,7 +64,7 @@ public LogzOrganizationProperties withCompanyName(String companyName) { /** * Get the id property: Id of the Logz organization. - * + * * @return the id value. */ public String id() { @@ -69,7 +73,7 @@ public String id() { /** * Get the enterpriseAppId property: The Id of the Enterprise App used for Single sign on. - * + * * @return the enterpriseAppId value. */ public String enterpriseAppId() { @@ -78,7 +82,7 @@ public String enterpriseAppId() { /** * Set the enterpriseAppId property: The Id of the Enterprise App used for Single sign on. - * + * * @param enterpriseAppId the enterpriseAppId value to set. * @return the LogzOrganizationProperties object itself. */ @@ -89,7 +93,7 @@ public LogzOrganizationProperties withEnterpriseAppId(String enterpriseAppId) { /** * Get the singleSignOnUrl property: The login URL specific to this Logz Organization. - * + * * @return the singleSignOnUrl value. */ public String singleSignOnUrl() { @@ -98,7 +102,7 @@ public String singleSignOnUrl() { /** * Set the singleSignOnUrl property: The login URL specific to this Logz Organization. - * + * * @param singleSignOnUrl the singleSignOnUrl value to set. * @return the LogzOrganizationProperties object itself. */ @@ -109,7 +113,7 @@ public LogzOrganizationProperties withSingleSignOnUrl(String singleSignOnUrl) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnProperties.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnProperties.java index ec3dd1a7884a..3751a5bd7fc3 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnProperties.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The LogzSingleSignOnProperties model. */ +/** + * The LogzSingleSignOnProperties model. + */ @Fluent public final class LogzSingleSignOnProperties { /* @@ -34,13 +36,15 @@ public final class LogzSingleSignOnProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; - /** Creates an instance of LogzSingleSignOnProperties class. */ + /** + * Creates an instance of LogzSingleSignOnProperties class. + */ public LogzSingleSignOnProperties() { } /** * Get the singleSignOnState property: Various states of the SSO resource. - * + * * @return the singleSignOnState value. */ public SingleSignOnStates singleSignOnState() { @@ -49,7 +53,7 @@ public SingleSignOnStates singleSignOnState() { /** * Set the singleSignOnState property: Various states of the SSO resource. - * + * * @param singleSignOnState the singleSignOnState value to set. * @return the LogzSingleSignOnProperties object itself. */ @@ -60,7 +64,7 @@ public LogzSingleSignOnProperties withSingleSignOnState(SingleSignOnStates singl /** * Get the enterpriseAppId property: The Id of the Enterprise App used for Single sign-on. - * + * * @return the enterpriseAppId value. */ public String enterpriseAppId() { @@ -69,7 +73,7 @@ public String enterpriseAppId() { /** * Set the enterpriseAppId property: The Id of the Enterprise App used for Single sign-on. - * + * * @param enterpriseAppId the enterpriseAppId value to set. * @return the LogzSingleSignOnProperties object itself. */ @@ -80,7 +84,7 @@ public LogzSingleSignOnProperties withEnterpriseAppId(String enterpriseAppId) { /** * Get the singleSignOnUrl property: The login URL specific to this Logz Organization. - * + * * @return the singleSignOnUrl value. */ public String singleSignOnUrl() { @@ -89,7 +93,7 @@ public String singleSignOnUrl() { /** * Set the singleSignOnUrl property: The login URL specific to this Logz Organization. - * + * * @param singleSignOnUrl the singleSignOnUrl value to set. * @return the LogzSingleSignOnProperties object itself. */ @@ -100,7 +104,7 @@ public LogzSingleSignOnProperties withSingleSignOnUrl(String singleSignOnUrl) { /** * Get the provisioningState property: Flag specifying if the resource provisioning state as tracked by ARM. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -109,7 +113,7 @@ public ProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnResource.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnResource.java index 49396b5bbeaa..0b27755e5e36 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnResource.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnResource.java @@ -8,77 +8,90 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.logz.fluent.models.LogzSingleSignOnResourceInner; -/** An immutable client-side representation of LogzSingleSignOnResource. */ +/** + * An immutable client-side representation of LogzSingleSignOnResource. + */ public interface LogzSingleSignOnResource { /** * 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: Metadata pertaining to creation and last modification of the resource. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the properties property: The properties property. - * + * * @return the properties value. */ LogzSingleSignOnProperties properties(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.logz.fluent.models.LogzSingleSignOnResourceInner object. - * + * * @return the inner object. */ LogzSingleSignOnResourceInner innerModel(); - /** The entirety of the LogzSingleSignOnResource definition. */ + /** + * The entirety of the LogzSingleSignOnResource definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The LogzSingleSignOnResource definition stages. */ + + /** + * The LogzSingleSignOnResource definition stages. + */ interface DefinitionStages { - /** The first stage of the LogzSingleSignOnResource definition. */ + /** + * The first stage of the LogzSingleSignOnResource definition. + */ interface Blank extends WithParentResource { } - /** The stage of the LogzSingleSignOnResource definition allowing to specify parent resource. */ + + /** + * The stage of the LogzSingleSignOnResource 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. */ WithCreate withExistingMonitor(String resourceGroupName, String monitorName); } + /** * The stage of the LogzSingleSignOnResource definition which contains all the minimum required properties for * the resource to be created, but also allows for any other optional properties to be specified. @@ -86,77 +99,89 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ LogzSingleSignOnResource create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ LogzSingleSignOnResource create(Context context); } - /** The stage of the LogzSingleSignOnResource definition allowing to specify properties. */ + + /** + * The stage of the LogzSingleSignOnResource definition allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: The properties property.. - * + * * @param properties The properties property. * @return the next definition stage. */ WithCreate withProperties(LogzSingleSignOnProperties properties); } } + /** * Begins update for the LogzSingleSignOnResource resource. - * + * * @return the stage of resource update. */ LogzSingleSignOnResource.Update update(); - /** The template for LogzSingleSignOnResource update. */ + /** + * The template for LogzSingleSignOnResource update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ LogzSingleSignOnResource apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ LogzSingleSignOnResource apply(Context context); } - /** The LogzSingleSignOnResource update stages. */ + + /** + * The LogzSingleSignOnResource update stages. + */ interface UpdateStages { - /** The stage of the LogzSingleSignOnResource update allowing to specify properties. */ + /** + * The stage of the LogzSingleSignOnResource update allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: The properties property.. - * + * * @param properties The properties property. * @return the next definition stage. */ Update withProperties(LogzSingleSignOnProperties properties); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ LogzSingleSignOnResource 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/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnResourceListResponse.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnResourceListResponse.java index 2fa59ce0260d..e05ced87c653 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnResourceListResponse.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/LogzSingleSignOnResourceListResponse.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Response of a list operation. */ +/** + * Response of a list operation. + */ @Fluent public final class LogzSingleSignOnResourceListResponse { /* @@ -24,13 +26,15 @@ public final class LogzSingleSignOnResourceListResponse { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of LogzSingleSignOnResourceListResponse class. */ + /** + * Creates an instance of LogzSingleSignOnResourceListResponse class. + */ public LogzSingleSignOnResourceListResponse() { } /** * Get the value property: Results of a list operation. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: Results of a list operation. - * + * * @param value the value value to set. * @return the LogzSingleSignOnResourceListResponse object itself. */ @@ -50,7 +54,7 @@ public LogzSingleSignOnResourceListResponse withValue(List { - /** Static value SystemAssigned for ManagedIdentityTypes. */ + /** + * Static value SystemAssigned for ManagedIdentityTypes. + */ public static final ManagedIdentityTypes SYSTEM_ASSIGNED = fromString("SystemAssigned"); - /** Static value UserAssigned for ManagedIdentityTypes. */ + /** + * Static value UserAssigned for ManagedIdentityTypes. + */ public static final ManagedIdentityTypes USER_ASSIGNED = fromString("UserAssigned"); /** * Creates a new instance of ManagedIdentityTypes value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public ManagedIdentityTypes() { /** * Creates or finds a ManagedIdentityTypes from its string representation. - * + * * @param name a name to look for. * @return the corresponding ManagedIdentityTypes. */ @@ -38,7 +44,7 @@ public static ManagedIdentityTypes fromString(String name) { /** * Gets known ManagedIdentityTypes values. - * + * * @return known ManagedIdentityTypes values. */ public static Collection values() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MarketplaceSubscriptionStatus.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MarketplaceSubscriptionStatus.java index ba7fca47a994..23c17595b6ae 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MarketplaceSubscriptionStatus.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MarketplaceSubscriptionStatus.java @@ -13,15 +13,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,7 +34,7 @@ public MarketplaceSubscriptionStatus() { /** * Creates or finds a MarketplaceSubscriptionStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding MarketplaceSubscriptionStatus. */ @@ -41,7 +45,7 @@ public static MarketplaceSubscriptionStatus fromString(String name) { /** * Gets known MarketplaceSubscriptionStatus values. - * + * * @return known MarketplaceSubscriptionStatus values. */ public static Collection values() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorOperations.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorOperations.java index da26783c1940..226cc6a5a114 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorOperations.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorOperations.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of MonitorOperations. */ +/** + * Resource collection API of MonitorOperations. + */ public interface MonitorOperations { /** * Returns the payload that needs to be passed in the request body for installing Logz.io 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. @@ -21,12 +23,12 @@ public interface MonitorOperations { * @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}. */ - Response vMHostPayloadWithResponse( - String resourceGroupName, String monitorName, Context context); + Response vMHostPayloadWithResponse(String resourceGroupName, String monitorName, + Context context); /** * Returns the payload that needs to be passed in the request body for installing Logz.io 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. @@ -38,7 +40,7 @@ Response vMHostPayloadWithResponse( /** * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -50,7 +52,7 @@ Response vMHostPayloadWithResponse( /** * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Request body to update the collection for agent installed in the given monitor. @@ -60,12 +62,12 @@ Response vMHostPayloadWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. */ - PagedIterable listVmHostUpdate( - String resourceGroupName, String monitorName, VMHostUpdateRequest body, Context context); + PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, VMHostUpdateRequest body, + Context context); /** * List the compute resources currently being monitored by the Logz main account 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. @@ -77,7 +79,7 @@ PagedIterable listVmHostUpdate( /** * List the compute resources currently being monitored by the Logz main account 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. diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorProperties.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorProperties.java index 57bef4eb0e61..65a8f2748ca1 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorProperties.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties specific to the monitor resource. */ +/** + * Properties specific to the monitor resource. + */ @Fluent public final class MonitorProperties { /* @@ -59,13 +61,15 @@ public final class MonitorProperties { @JsonProperty(value = "liftrResourcePreference", access = JsonProperty.Access.WRITE_ONLY) private Integer liftrResourcePreference; - /** Creates an instance of MonitorProperties class. */ + /** + * Creates an instance of MonitorProperties class. + */ public MonitorProperties() { } /** * Get the provisioningState property: Flag specifying if the resource provisioning state as tracked by ARM. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -74,7 +78,7 @@ public ProvisioningState provisioningState() { /** * Get the monitoringStatus property: Flag specifying if the resource monitoring is enabled or disabled. - * + * * @return the monitoringStatus value. */ public MonitoringStatus monitoringStatus() { @@ -83,7 +87,7 @@ public MonitoringStatus monitoringStatus() { /** * Set the monitoringStatus property: Flag specifying if the resource monitoring is enabled or disabled. - * + * * @param monitoringStatus the monitoringStatus value to set. * @return the MonitorProperties object itself. */ @@ -95,7 +99,7 @@ public MonitorProperties withMonitoringStatus(MonitoringStatus monitoringStatus) /** * Get the marketplaceSubscriptionStatus property: Flag specifying the Marketplace Subscription Status of the * resource. If payment is not made in time, the resource will go in Suspended state. - * + * * @return the marketplaceSubscriptionStatus value. */ public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() { @@ -105,19 +109,19 @@ public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() { /** * Set the marketplaceSubscriptionStatus property: Flag specifying the Marketplace Subscription Status of the * resource. If payment is not made in time, the resource will go in Suspended state. - * + * * @param marketplaceSubscriptionStatus the marketplaceSubscriptionStatus value to set. * @return the MonitorProperties object itself. */ - public MonitorProperties withMarketplaceSubscriptionStatus( - MarketplaceSubscriptionStatus marketplaceSubscriptionStatus) { + public MonitorProperties + withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus marketplaceSubscriptionStatus) { this.marketplaceSubscriptionStatus = marketplaceSubscriptionStatus; return this; } /** * Get the logzOrganizationProperties property: The logzOrganizationProperties property. - * + * * @return the logzOrganizationProperties value. */ public LogzOrganizationProperties logzOrganizationProperties() { @@ -126,7 +130,7 @@ public LogzOrganizationProperties logzOrganizationProperties() { /** * Set the logzOrganizationProperties property: The logzOrganizationProperties property. - * + * * @param logzOrganizationProperties the logzOrganizationProperties value to set. * @return the MonitorProperties object itself. */ @@ -137,7 +141,7 @@ public MonitorProperties withLogzOrganizationProperties(LogzOrganizationProperti /** * Get the userInfo property: The userInfo property. - * + * * @return the userInfo value. */ public UserInfo userInfo() { @@ -146,7 +150,7 @@ public UserInfo userInfo() { /** * Set the userInfo property: The userInfo property. - * + * * @param userInfo the userInfo value to set. * @return the MonitorProperties object itself. */ @@ -157,7 +161,7 @@ public MonitorProperties withUserInfo(UserInfo userInfo) { /** * Get the planData property: The planData property. - * + * * @return the planData value. */ public PlanData planData() { @@ -166,7 +170,7 @@ public PlanData planData() { /** * Set the planData property: The planData property. - * + * * @param planData the planData value to set. * @return the MonitorProperties object itself. */ @@ -177,7 +181,7 @@ public MonitorProperties withPlanData(PlanData planData) { /** * Get the liftrResourceCategory property: The liftrResourceCategory property. - * + * * @return the liftrResourceCategory value. */ public LiftrResourceCategories liftrResourceCategory() { @@ -186,7 +190,7 @@ public LiftrResourceCategories liftrResourceCategory() { /** * Get the liftrResourcePreference property: The priority of the resource. - * + * * @return the liftrResourcePreference value. */ public Integer liftrResourcePreference() { @@ -195,7 +199,7 @@ public Integer liftrResourcePreference() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorUpdateProperties.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorUpdateProperties.java index edb0ee935b4b..997f3b854043 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorUpdateProperties.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitorUpdateProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The set of properties that can be update in a PATCH request to a monitor resource. */ +/** + * The set of properties that can be update in a PATCH request to a monitor resource. + */ @Fluent public final class MonitorUpdateProperties { /* @@ -16,13 +18,15 @@ public final class MonitorUpdateProperties { @JsonProperty(value = "monitoringStatus") private MonitoringStatus monitoringStatus; - /** Creates an instance of MonitorUpdateProperties class. */ + /** + * Creates an instance of MonitorUpdateProperties class. + */ public MonitorUpdateProperties() { } /** * Get the monitoringStatus property: Flag specifying if the resource monitoring is enabled or disabled. - * + * * @return the monitoringStatus value. */ public MonitoringStatus monitoringStatus() { @@ -31,7 +35,7 @@ public MonitoringStatus monitoringStatus() { /** * Set the monitoringStatus property: Flag specifying if the resource monitoring is enabled or disabled. - * + * * @param monitoringStatus the monitoringStatus value to set. * @return the MonitorUpdateProperties object itself. */ @@ -42,7 +46,7 @@ public MonitorUpdateProperties withMonitoringStatus(MonitoringStatus monitoringS /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoredResource.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoredResource.java index b71a24013726..355d9e1cd0f2 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoredResource.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoredResource.java @@ -7,18 +7,20 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.logz.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 Logz. - * + * * @return the sendingMetrics value. */ Boolean sendingMetrics(); @@ -26,35 +28,35 @@ 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 Logz. - * + * * @return the sendingLogs value. */ Boolean sendingLogs(); /** * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * * @return the systemData value. */ SystemData systemData(); /** * 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.logz.fluent.models.MonitoredResourceInner object. - * + * * @return the inner object. */ MonitoredResourceInner innerModel(); diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoredResourceListResponse.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoredResourceListResponse.java index 4551a148d7dd..a4a94f73e980 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoredResourceListResponse.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoredResourceListResponse.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Response of a list operation. */ +/** + * Response of a list operation. + */ @Fluent public final class MonitoredResourceListResponse { /* @@ -24,13 +26,15 @@ public final class MonitoredResourceListResponse { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of MonitoredResourceListResponse class. */ + /** + * Creates an instance of MonitoredResourceListResponse class. + */ public MonitoredResourceListResponse() { } /** * Get the value property: Results of a list operation. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: Results of a list operation. - * + * * @param value the value value to set. * @return the MonitoredResourceListResponse object itself. */ @@ -50,7 +54,7 @@ public MonitoredResourceListResponse withValue(List valu /** * Get the nextLink property: Link to the next set of results, if any. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Set the nextLink property: Link to the next set of results, if any. - * + * * @param nextLink the nextLink value to set. * @return the MonitoredResourceListResponse object itself. */ @@ -70,7 +74,7 @@ public MonitoredResourceListResponse withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringStatus.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringStatus.java index 182aeb2b2bb7..c35024d303d4 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringStatus.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringStatus.java @@ -8,17 +8,23 @@ 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,7 +33,7 @@ public MonitoringStatus() { /** * Creates or finds a MonitoringStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding MonitoringStatus. */ @@ -38,7 +44,7 @@ public static MonitoringStatus fromString(String name) { /** * Gets known MonitoringStatus values. - * + * * @return known MonitoringStatus values. */ public static Collection values() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRules.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRules.java index b24ecd35196d..5e8dc28bebe1 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRules.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRules.java @@ -8,77 +8,90 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner; -/** An immutable client-side representation of MonitoringTagRules. */ +/** + * An immutable client-side representation of MonitoringTagRules. + */ public interface MonitoringTagRules { /** * 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: The system metadata relating to this resource. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the properties property: Definition of the properties for a TagRules resource. - * + * * @return the properties value. */ MonitoringTagRulesProperties properties(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner object. - * + * * @return the inner object. */ MonitoringTagRulesInner innerModel(); - /** The entirety of the MonitoringTagRules definition. */ + /** + * The entirety of the MonitoringTagRules definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The MonitoringTagRules definition stages. */ + + /** + * The MonitoringTagRules definition stages. + */ interface DefinitionStages { - /** The first stage of the MonitoringTagRules definition. */ + /** + * The first stage of the MonitoringTagRules definition. + */ interface Blank extends WithParentResource { } - /** The stage of the MonitoringTagRules definition allowing to specify parent resource. */ + + /** + * The stage of the MonitoringTagRules 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. */ WithCreate withExistingMonitor(String resourceGroupName, String monitorName); } + /** * The stage of the MonitoringTagRules definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. @@ -86,77 +99,89 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ MonitoringTagRules create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ MonitoringTagRules create(Context context); } - /** The stage of the MonitoringTagRules definition allowing to specify properties. */ + + /** + * The stage of the MonitoringTagRules definition allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: Definition of the properties for a TagRules resource.. - * + * * @param properties Definition of the properties for a TagRules resource. * @return the next definition stage. */ WithCreate withProperties(MonitoringTagRulesProperties properties); } } + /** * Begins update for the MonitoringTagRules resource. - * + * * @return the stage of resource update. */ MonitoringTagRules.Update update(); - /** The template for MonitoringTagRules update. */ + /** + * The template for MonitoringTagRules update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ MonitoringTagRules apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ MonitoringTagRules apply(Context context); } - /** The MonitoringTagRules update stages. */ + + /** + * The MonitoringTagRules update stages. + */ interface UpdateStages { - /** The stage of the MonitoringTagRules update allowing to specify properties. */ + /** + * The stage of the MonitoringTagRules update allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: Definition of the properties for a TagRules resource.. - * + * * @param properties Definition of the properties for a TagRules resource. * @return the next definition stage. */ Update withProperties(MonitoringTagRulesProperties properties); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ MonitoringTagRules 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/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRulesListResponse.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRulesListResponse.java index e5dc84bc4f7f..c67465d5cda0 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRulesListResponse.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRulesListResponse.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Response of a list operation. */ +/** + * Response of a list operation. + */ @Fluent public final class MonitoringTagRulesListResponse { /* @@ -24,13 +26,15 @@ public final class MonitoringTagRulesListResponse { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of MonitoringTagRulesListResponse class. */ + /** + * Creates an instance of MonitoringTagRulesListResponse class. + */ public MonitoringTagRulesListResponse() { } /** * Get the value property: Results of a list operation. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: Results of a list operation. - * + * * @param value the value value to set. * @return the MonitoringTagRulesListResponse object itself. */ @@ -50,7 +54,7 @@ public MonitoringTagRulesListResponse withValue(List va /** * Get the nextLink property: Link to the next set of results, if any. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Set the nextLink property: Link to the next set of results, if any. - * + * * @param nextLink the nextLink value to set. * @return the MonitoringTagRulesListResponse object itself. */ @@ -70,7 +74,7 @@ public MonitoringTagRulesListResponse withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRulesProperties.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRulesProperties.java index 7bf4bb87e808..cbf83288f81d 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRulesProperties.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/MonitoringTagRulesProperties.java @@ -8,7 +8,9 @@ import com.azure.core.management.SystemData; import com.fasterxml.jackson.annotation.JsonProperty; -/** Definition of the properties for a TagRules resource. */ +/** + * Definition of the properties for a TagRules resource. + */ @Fluent public final class MonitoringTagRulesProperties { /* @@ -29,13 +31,15 @@ public final class MonitoringTagRulesProperties { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of MonitoringTagRulesProperties class. */ + /** + * Creates an instance of MonitoringTagRulesProperties class. + */ public MonitoringTagRulesProperties() { } /** * Get the provisioningState property: Flag specifying if the resource provisioning state as tracked by ARM. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -44,7 +48,7 @@ public ProvisioningState provisioningState() { /** * Get the logRules property: Set of rules for sending logs for the Monitor resource. - * + * * @return the logRules value. */ public LogRules logRules() { @@ -53,7 +57,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. */ @@ -64,7 +68,7 @@ public MonitoringTagRulesProperties withLogRules(LogRules logRules) { /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -73,7 +77,7 @@ public SystemData systemData() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/Monitors.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/Monitors.java index 66632d35cea6..8997712f583d 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/Monitors.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/Monitors.java @@ -8,11 +8,13 @@ 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 Logz 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. @@ -24,7 +26,7 @@ public interface Monitors { /** * List the resources currently being monitored by the Logz 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. @@ -33,12 +35,12 @@ public interface Monitors { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of a list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listMonitoredResources( - String resourceGroupName, String monitorName, Context context); + PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + Context context); /** * List all monitors under the specified subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of a list operation as paginated response with {@link PagedIterable}. @@ -47,7 +49,7 @@ PagedIterable listMonitoredResources( /** * List all monitors under the specified subscription. - * + * * @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. @@ -58,7 +60,7 @@ PagedIterable listMonitoredResources( /** * List all monitors under the specified 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. @@ -69,7 +71,7 @@ PagedIterable listMonitoredResources( /** * List all monitors under the specified 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. @@ -81,7 +83,7 @@ PagedIterable listMonitoredResources( /** * Get the properties of a specific 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. @@ -90,12 +92,12 @@ PagedIterable listMonitoredResources( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a specific monitor resource along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String monitorName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String monitorName, + Context context); /** * Get the properties of a specific 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. @@ -107,7 +109,7 @@ Response getByResourceGroupWithResponse( /** * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. - * + * * @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. @@ -118,7 +120,7 @@ Response getByResourceGroupWithResponse( /** * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. - * + * * @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. @@ -130,7 +132,7 @@ Response getByResourceGroupWithResponse( /** * List the user's roles configured on Logz.io side for the account corresponding to the 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. @@ -142,7 +144,7 @@ Response getByResourceGroupWithResponse( /** * List the user's roles configured on Logz.io side for the account corresponding to the monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param body Request for checking user's role for Logz.io account. @@ -152,12 +154,12 @@ Response getByResourceGroupWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response for list of user's role for Logz.io account as paginated response with {@link PagedIterable}. */ - PagedIterable listUserRoles( - String resourceGroupName, String monitorName, UserRoleRequest body, Context context); + PagedIterable listUserRoles(String resourceGroupName, String monitorName, UserRoleRequest body, + Context context); /** * Get the properties of a specific monitor resource. - * + * * @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. @@ -168,7 +170,7 @@ PagedIterable listUserRoles( /** * Get the properties of a specific monitor resource. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -180,7 +182,7 @@ PagedIterable listUserRoles( /** * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. - * + * * @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. @@ -190,7 +192,7 @@ PagedIterable listUserRoles( /** * Delete a monitor resource. This delete operation can take upto 10 minutes to complete. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -201,7 +203,7 @@ PagedIterable listUserRoles( /** * Begins definition for a new LogzMonitorResource resource. - * + * * @param name resource name. * @return the first stage of the new LogzMonitorResource definition. */ diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationDisplay.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationDisplay.java index da168bfa69c2..73814a8d4390 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationDisplay.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationDisplay.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The object that represents the operation. */ +/** + * The object that represents the operation. + */ @Fluent public final class OperationDisplay { /* @@ -34,13 +36,15 @@ public final class OperationDisplay { @JsonProperty(value = "description") private String description; - /** Creates an instance of OperationDisplay class. */ + /** + * Creates an instance of OperationDisplay class. + */ public OperationDisplay() { } /** * Get the provider property: Service provider, i.e., Microsoft.Logz. - * + * * @return the provider value. */ public String provider() { @@ -49,7 +53,7 @@ public String provider() { /** * Set the provider property: Service provider, i.e., Microsoft.Logz. - * + * * @param provider the provider value to set. * @return the OperationDisplay object itself. */ @@ -60,7 +64,7 @@ public OperationDisplay withProvider(String provider) { /** * Get the resource property: Type on which the operation is performed, e.g., 'monitors'. - * + * * @return the resource value. */ public String resource() { @@ -69,7 +73,7 @@ public String resource() { /** * Set the resource property: Type on which the operation is performed, e.g., 'monitors'. - * + * * @param resource the resource value to set. * @return the OperationDisplay object itself. */ @@ -80,7 +84,7 @@ public OperationDisplay withResource(String resource) { /** * Get the operation property: Operation type, e.g., read, write, delete, etc. - * + * * @return the operation value. */ public String operation() { @@ -89,7 +93,7 @@ public String operation() { /** * Set the operation property: Operation type, e.g., read, write, delete, etc. - * + * * @param operation the operation value to set. * @return the OperationDisplay object itself. */ @@ -100,7 +104,7 @@ public OperationDisplay withOperation(String operation) { /** * Get the description property: Description of the operation, e.g., 'Write monitors'. - * + * * @return the description value. */ public String description() { @@ -109,7 +113,7 @@ public String description() { /** * Set the description property: Description of the operation, e.g., 'Write monitors'. - * + * * @param description the description value to set. * @return the OperationDisplay object itself. */ @@ -120,7 +124,7 @@ public OperationDisplay withDescription(String description) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationListResult.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationListResult.java index 70bc80319a99..42f74c78c82e 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationListResult.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Result of GET request to list the Microsoft.Logz operations. */ +/** + * Result of GET request to list the Microsoft.Logz operations. + */ @Fluent public final class OperationListResult { /* @@ -24,13 +26,15 @@ public final class OperationListResult { @JsonProperty(value = "nextLink") 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 Microsoft.Logz provider. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: List of operations supported by the Microsoft.Logz provider. - * + * * @param value the value value to set. * @return the OperationListResult object itself. */ @@ -50,7 +54,7 @@ public OperationListResult withValue(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() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Set the nextLink property: URL to get the next set of operation list results if there are any. - * + * * @param nextLink the nextLink value to set. * @return the OperationListResult object itself. */ @@ -70,7 +74,7 @@ public OperationListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationResult.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationResult.java index 28a747bd9369..6074920249c7 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationResult.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/OperationResult.java @@ -6,39 +6,41 @@ import com.azure.resourcemanager.logz.fluent.models.OperationResultInner; -/** An immutable client-side representation of OperationResult. */ +/** + * An immutable client-side representation of OperationResult. + */ public interface OperationResult { /** * Gets the name property: Operation name, i.e., {provider}/{resource}/{operation}. - * + * * @return the name value. */ String name(); /** * Gets the isDataAction property: Indicates whether the operation is a data action. - * + * * @return the isDataAction value. */ Boolean isDataAction(); /** * Gets the display property: The object that represents the operation. - * + * * @return the display value. */ OperationDisplay display(); /** * Gets the origin property: Origin of the operation. - * + * * @return the origin value. */ String origin(); /** * Gets the inner com.azure.resourcemanager.logz.fluent.models.OperationResultInner object. - * + * * @return the inner object. */ OperationResultInner innerModel(); diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/Operations.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/Operations.java index 58229803d1c5..b172f31e3bbc 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/Operations.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/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 all operations provided by Microsoft.Logz. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of GET request to list the Microsoft.Logz operations as paginated response with {@link - * PagedIterable}. + * @return result of GET request to list the Microsoft.Logz operations as paginated response with + * {@link PagedIterable}. */ PagedIterable list(); /** * List all operations provided by Microsoft.Logz. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of GET request to list the Microsoft.Logz operations as paginated response with {@link - * PagedIterable}. + * @return result of GET request to list the Microsoft.Logz operations as paginated response with + * {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/PlanData.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/PlanData.java index 5d5874f9b913..2acb3b39f36d 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/PlanData.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/PlanData.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** The PlanData model. */ +/** + * The PlanData model. + */ @Fluent public final class PlanData { /* @@ -35,13 +37,15 @@ public final class PlanData { @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 +54,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 +65,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 +74,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 +85,7 @@ public PlanData withBillingCycle(String billingCycle) { /** * Get the planDetails property: plan id as published by Logz. - * + * * @return the planDetails value. */ public String planDetails() { @@ -90,7 +94,7 @@ public String planDetails() { /** * Set the planDetails property: plan id as published by Logz. - * + * * @param planDetails the planDetails value to set. * @return the PlanData object itself. */ @@ -101,7 +105,7 @@ public PlanData withPlanDetails(String planDetails) { /** * Get the effectiveDate property: date when plan was applied. - * + * * @return the effectiveDate value. */ public OffsetDateTime effectiveDate() { @@ -110,7 +114,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,7 +125,7 @@ public PlanData withEffectiveDate(OffsetDateTime effectiveDate) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/ProvisioningState.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/ProvisioningState.java index 64514820740c..c223a36435fe 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/ProvisioningState.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/ProvisioningState.java @@ -8,38 +8,58 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Flag specifying if the resource provisioning state as tracked by ARM. */ +/** + * Flag specifying if the resource provisioning state as tracked by ARM. + */ 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,7 +68,7 @@ public ProvisioningState() { /** * Creates or finds a ProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ProvisioningState. */ @@ -59,7 +79,7 @@ public static ProvisioningState fromString(String name) { /** * Gets known ProvisioningState values. - * + * * @return known ProvisioningState values. */ public static Collection values() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SingleSignOnStates.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SingleSignOnStates.java index 83e1813c74a4..5500a39c0ca0 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SingleSignOnStates.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SingleSignOnStates.java @@ -8,23 +8,33 @@ 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,7 +43,7 @@ public SingleSignOnStates() { /** * Creates or finds a SingleSignOnStates from its string representation. - * + * * @param name a name to look for. * @return the corresponding SingleSignOnStates. */ @@ -44,7 +54,7 @@ public static SingleSignOnStates fromString(String name) { /** * Gets known SingleSignOnStates values. - * + * * @return known SingleSignOnStates values. */ public static Collection values() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SingleSignOns.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SingleSignOns.java index 80f928468600..005b9892fdc4 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SingleSignOns.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/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 { /** * List the single sign-on configurations for a given 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. @@ -24,7 +26,7 @@ public interface SingleSignOns { /** * List the single sign-on configurations for a given 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. @@ -37,7 +39,7 @@ public interface SingleSignOns { /** * Gets the Logz single sign-on resource for the given Monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -47,12 +49,12 @@ public interface SingleSignOns { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Logz single sign-on resource for the given Monitor along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String monitorName, String configurationName, Context context); + Response getWithResponse(String resourceGroupName, String monitorName, + String configurationName, Context context); /** * Gets the Logz single sign-on resource for the given Monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param configurationName The configurationName parameter. @@ -65,7 +67,7 @@ Response getWithResponse( /** * Gets the Logz single sign-on resource for the given Monitor. - * + * * @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. @@ -76,7 +78,7 @@ Response getWithResponse( /** * Gets the Logz single sign-on resource for the given Monitor. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -88,7 +90,7 @@ Response getWithResponse( /** * Begins definition for a new LogzSingleSignOnResource resource. - * + * * @param name resource name. * @return the first stage of the new LogzSingleSignOnResource definition. */ diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRules.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRules.java index d965d1f74bc7..5dc1326a80fe 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRules.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRules.java @@ -9,11 +9,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner; -/** Resource collection API of SubAccountTagRules. */ +/** + * Resource collection API of SubAccountTagRules. + */ public interface SubAccountTagRules { /** * List the tag rules for a given sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -26,7 +28,7 @@ public interface SubAccountTagRules { /** * List the tag rules for a given sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -36,12 +38,12 @@ public interface SubAccountTagRules { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of a list operation as paginated response with {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, String monitorName, String subAccountName, Context context); + PagedIterable list(String resourceGroupName, String monitorName, String subAccountName, + Context context); /** * Create or update a tag rule set for a given sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -53,17 +55,12 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return capture logs and metrics of Azure resources based on ARM tags along with {@link Response}. */ - Response createOrUpdateWithResponse( - String resourceGroupName, - String monitorName, - String subAccountName, - String ruleSetName, - MonitoringTagRulesInner body, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, MonitoringTagRulesInner body, Context context); /** * Create or update a tag rule set for a given sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -73,12 +70,12 @@ Response createOrUpdateWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return capture logs and metrics of Azure resources based on ARM tags. */ - MonitoringTagRules createOrUpdate( - String resourceGroupName, String monitorName, String subAccountName, String ruleSetName); + MonitoringTagRules createOrUpdate(String resourceGroupName, String monitorName, String subAccountName, + String ruleSetName); /** * Get a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -89,12 +86,12 @@ MonitoringTagRules createOrUpdate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a tag rule set for a given monitor resource along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String monitorName, String subAccountName, String ruleSetName, Context context); + Response getWithResponse(String resourceGroupName, String monitorName, String subAccountName, + String ruleSetName, Context context); /** * Get a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -108,7 +105,7 @@ Response getWithResponse( /** * Delete a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -119,12 +116,12 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - SubAccountTagRulesDeleteResponse deleteWithResponse( - String resourceGroupName, String monitorName, String subAccountName, String ruleSetName, Context context); + SubAccountTagRulesDeleteResponse deleteWithResponse(String resourceGroupName, String monitorName, + String subAccountName, String ruleSetName, Context context); /** * Delete a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRulesDeleteHeaders.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRulesDeleteHeaders.java index e9c129d84638..9dd14c4c014d 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRulesDeleteHeaders.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRulesDeleteHeaders.java @@ -9,7 +9,9 @@ import com.azure.core.http.HttpHeaders; import com.fasterxml.jackson.annotation.JsonProperty; -/** The SubAccountTagRulesDeleteHeaders model. */ +/** + * The SubAccountTagRulesDeleteHeaders model. + */ @Fluent public final class SubAccountTagRulesDeleteHeaders { /* @@ -21,7 +23,7 @@ public final class SubAccountTagRulesDeleteHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of SubAccountTagRulesDeleteHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public SubAccountTagRulesDeleteHeaders(HttpHeaders rawHeaders) { @@ -30,7 +32,7 @@ public SubAccountTagRulesDeleteHeaders(HttpHeaders rawHeaders) { /** * Get the location property: The location property. - * + * * @return the location value. */ public String location() { @@ -39,7 +41,7 @@ public String location() { /** * Set the location property: The location property. - * + * * @param location the location value to set. * @return the SubAccountTagRulesDeleteHeaders object itself. */ @@ -50,7 +52,7 @@ public SubAccountTagRulesDeleteHeaders withLocation(String location) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRulesDeleteResponse.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRulesDeleteResponse.java index b0a654b40416..1afaa1a2607d 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRulesDeleteResponse.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccountTagRulesDeleteResponse.java @@ -8,22 +8,20 @@ import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; -/** Contains all response data for the delete operation. */ +/** + * Contains all response data for the delete operation. + */ public final class SubAccountTagRulesDeleteResponse extends ResponseBase { /** * Creates an instance of SubAccountTagRulesDeleteResponse. - * + * * @param request the request which resulted in this SubAccountTagRulesDeleteResponse. * @param statusCode the status code of the HTTP response. * @param rawHeaders the raw headers of the HTTP response. * @param value the deserialized value of the HTTP response. * @param headers the deserialized headers of the HTTP response. */ - public SubAccountTagRulesDeleteResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - Void value, + public SubAccountTagRulesDeleteResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, SubAccountTagRulesDeleteHeaders headers) { super(request, statusCode, rawHeaders, value, headers); } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccounts.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccounts.java index 3beac40830b9..bd98b03d794f 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccounts.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/SubAccounts.java @@ -9,11 +9,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.logz.fluent.models.LogzMonitorResourceInner; -/** Resource collection API of SubAccounts. */ +/** + * Resource collection API of SubAccounts. + */ public interface SubAccounts { /** * List the sub account under a given 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. @@ -25,7 +27,7 @@ public interface SubAccounts { /** * List the sub account under a given 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. @@ -38,7 +40,7 @@ public interface SubAccounts { /** * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -51,7 +53,7 @@ public interface SubAccounts { /** * Create sub account under a given monitor resource. This create operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -62,16 +64,12 @@ public interface SubAccounts { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - LogzMonitorResource create( - String resourceGroupName, - String monitorName, - String subAccountName, - LogzMonitorResourceInner body, - Context context); + LogzMonitorResource create(String resourceGroupName, String monitorName, String subAccountName, + LogzMonitorResourceInner body, Context context); /** * Get a sub account under a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -81,12 +79,12 @@ LogzMonitorResource create( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a sub account under a given monitor resource along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String monitorName, String subAccountName, Context context); + Response getWithResponse(String resourceGroupName, String monitorName, String subAccountName, + Context context); /** * Get a sub account under a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -99,7 +97,7 @@ Response getWithResponse( /** * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -111,7 +109,7 @@ Response getWithResponse( /** * Delete a sub account resource. This delete operation can take upto 10 minutes to complete. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -124,7 +122,7 @@ Response getWithResponse( /** * Update a monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -135,16 +133,12 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link Response}. */ - Response updateWithResponse( - String resourceGroupName, - String monitorName, - String subAccountName, - LogzMonitorResourceUpdateParameters body, - Context context); + Response updateWithResponse(String resourceGroupName, String monitorName, + String subAccountName, LogzMonitorResourceUpdateParameters body, Context context); /** * Update a monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -157,7 +151,7 @@ Response updateWithResponse( /** * List the resources currently being monitored by the Logz sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -166,12 +160,12 @@ Response updateWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of a list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listMonitoredResources( - String resourceGroupName, String monitorName, String subAccountName); + PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + String subAccountName); /** * List the resources currently being monitored by the Logz sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -181,12 +175,12 @@ PagedIterable listMonitoredResources( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of a list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listMonitoredResources( - String resourceGroupName, String monitorName, String subAccountName, Context context); + PagedIterable listMonitoredResources(String resourceGroupName, String monitorName, + String subAccountName, Context context); /** * Returns the payload that needs to be passed as a request for installing Logz.io agent on a VM. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -196,12 +190,12 @@ PagedIterable listMonitoredResources( * @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}. */ - Response vMHostPayloadWithResponse( - String resourceGroupName, String monitorName, String subAccountName, Context context); + Response vMHostPayloadWithResponse(String resourceGroupName, String monitorName, + String subAccountName, Context context); /** * Returns the payload that needs to be passed as a request for installing Logz.io agent on a VM. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -214,7 +208,7 @@ Response vMHostPayloadWithResponse( /** * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -227,7 +221,7 @@ Response vMHostPayloadWithResponse( /** * Sending request to update the collection when Logz.io agent has been installed on a VM for a given monitor. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -238,12 +232,12 @@ Response vMHostPayloadWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. */ - PagedIterable listVmHostUpdate( - String resourceGroupName, String monitorName, String subAccountName, VMHostUpdateRequest body, Context context); + PagedIterable listVmHostUpdate(String resourceGroupName, String monitorName, String subAccountName, + VMHostUpdateRequest body, Context context); /** * List the compute resources currently being monitored by the Logz sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -256,7 +250,7 @@ PagedIterable listVmHostUpdate( /** * List the compute resources currently being monitored by the Logz sub account resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param subAccountName Sub Account resource name. @@ -266,6 +260,6 @@ PagedIterable listVmHostUpdate( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response of a list VM Host Update Operation as paginated response with {@link PagedIterable}. */ - PagedIterable listVMHosts( - String resourceGroupName, String monitorName, String subAccountName, Context context); + PagedIterable listVMHosts(String resourceGroupName, String monitorName, String subAccountName, + Context context); } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagAction.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagAction.java index 6b861bd057ae..2b094113465e 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagAction.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagAction.java @@ -8,17 +8,23 @@ 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,7 +33,7 @@ public TagAction() { /** * Creates or finds a TagAction from its string representation. - * + * * @param name a name to look for. * @return the corresponding TagAction. */ @@ -38,7 +44,7 @@ public static TagAction fromString(String name) { /** * Gets known TagAction values. - * + * * @return known TagAction values. */ public static Collection values() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRules.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRules.java index 38dff65c7f71..18327d04aba0 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRules.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/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 { /** * List the tag rules for a given 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. @@ -24,7 +26,7 @@ public interface TagRules { /** * List the tag rules for a given 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. @@ -37,7 +39,7 @@ public interface TagRules { /** * Get a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -47,12 +49,12 @@ public interface TagRules { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a tag rule set for a given monitor resource along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String monitorName, String ruleSetName, Context context); + Response getWithResponse(String resourceGroupName, String monitorName, String ruleSetName, + Context context); /** * Get a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -65,7 +67,7 @@ Response getWithResponse( /** * Delete a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -75,12 +77,12 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - TagRulesDeleteResponse deleteWithResponse( - String resourceGroupName, String monitorName, String ruleSetName, Context context); + TagRulesDeleteResponse deleteWithResponse(String resourceGroupName, String monitorName, String ruleSetName, + Context context); /** * Delete a tag rule set for a given monitor resource. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param monitorName Monitor resource name. * @param ruleSetName The ruleSetName parameter. @@ -92,7 +94,7 @@ TagRulesDeleteResponse deleteWithResponse( /** * Get a tag rule set for a given monitor resource. - * + * * @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. @@ -103,7 +105,7 @@ TagRulesDeleteResponse deleteWithResponse( /** * Get a tag rule set for a given monitor resource. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -115,7 +117,7 @@ TagRulesDeleteResponse deleteWithResponse( /** * Delete a tag rule set for a given monitor resource. - * + * * @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. @@ -125,7 +127,7 @@ TagRulesDeleteResponse deleteWithResponse( /** * Delete a tag rule set for a given monitor resource. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -137,7 +139,7 @@ TagRulesDeleteResponse deleteWithResponse( /** * Begins definition for a new MonitoringTagRules resource. - * + * * @param name resource name. * @return the first stage of the new MonitoringTagRules definition. */ diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRulesDeleteHeaders.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRulesDeleteHeaders.java index cf6172308bf1..42ed40f2ee94 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRulesDeleteHeaders.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRulesDeleteHeaders.java @@ -9,7 +9,9 @@ import com.azure.core.http.HttpHeaders; import com.fasterxml.jackson.annotation.JsonProperty; -/** The TagRulesDeleteHeaders model. */ +/** + * The TagRulesDeleteHeaders model. + */ @Fluent public final class TagRulesDeleteHeaders { /* @@ -21,7 +23,7 @@ public final class TagRulesDeleteHeaders { // HttpHeaders containing the raw property values. /** * Creates an instance of TagRulesDeleteHeaders class. - * + * * @param rawHeaders The raw HttpHeaders that will be used to create the property values. */ public TagRulesDeleteHeaders(HttpHeaders rawHeaders) { @@ -30,7 +32,7 @@ public TagRulesDeleteHeaders(HttpHeaders rawHeaders) { /** * Get the location property: The location property. - * + * * @return the location value. */ public String location() { @@ -39,7 +41,7 @@ public String location() { /** * Set the location property: The location property. - * + * * @param location the location value to set. * @return the TagRulesDeleteHeaders object itself. */ @@ -50,7 +52,7 @@ public TagRulesDeleteHeaders withLocation(String location) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRulesDeleteResponse.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRulesDeleteResponse.java index df72be667ec7..84e51dde89a3 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRulesDeleteResponse.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/TagRulesDeleteResponse.java @@ -8,19 +8,21 @@ import com.azure.core.http.HttpRequest; import com.azure.core.http.rest.ResponseBase; -/** Contains all response data for the delete operation. */ +/** + * Contains all response data for the delete operation. + */ public final class TagRulesDeleteResponse extends ResponseBase { /** * Creates an instance of TagRulesDeleteResponse. - * + * * @param request the request which resulted in this TagRulesDeleteResponse. * @param statusCode the status code of the HTTP response. * @param rawHeaders the raw headers of the HTTP response. * @param value the deserialized value of the HTTP response. * @param headers the deserialized headers of the HTTP response. */ - public TagRulesDeleteResponse( - HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, TagRulesDeleteHeaders headers) { + public TagRulesDeleteResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, + TagRulesDeleteHeaders headers) { super(request, statusCode, rawHeaders, value, headers); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserInfo.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserInfo.java index f7db16a371f6..9e39c74e339e 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserInfo.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserInfo.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The UserInfo model. */ +/** + * The UserInfo model. + */ @Fluent public final class UserInfo { /* @@ -34,13 +36,15 @@ public final class UserInfo { @JsonProperty(value = "phoneNumber") private String phoneNumber; - /** 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() { @@ -49,7 +53,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. */ @@ -60,7 +64,7 @@ public UserInfo withFirstName(String firstName) { /** * Get the lastName property: Last Name of the user. - * + * * @return the lastName value. */ public String lastName() { @@ -69,7 +73,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. */ @@ -80,7 +84,7 @@ public UserInfo withLastName(String lastName) { /** * Get the emailAddress property: Email of the user used by Logz for contacting them if needed. - * + * * @return the emailAddress value. */ public String emailAddress() { @@ -89,7 +93,7 @@ public String emailAddress() { /** * Set the emailAddress property: Email of the user used by Logz for contacting them if needed. - * + * * @param emailAddress the emailAddress value to set. * @return the UserInfo object itself. */ @@ -100,7 +104,7 @@ public UserInfo withEmailAddress(String emailAddress) { /** * Get the phoneNumber property: Phone number of the user used by Logz for contacting them if needed. - * + * * @return the phoneNumber value. */ public String phoneNumber() { @@ -109,7 +113,7 @@ public String phoneNumber() { /** * Set the phoneNumber property: Phone number of the user used by Logz for contacting them if needed. - * + * * @param phoneNumber the phoneNumber value to set. * @return the UserInfo object itself. */ @@ -120,7 +124,7 @@ public UserInfo withPhoneNumber(String phoneNumber) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRole.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRole.java index 759ceb778331..b7acd724468b 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRole.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRole.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** User roles on configured in Logz.io account. */ +/** + * User roles on configured in Logz.io account. + */ public final class UserRole extends ExpandableStringEnum { - /** Static value None for UserRole. */ + /** + * Static value None for UserRole. + */ public static final UserRole NONE = fromString("None"); - /** Static value User for UserRole. */ + /** + * Static value User for UserRole. + */ public static final UserRole USER = fromString("User"); - /** Static value Admin for UserRole. */ + /** + * Static value Admin for UserRole. + */ public static final UserRole ADMIN = fromString("Admin"); /** * Creates a new instance of UserRole value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public UserRole() { /** * Creates or finds a UserRole from its string representation. - * + * * @param name a name to look for. * @return the corresponding UserRole. */ @@ -41,7 +49,7 @@ public static UserRole fromString(String name) { /** * Gets known UserRole values. - * + * * @return known UserRole values. */ public static Collection values() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleListResponse.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleListResponse.java index c147d1d83b62..16570212472b 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleListResponse.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleListResponse.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Response for list of user's role for Logz.io account. */ +/** + * Response for list of user's role for Logz.io account. + */ @Fluent public final class UserRoleListResponse { /* @@ -24,13 +26,15 @@ public final class UserRoleListResponse { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of UserRoleListResponse class. */ + /** + * Creates an instance of UserRoleListResponse class. + */ public UserRoleListResponse() { } /** * Get the value property: List of user roles for Logz.io account. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: List of user roles for Logz.io account. - * + * * @param value the value value to set. * @return the UserRoleListResponse object itself. */ @@ -50,7 +54,7 @@ public UserRoleListResponse withValue(List value) { /** * Get the nextLink property: Link to the next set of results, if any. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Set the nextLink property: Link to the next set of results, if any. - * + * * @param nextLink the nextLink value to set. * @return the UserRoleListResponse object itself. */ @@ -70,7 +74,7 @@ public UserRoleListResponse withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleRequest.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleRequest.java index 069bd7e7e605..1eeff77e14cd 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleRequest.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleRequest.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Request for checking user's role for Logz.io account. */ +/** + * Request for checking user's role for Logz.io account. + */ @Fluent public final class UserRoleRequest { /* @@ -16,13 +18,15 @@ public final class UserRoleRequest { @JsonProperty(value = "emailAddress") private String emailAddress; - /** Creates an instance of UserRoleRequest class. */ + /** + * Creates an instance of UserRoleRequest class. + */ public UserRoleRequest() { } /** * Get the emailAddress property: Email of the user used by Logz for contacting them if needed. - * + * * @return the emailAddress value. */ public String emailAddress() { @@ -31,7 +35,7 @@ public String emailAddress() { /** * Set the emailAddress property: Email of the user used by Logz for contacting them if needed. - * + * * @param emailAddress the emailAddress value to set. * @return the UserRoleRequest object itself. */ @@ -42,7 +46,7 @@ public UserRoleRequest withEmailAddress(String emailAddress) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleResponse.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleResponse.java index 2c82bd9adf4c..cdf125e7d7fa 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleResponse.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/UserRoleResponse.java @@ -6,18 +6,20 @@ import com.azure.resourcemanager.logz.fluent.models.UserRoleResponseInner; -/** An immutable client-side representation of UserRoleResponse. */ +/** + * An immutable client-side representation of UserRoleResponse. + */ public interface UserRoleResponse { /** * Gets the role property: User roles on configured in Logz.io account. - * + * * @return the role value. */ UserRole role(); /** * Gets the inner com.azure.resourcemanager.logz.fluent.models.UserRoleResponseInner object. - * + * * @return the inner object. */ UserRoleResponseInner innerModel(); diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMExtensionPayload.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMExtensionPayload.java index d22f2c44f5d1..66553e38a688 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMExtensionPayload.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMExtensionPayload.java @@ -6,25 +6,27 @@ import com.azure.resourcemanager.logz.fluent.models.VMExtensionPayloadInner; -/** An immutable client-side representation of VMExtensionPayload. */ +/** + * An immutable client-side representation of VMExtensionPayload. + */ public interface VMExtensionPayload { /** * Gets the apiKey property: API Key corresponding to the resource. - * + * * @return the apiKey value. */ String apiKey(); /** * Gets the region property: Logz.io region where the resource has been created. - * + * * @return the region value. */ String region(); /** * Gets the inner com.azure.resourcemanager.logz.fluent.models.VMExtensionPayloadInner object. - * + * * @return the inner object. */ VMExtensionPayloadInner innerModel(); diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMHostUpdateRequest.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMHostUpdateRequest.java index 1e2cb8898abb..90763caaf20e 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMHostUpdateRequest.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMHostUpdateRequest.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Request of a list VM Host Update Operation. */ +/** + * Request of a list VM Host Update Operation. + */ @Fluent public final class VMHostUpdateRequest { /* @@ -24,13 +26,15 @@ public final class VMHostUpdateRequest { @JsonProperty(value = "state") private VMHostUpdateStates state; - /** Creates an instance of VMHostUpdateRequest class. */ + /** + * Creates an instance of VMHostUpdateRequest class. + */ public VMHostUpdateRequest() { } /** * Get the vmResourceIds property: Request of a list vm host update operation. - * + * * @return the vmResourceIds value. */ public List vmResourceIds() { @@ -39,7 +43,7 @@ public List vmResourceIds() { /** * Set the vmResourceIds property: Request of a list vm host update operation. - * + * * @param vmResourceIds the vmResourceIds value to set. * @return the VMHostUpdateRequest object itself. */ @@ -50,7 +54,7 @@ public VMHostUpdateRequest withVmResourceIds(List vmResourceId /** * Get the state property: Specifies the state of the operation - install/ delete. - * + * * @return the state value. */ public VMHostUpdateStates state() { @@ -59,7 +63,7 @@ public VMHostUpdateStates state() { /** * Set the state property: Specifies the state of the operation - install/ delete. - * + * * @param state the state value to set. * @return the VMHostUpdateRequest object itself. */ @@ -70,7 +74,7 @@ public VMHostUpdateRequest withState(VMHostUpdateStates state) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMHostUpdateStates.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMHostUpdateStates.java index f23b782442eb..85bccff68b9d 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMHostUpdateStates.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMHostUpdateStates.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Various states of the updating vm extension on resource. */ +/** + * Various states of the updating vm extension on resource. + */ public final class VMHostUpdateStates extends ExpandableStringEnum { - /** Static value Install for VMHostUpdateStates. */ + /** + * Static value Install for VMHostUpdateStates. + */ public static final VMHostUpdateStates INSTALL = fromString("Install"); - /** Static value Delete for VMHostUpdateStates. */ + /** + * Static value Delete for VMHostUpdateStates. + */ public static final VMHostUpdateStates DELETE = fromString("Delete"); /** * Creates a new instance of VMHostUpdateStates value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public VMHostUpdateStates() { /** * Creates or finds a VMHostUpdateStates from its string representation. - * + * * @param name a name to look for. * @return the corresponding VMHostUpdateStates. */ @@ -38,7 +44,7 @@ public static VMHostUpdateStates fromString(String name) { /** * Gets known VMHostUpdateStates values. - * + * * @return known VMHostUpdateStates values. */ public static Collection values() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMResources.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMResources.java index a45c8f6fc4c7..3dddd80c0db1 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMResources.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMResources.java @@ -6,25 +6,27 @@ import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner; -/** An immutable client-side representation of VMResources. */ +/** + * An immutable client-side representation of VMResources. + */ public interface VMResources { /** * Gets the id property: Request of a list vm host update operation. - * + * * @return the id value. */ String id(); /** * Gets the agentVersion property: Version of the Logz agent installed on the VM. - * + * * @return the agentVersion value. */ String agentVersion(); /** * Gets the inner com.azure.resourcemanager.logz.fluent.models.VMResourcesInner object. - * + * * @return the inner object. */ VMResourcesInner innerModel(); diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMResourcesListResponse.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMResourcesListResponse.java index 264664a3bb61..0f7ba55f0663 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMResourcesListResponse.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/VMResourcesListResponse.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Response of a list VM Host Update Operation. */ +/** + * Response of a list VM Host Update Operation. + */ @Fluent public final class VMResourcesListResponse { /* @@ -24,13 +26,15 @@ public final class VMResourcesListResponse { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of VMResourcesListResponse class. */ + /** + * Creates an instance of VMResourcesListResponse class. + */ public VMResourcesListResponse() { } /** * Get the value property: Response of a list vm host update operation. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: Response of a list vm host update operation. - * + * * @param value the value value to set. * @return the VMResourcesListResponse object itself. */ @@ -50,7 +54,7 @@ public VMResourcesListResponse withValue(List value) { /** * Get the nextLink property: Link to the next set of results, if any. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Set the nextLink property: Link to the next set of results, if any. - * + * * @param nextLink the nextLink value to set. * @return the VMResourcesListResponse object itself. */ @@ -70,7 +74,7 @@ public VMResourcesListResponse withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/package-info.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/package-info.java index 4c0527e0802e..7df24f49b0be 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/models/package-info.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/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 MicrosoftLogz. null. */ +/** + * Package containing the data models for MicrosoftLogz. + * null. + */ package com.azure.resourcemanager.logz.models; diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/package-info.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/package-info.java index c622a2d0305c..8763558f204f 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/package-info.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/com/azure/resourcemanager/logz/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 MicrosoftLogz. null. */ +/** + * Package containing the classes for MicrosoftLogz. + * null. + */ package com.azure.resourcemanager.logz; diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/java/module-info.java b/sdk/logz/azure-resourcemanager-logz/src/main/java/module-info.java index bce5a0383b2b..ee3e6f5e6f0b 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/main/java/module-info.java +++ b/sdk/logz/azure-resourcemanager-logz/src/main/java/module-info.java @@ -10,10 +10,6 @@ exports com.azure.resourcemanager.logz.fluent.models; exports com.azure.resourcemanager.logz.models; - opens com.azure.resourcemanager.logz.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.logz.models to - com.azure.core, - com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.logz.fluent.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.logz.models to com.azure.core, com.fasterxml.jackson.databind; } diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-logz/proxy-config.json b/sdk/logz/azure-resourcemanager-logz/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-logz/proxy-config.json new file mode 100644 index 000000000000..70aa3b52975d --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-logz/proxy-config.json @@ -0,0 +1 @@ +[ [ "com.azure.resourcemanager.logz.implementation.MonitorsClientImpl$MonitorsService" ], [ "com.azure.resourcemanager.logz.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.logz.implementation.TagRulesClientImpl$TagRulesService" ], [ "com.azure.resourcemanager.logz.implementation.SingleSignOnsClientImpl$SingleSignOnsService" ], [ "com.azure.resourcemanager.logz.implementation.SubAccountsClientImpl$SubAccountsService" ], [ "com.azure.resourcemanager.logz.implementation.SubAccountTagRulesClientImpl$SubAccountTagRulesService" ], [ "com.azure.resourcemanager.logz.implementation.MonitorOperationsClientImpl$MonitorOperationsService" ] ] \ No newline at end of file diff --git a/sdk/logz/azure-resourcemanager-logz/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-logz/reflect-config.json b/sdk/logz/azure-resourcemanager-logz/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-logz/reflect-config.json new file mode 100644 index 000000000000..9fb7c74caa01 --- /dev/null +++ b/sdk/logz/azure-resourcemanager-logz/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-logz/reflect-config.json @@ -0,0 +1,201 @@ +[ { + "name" : "com.azure.resourcemanager.logz.models.MonitoredResourceListResponse", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.fluent.models.MonitoredResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.OperationListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.fluent.models.OperationResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.OperationDisplay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.LogzMonitorResourceListResponse", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.fluent.models.LogzMonitorResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.MonitorProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.LogzOrganizationProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.UserInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.PlanData", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.IdentityProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.LogzMonitorResourceUpdateParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.MonitorUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.MonitoringTagRulesListResponse", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.MonitoringTagRulesProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.LogRules", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.FilteringTag", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.LogzSingleSignOnResourceListResponse", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.fluent.models.LogzSingleSignOnResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.LogzSingleSignOnProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.fluent.models.VMExtensionPayloadInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.VMHostUpdateRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.fluent.models.VMResourcesInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.VMResourcesListResponse", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.UserRoleRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.UserRoleListResponse", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.fluent.models.UserRoleResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.TagRulesDeleteHeaders", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.SubAccountTagRulesDeleteHeaders", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.ProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.MonitoringStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.LiftrResourceCategories", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.ManagedIdentityTypes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.TagAction", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.SingleSignOnStates", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.VMHostUpdateStates", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.logz.models.UserRole", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +} ] \ No newline at end of file diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationListVMHostsSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationListVMHostsSamples.java index e81abefc33e4..4f7578d61cff 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationListVMHostsSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationListVMHostsSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for MonitorOperation ListVMHosts. */ +/** + * Samples for MonitorOperation ListVMHosts. + */ public final class MonitorOperationListVMHostsSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_VMHosts_List.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_VMHosts_List.json */ /** * Sample code: MainAccount_VMHosts_List. - * + * * @param manager Entry point to LogzManager. */ public static void mainAccountVMHostsList(com.azure.resourcemanager.logz.LogzManager manager) { diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationListVmHostUpdateSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationListVmHostUpdateSamples.java index db41c42fc97c..84b659631280 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationListVmHostUpdateSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationListVmHostUpdateSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for MonitorOperation ListVmHostUpdate. */ +/** + * Samples for MonitorOperation ListVmHostUpdate. + */ public final class MonitorOperationListVmHostUpdateSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_VMHosts_Update.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_VMHosts_Update.json */ /** * Sample code: MainAccount_VMHosts_Update. - * + * * @param manager Entry point to LogzManager. */ public static void mainAccountVMHostsUpdate(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .monitorOperations() - .listVmHostUpdate("myResourceGroup", "myMonitor", null, com.azure.core.util.Context.NONE); + manager.monitorOperations().listVmHostUpdate("myResourceGroup", "myMonitor", null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationVMHostPayloadSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationVMHostPayloadSamples.java index cbb7d0768b11..bed0844ab7a3 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationVMHostPayloadSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorOperationVMHostPayloadSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for MonitorOperation VMHostPayload. */ +/** + * Samples for MonitorOperation VMHostPayload. + */ public final class MonitorOperationVMHostPayloadSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_VMHosts_Payload.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_VMHosts_Payload.json */ /** * Sample code: MainAccount_VMHosts_Payload. - * + * * @param manager Entry point to LogzManager. */ public static void mainAccountVMHostsPayload(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .monitorOperations() - .vMHostPayloadWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + manager.monitorOperations().vMHostPayloadWithResponse("myResourceGroup", "myMonitor", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsCreateSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsCreateSamples.java index 3badd98d8d25..1ca277e5d4d7 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsCreateSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsCreateSamples.java @@ -4,22 +4,21 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for Monitors Create. */ +/** + * Samples for Monitors Create. + */ public final class MonitorsCreateSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Create.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Create.json */ /** * Sample code: Monitors_Create. - * + * * @param manager Entry point to LogzManager. */ public static void monitorsCreate(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .monitors() - .define("myMonitor") - .withRegion((String) null) - .withExistingResourceGroup("myResourceGroup") + manager.monitors().define("myMonitor").withRegion((String) null).withExistingResourceGroup("myResourceGroup") .create(); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsDeleteSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsDeleteSamples.java index 81d20c006797..870d777b28a8 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsDeleteSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsDeleteSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for Monitors Delete. */ +/** + * Samples for Monitors Delete. + */ public final class MonitorsDeleteSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Delete.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Delete.json */ /** * Sample code: Monitors_Delete. - * + * * @param manager Entry point to LogzManager. */ public static void monitorsDelete(com.azure.resourcemanager.logz.LogzManager manager) { diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsGetByResourceGroupSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsGetByResourceGroupSamples.java index 4da7f5c0212b..bc2cff6e91c2 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsGetByResourceGroupSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsGetByResourceGroupSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for Monitors GetByResourceGroup. */ +/** + * Samples for Monitors GetByResourceGroup. + */ public final class MonitorsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Get.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Get.json */ /** * Sample code: Monitors_Get. - * + * * @param manager Entry point to LogzManager. */ public static void monitorsGet(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .monitors() - .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE); + manager.monitors().getByResourceGroupWithResponse("myResourceGroup", "myMonitor", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListByResourceGroupSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListByResourceGroupSamples.java index 2feb850dc09f..67f7391788cd 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListByResourceGroupSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListByResourceGroupSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for Monitors ListByResourceGroup. */ +/** + * Samples for Monitors ListByResourceGroup. + */ public final class MonitorsListByResourceGroupSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_ListByResourceGroup.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_ListByResourceGroup.json */ /** * Sample code: Monitors_ListByResourceGroup. - * + * * @param manager Entry point to LogzManager. */ public static void monitorsListByResourceGroup(com.azure.resourcemanager.logz.LogzManager manager) { diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListMonitoredResourcesSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListMonitoredResourcesSamples.java index f92b60ee6631..13b30396cab5 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListMonitoredResourcesSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListMonitoredResourcesSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for Monitors ListMonitoredResources. */ +/** + * Samples for Monitors ListMonitoredResources. + */ public final class MonitorsListMonitoredResourcesSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MonitoredResources_List.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MonitoredResources_List.json */ /** * Sample code: MonitoredResources_List. - * + * * @param manager Entry point to LogzManager. */ public static void monitoredResourcesList(com.azure.resourcemanager.logz.LogzManager manager) { diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListSamples.java index 3d184f1302f0..30edcb8725ec 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for Monitors List. */ +/** + * Samples for Monitors List. + */ public final class MonitorsListSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_List.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_List.json */ /** * Sample code: Monitors_List. - * + * * @param manager Entry point to LogzManager. */ public static void monitorsList(com.azure.resourcemanager.logz.LogzManager manager) { diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListUserRolesSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListUserRolesSamples.java index 1a5e83dcd877..ec2595db15e1 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListUserRolesSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsListUserRolesSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for Monitors ListUserRoles. */ +/** + * Samples for Monitors ListUserRoles. + */ public final class MonitorsListUserRolesSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_listUserRoles.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/MainAccount_listUserRoles.json */ /** * Sample code: MainAccount_VMHosts_Update. - * + * * @param manager Entry point to LogzManager. */ public static void mainAccountVMHostsUpdate(com.azure.resourcemanager.logz.LogzManager manager) { diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsUpdateSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsUpdateSamples.java index 830f49a0da29..db7cae78ac78 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsUpdateSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/MonitorsUpdateSamples.java @@ -6,22 +6,23 @@ import com.azure.resourcemanager.logz.models.LogzMonitorResource; -/** Samples for Monitors Update. */ +/** + * Samples for Monitors Update. + */ public final class MonitorsUpdateSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Update.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Monitors_Update.json */ /** * Sample code: Monitors_Update. - * + * * @param manager Entry point to LogzManager. */ public static void monitorsUpdate(com.azure.resourcemanager.logz.LogzManager manager) { - LogzMonitorResource resource = - manager - .monitors() - .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE) - .getValue(); + LogzMonitorResource resource = manager.monitors() + .getByResourceGroupWithResponse("myResourceGroup", "myMonitor", com.azure.core.util.Context.NONE) + .getValue(); resource.update().apply(); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/OperationsListSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/OperationsListSamples.java index 07205f75080e..30492d0bad2e 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/OperationsListSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/OperationsListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Operations_List.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/Operations_List.json */ /** * Sample code: Operations_List. - * + * * @param manager Entry point to LogzManager. */ public static void operationsList(com.azure.resourcemanager.logz.LogzManager manager) { diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnCreateOrUpdateSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnCreateOrUpdateSamples.java index a6f58268cfbb..cb78abb7114c 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnCreateOrUpdateSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnCreateOrUpdateSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for SingleSignOn CreateOrUpdate. */ +/** + * Samples for SingleSignOn CreateOrUpdate. + */ public final class SingleSignOnCreateOrUpdateSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SingleSignOnConfigurations_CreateOrUpdate.json + * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/ + * SingleSignOnConfigurations_CreateOrUpdate.json */ /** * Sample code: SingleSignOnConfigurations_CreateOrUpdate. - * + * * @param manager Entry point to LogzManager. */ public static void singleSignOnConfigurationsCreateOrUpdate(com.azure.resourcemanager.logz.LogzManager manager) { diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnGetSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnGetSamples.java index 7b76cffd4b54..a697ebe8eb7c 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnGetSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnGetSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for SingleSignOn Get. */ +/** + * Samples for SingleSignOn Get. + */ public final class SingleSignOnGetSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SingleSignOnConfigurations_Get.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SingleSignOnConfigurations_Get.json */ /** * Sample code: SingleSignOnConfigurations_Get. - * + * * @param manager Entry point to LogzManager. */ public static void singleSignOnConfigurationsGet(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .singleSignOns() - .getWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); + manager.singleSignOns().getWithResponse("myResourceGroup", "myMonitor", "default", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnListSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnListSamples.java index 6f887448d321..7d756e8a066b 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnListSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SingleSignOnListSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for SingleSignOn List. */ +/** + * Samples for SingleSignOn List. + */ public final class SingleSignOnListSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SingleSignOnConfigurations_List.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SingleSignOnConfigurations_List. + * json */ /** * Sample code: SingleSignOnConfigurations_List. - * + * * @param manager Entry point to LogzManager. */ public static void singleSignOnConfigurationsList(com.azure.resourcemanager.logz.LogzManager manager) { diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountCreateSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountCreateSamples.java index 97ee1acce22f..c127cb7cdecf 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountCreateSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountCreateSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for SubAccount Create. */ +/** + * Samples for SubAccount Create. + */ public final class SubAccountCreateSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Create.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Create.json */ /** * Sample code: subAccount_Create. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountCreate(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .subAccounts() - .create("myResourceGroup", "myMonitor", "SubAccount1", null, com.azure.core.util.Context.NONE); + manager.subAccounts().create("myResourceGroup", "myMonitor", "SubAccount1", null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountDeleteSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountDeleteSamples.java index b349aba9b4ff..ad4a0eecffb1 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountDeleteSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountDeleteSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for SubAccount Delete. */ +/** + * Samples for SubAccount Delete. + */ public final class SubAccountDeleteSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Delete.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Delete.json */ /** * Sample code: SubAccount_Delete. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountDelete(com.azure.resourcemanager.logz.LogzManager manager) { diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountGetSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountGetSamples.java index e3a70a31483e..c192ef3e84dc 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountGetSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountGetSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for SubAccount Get. */ +/** + * Samples for SubAccount Get. + */ public final class SubAccountGetSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Get.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Get.json */ /** * Sample code: SubAccount_Get. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountGet(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .subAccounts() - .getWithResponse("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); + manager.subAccounts().getWithResponse("myResourceGroup", "myMonitor", "SubAccount1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListMonitoredResourcesSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListMonitoredResourcesSamples.java index 588793181454..0af17c2c0de6 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListMonitoredResourcesSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListMonitoredResourcesSamples.java @@ -4,19 +4,22 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for SubAccount ListMonitoredResources. */ +/** + * Samples for SubAccount ListMonitoredResources. + */ public final class SubAccountListMonitoredResourcesSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_MonitoredResources_List.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_MonitoredResources_List. + * json */ /** * Sample code: SubAccount_MonitoredResources_List. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountMonitoredResourcesList(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .subAccounts() - .listMonitoredResources("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); + manager.subAccounts().listMonitoredResources("myResourceGroup", "myMonitor", "SubAccount1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListSamples.java index a3be316a9a8c..3760f6f264f2 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for SubAccount List. */ +/** + * Samples for SubAccount List. + */ public final class SubAccountListSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_ListByResourceGroup.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_ListByResourceGroup.json */ /** * Sample code: SubAccount_List. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountList(com.azure.resourcemanager.logz.LogzManager manager) { diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListVMHostsSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListVMHostsSamples.java index 2332ee02ca06..0404d6252aca 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListVMHostsSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListVMHostsSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for SubAccount ListVMHosts. */ +/** + * Samples for SubAccount ListVMHosts. + */ public final class SubAccountListVMHostsSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_VMHosts_List.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_VMHosts_List.json */ /** * Sample code: SubAccount_VMHosts_List. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountVMHostsList(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .subAccounts() - .listVMHosts("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); + manager.subAccounts().listVMHosts("myResourceGroup", "myMonitor", "SubAccount1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListVmHostUpdateSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListVmHostUpdateSamples.java index 8f371ed3490e..beb4e45c3e03 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListVmHostUpdateSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountListVmHostUpdateSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for SubAccount ListVmHostUpdate. */ +/** + * Samples for SubAccount ListVmHostUpdate. + */ public final class SubAccountListVmHostUpdateSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_VMHosts_Update.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_VMHosts_Update.json */ /** * Sample code: SubAccount_VMHosts_Update. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountVMHostsUpdate(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .subAccounts() - .listVmHostUpdate("myResourceGroup", "myMonitor", "SubAccount1", null, com.azure.core.util.Context.NONE); + manager.subAccounts().listVmHostUpdate("myResourceGroup", "myMonitor", "SubAccount1", null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesCreateOrUpdateSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesCreateOrUpdateSamples.java index b8693f018177..beee31415cb9 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesCreateOrUpdateSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesCreateOrUpdateSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for SubAccountTagRules CreateOrUpdate. */ +/** + * Samples for SubAccountTagRules CreateOrUpdate. + */ public final class SubAccountTagRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_CreateOrUpdate.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_CreateOrUpdate. + * json */ /** * Sample code: SubAccountTagRules_CreateOrUpdate. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountTagRulesCreateOrUpdate(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .subAccountTagRules() - .createOrUpdateWithResponse( - "myResourceGroup", "myMonitor", "SubAccount1", "default", null, com.azure.core.util.Context.NONE); + manager.subAccountTagRules().createOrUpdateWithResponse("myResourceGroup", "myMonitor", "SubAccount1", + "default", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesDeleteSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesDeleteSamples.java index b493fd87069d..329873fa2928 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesDeleteSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesDeleteSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for SubAccountTagRules Delete. */ +/** + * Samples for SubAccountTagRules Delete. + */ public final class SubAccountTagRulesDeleteSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_Delete.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_Delete.json */ /** * Sample code: TagRules_Delete. - * + * * @param manager Entry point to LogzManager. */ public static void tagRulesDelete(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .subAccountTagRules() - .deleteWithResponse( - "myResourceGroup", "myMonitor", "SubAccount1", "default", com.azure.core.util.Context.NONE); + manager.subAccountTagRules().deleteWithResponse("myResourceGroup", "myMonitor", "SubAccount1", "default", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesGetSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesGetSamples.java index caef1d4bae2f..a6747d417e1a 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesGetSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesGetSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for SubAccountTagRules Get. */ +/** + * Samples for SubAccountTagRules Get. + */ public final class SubAccountTagRulesGetSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_Get.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_Get.json */ /** * Sample code: SubAccountTagRules_Get. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountTagRulesGet(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .subAccountTagRules() - .getWithResponse( - "myResourceGroup", "myMonitor", "SubAccount1", "default", com.azure.core.util.Context.NONE); + manager.subAccountTagRules().getWithResponse("myResourceGroup", "myMonitor", "SubAccount1", "default", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesListSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesListSamples.java index 166fcbc90730..7df9eaed07ff 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesListSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesListSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for SubAccountTagRules List. */ +/** + * Samples for SubAccountTagRules List. + */ public final class SubAccountTagRulesListSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_List.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccountTagRules_List.json */ /** * Sample code: SubAccountTagRules_List. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountTagRulesList(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .subAccountTagRules() - .list("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); + manager.subAccountTagRules().list("myResourceGroup", "myMonitor", "SubAccount1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountUpdateSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountUpdateSamples.java index c7c5136aacdb..ebed3c1f91e4 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountUpdateSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountUpdateSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for SubAccount Update. */ +/** + * Samples for SubAccount Update. + */ public final class SubAccountUpdateSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Update.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_Update.json */ /** * Sample code: SubAccount_Update. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountUpdate(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .subAccounts() - .updateWithResponse("myResourceGroup", "myMonitor", "SubAccount1", null, com.azure.core.util.Context.NONE); + manager.subAccounts().updateWithResponse("myResourceGroup", "myMonitor", "SubAccount1", null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountVMHostPayloadSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountVMHostPayloadSamples.java index cd0c6e31d50d..a7af034a0a8a 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountVMHostPayloadSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/SubAccountVMHostPayloadSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for SubAccount VMHostPayload. */ +/** + * Samples for SubAccount VMHostPayload. + */ public final class SubAccountVMHostPayloadSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_VMHosts_Payload.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/SubAccount_VMHosts_Payload.json */ /** * Sample code: SubAccount_VMHosts_Payload. - * + * * @param manager Entry point to LogzManager. */ public static void subAccountVMHostsPayload(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .subAccounts() - .vMHostPayloadWithResponse("myResourceGroup", "myMonitor", "SubAccount1", com.azure.core.util.Context.NONE); + manager.subAccounts().vMHostPayloadWithResponse("myResourceGroup", "myMonitor", "SubAccount1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesCreateOrUpdateSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesCreateOrUpdateSamples.java index 4f01859ed2ef..5295a65dc953 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesCreateOrUpdateSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesCreateOrUpdateSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for TagRules CreateOrUpdate. */ +/** + * Samples for TagRules CreateOrUpdate. + */ public final class TagRulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_CreateOrUpdate.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_CreateOrUpdate.json */ /** * Sample code: TagRules_CreateOrUpdate. - * + * * @param manager Entry point to LogzManager. */ public static void tagRulesCreateOrUpdate(com.azure.resourcemanager.logz.LogzManager manager) { diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesDeleteSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesDeleteSamples.java index 9bffba87e340..61bced1d694a 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesDeleteSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesDeleteSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for TagRules Delete. */ +/** + * Samples for TagRules Delete. + */ public final class TagRulesDeleteSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_Delete.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_Delete.json */ /** * Sample code: TagRules_Delete. - * + * * @param manager Entry point to LogzManager. */ public static void tagRulesDelete(com.azure.resourcemanager.logz.LogzManager manager) { - manager - .tagRules() - .deleteWithResponse("myResourceGroup", "myMonitor", "default", com.azure.core.util.Context.NONE); + manager.tagRules().deleteWithResponse("myResourceGroup", "myMonitor", "default", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesGetSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesGetSamples.java index c24112ff9721..78cdc6679637 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesGetSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesGetSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for TagRules Get. */ +/** + * Samples for TagRules Get. + */ public final class TagRulesGetSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_Get.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_Get.json */ /** * Sample code: TagRules_Get. - * + * * @param manager Entry point to LogzManager. */ public static void tagRulesGet(com.azure.resourcemanager.logz.LogzManager manager) { diff --git a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesListSamples.java b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesListSamples.java index 4756bb55e067..7498c2ddb3c7 100644 --- a/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesListSamples.java +++ b/sdk/logz/azure-resourcemanager-logz/src/samples/java/com/azure/resourcemanager/logz/generated/TagRulesListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.logz.generated; -/** Samples for TagRules List. */ +/** + * Samples for TagRules List. + */ public final class TagRulesListSamples { /* - * x-ms-original-file: specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_List.json + * x-ms-original-file: + * specification/logz/resource-manager/Microsoft.Logz/stable/2020-10-01/examples/TagRules_List.json */ /** * Sample code: TagRules_List. - * + * * @param manager Entry point to LogzManager. */ public static void tagRulesList(com.azure.resourcemanager.logz.LogzManager manager) { diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/FilteringTagTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/FilteringTagTests.java deleted file mode 100644 index f485da7df996..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/FilteringTagTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.models.FilteringTag; -import com.azure.resourcemanager.logz.models.TagAction; -import org.junit.jupiter.api.Assertions; - -public final class FilteringTagTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FilteringTag model = - BinaryData - .fromString("{\"name\":\"npzaoq\",\"value\":\"hrhcffcyddglmjth\",\"action\":\"Include\"}") - .toObject(FilteringTag.class); - Assertions.assertEquals("npzaoq", model.name()); - Assertions.assertEquals("hrhcffcyddglmjth", model.value()); - Assertions.assertEquals(TagAction.INCLUDE, model.action()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FilteringTag model = - new FilteringTag().withName("npzaoq").withValue("hrhcffcyddglmjth").withAction(TagAction.INCLUDE); - model = BinaryData.fromObject(model).toObject(FilteringTag.class); - Assertions.assertEquals("npzaoq", model.name()); - Assertions.assertEquals("hrhcffcyddglmjth", model.value()); - Assertions.assertEquals(TagAction.INCLUDE, model.action()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/IdentityPropertiesTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/IdentityPropertiesTests.java deleted file mode 100644 index f72eefdb43bb..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/IdentityPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.models.IdentityProperties; -import com.azure.resourcemanager.logz.models.ManagedIdentityTypes; -import org.junit.jupiter.api.Assertions; - -public final class IdentityPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentityProperties model = - BinaryData - .fromString("{\"principalId\":\"ro\",\"tenantId\":\"qpteeh\",\"type\":\"UserAssigned\"}") - .toObject(IdentityProperties.class); - Assertions.assertEquals(ManagedIdentityTypes.USER_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityProperties model = new IdentityProperties().withType(ManagedIdentityTypes.USER_ASSIGNED); - model = BinaryData.fromObject(model).toObject(IdentityProperties.class); - Assertions.assertEquals(ManagedIdentityTypes.USER_ASSIGNED, model.type()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogRulesTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogRulesTests.java deleted file mode 100644 index 8895201cc740..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogRulesTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.models.FilteringTag; -import com.azure.resourcemanager.logz.models.LogRules; -import com.azure.resourcemanager.logz.models.TagAction; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LogRulesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogRules model = - BinaryData - .fromString( - "{\"sendAadLogs\":false,\"sendSubscriptionLogs\":false,\"sendActivityLogs\":false,\"filteringTags\":[{\"name\":\"ajrmvdjwzrlovmc\",\"value\":\"hijco\",\"action\":\"Include\"},{\"name\":\"bzaqsqsycbkbfk\",\"value\":\"kdkexxp\",\"action\":\"Include\"},{\"name\":\"xaxcfjpgddtocjjx\",\"value\":\"pmouexhdz\",\"action\":\"Include\"},{\"name\":\"eojnxqbzvddn\",\"value\":\"ndei\",\"action\":\"Exclude\"}]}") - .toObject(LogRules.class); - Assertions.assertEquals(false, model.sendAadLogs()); - Assertions.assertEquals(false, model.sendSubscriptionLogs()); - Assertions.assertEquals(false, model.sendActivityLogs()); - Assertions.assertEquals("ajrmvdjwzrlovmc", model.filteringTags().get(0).name()); - Assertions.assertEquals("hijco", model.filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, model.filteringTags().get(0).action()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogRules model = - new LogRules() - .withSendAadLogs(false) - .withSendSubscriptionLogs(false) - .withSendActivityLogs(false) - .withFilteringTags( - Arrays - .asList( - new FilteringTag() - .withName("ajrmvdjwzrlovmc") - .withValue("hijco") - .withAction(TagAction.INCLUDE), - new FilteringTag() - .withName("bzaqsqsycbkbfk") - .withValue("kdkexxp") - .withAction(TagAction.INCLUDE), - new FilteringTag() - .withName("xaxcfjpgddtocjjx") - .withValue("pmouexhdz") - .withAction(TagAction.INCLUDE), - new FilteringTag() - .withName("eojnxqbzvddn") - .withValue("ndei") - .withAction(TagAction.EXCLUDE))); - model = BinaryData.fromObject(model).toObject(LogRules.class); - Assertions.assertEquals(false, model.sendAadLogs()); - Assertions.assertEquals(false, model.sendSubscriptionLogs()); - Assertions.assertEquals(false, model.sendActivityLogs()); - Assertions.assertEquals("ajrmvdjwzrlovmc", model.filteringTags().get(0).name()); - Assertions.assertEquals("hijco", model.filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.INCLUDE, model.filteringTags().get(0).action()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceInnerTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceInnerTests.java deleted file mode 100644 index b993c153f246..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceInnerTests.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.fluent.models.LogzMonitorResourceInner; -import com.azure.resourcemanager.logz.models.IdentityProperties; -import com.azure.resourcemanager.logz.models.LogzOrganizationProperties; -import com.azure.resourcemanager.logz.models.ManagedIdentityTypes; -import com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus; -import com.azure.resourcemanager.logz.models.MonitorProperties; -import com.azure.resourcemanager.logz.models.MonitoringStatus; -import com.azure.resourcemanager.logz.models.PlanData; -import com.azure.resourcemanager.logz.models.UserInfo; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class LogzMonitorResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogzMonitorResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Updating\",\"monitoringStatus\":\"Disabled\",\"marketplaceSubscriptionStatus\":\"Active\",\"logzOrganizationProperties\":{\"companyName\":\"czdzev\",\"id\":\"hkr\",\"enterpriseAppId\":\"d\",\"singleSignOnUrl\":\"p\"},\"userInfo\":{\"firstName\":\"dkvwrwjfe\",\"lastName\":\"nhutjeltmrldhugj\",\"emailAddress\":\"datqxhocdgeabl\",\"phoneNumber\":\"huticndvkao\"},\"planData\":{\"usageType\":\"i\",\"billingCycle\":\"yhxhu\",\"planDetails\":\"k\",\"effectiveDate\":\"2021-04-05T15:40:07Z\"},\"liftrResourceCategory\":\"MonitorLogs\",\"liftrResourcePreference\":214532343},\"identity\":{\"principalId\":\"pwcukjfkgiawxk\",\"tenantId\":\"ypl\",\"type\":\"SystemAssigned\"},\"location\":\"basyy\",\"tags\":{\"phejkotynqgoulz\":\"dhsgcba\",\"gakeqsr\":\"dlikwyqkgfgibma\",\"qqedqytbciqfou\":\"yb\"},\"id\":\"lmmnkzsmodmglo\",\"name\":\"gpbkwtmut\",\"type\":\"uqktap\"}") - .toObject(LogzMonitorResourceInner.class); - Assertions.assertEquals("basyy", model.location()); - Assertions.assertEquals("dhsgcba", model.tags().get("phejkotynqgoulz")); - Assertions.assertEquals(MonitoringStatus.DISABLED, model.properties().monitoringStatus()); - Assertions - .assertEquals(MarketplaceSubscriptionStatus.ACTIVE, model.properties().marketplaceSubscriptionStatus()); - Assertions.assertEquals("czdzev", model.properties().logzOrganizationProperties().companyName()); - Assertions.assertEquals("d", model.properties().logzOrganizationProperties().enterpriseAppId()); - Assertions.assertEquals("p", model.properties().logzOrganizationProperties().singleSignOnUrl()); - Assertions.assertEquals("dkvwrwjfe", model.properties().userInfo().firstName()); - Assertions.assertEquals("nhutjeltmrldhugj", model.properties().userInfo().lastName()); - Assertions.assertEquals("datqxhocdgeabl", model.properties().userInfo().emailAddress()); - Assertions.assertEquals("huticndvkao", model.properties().userInfo().phoneNumber()); - Assertions.assertEquals("i", model.properties().planData().usageType()); - Assertions.assertEquals("yhxhu", model.properties().planData().billingCycle()); - Assertions.assertEquals("k", model.properties().planData().planDetails()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-04-05T15:40:07Z"), model.properties().planData().effectiveDate()); - Assertions.assertEquals(ManagedIdentityTypes.SYSTEM_ASSIGNED, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogzMonitorResourceInner model = - new LogzMonitorResourceInner() - .withLocation("basyy") - .withTags(mapOf("phejkotynqgoulz", "dhsgcba", "gakeqsr", "dlikwyqkgfgibma", "qqedqytbciqfou", "yb")) - .withProperties( - new MonitorProperties() - .withMonitoringStatus(MonitoringStatus.DISABLED) - .withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus.ACTIVE) - .withLogzOrganizationProperties( - new LogzOrganizationProperties() - .withCompanyName("czdzev") - .withEnterpriseAppId("d") - .withSingleSignOnUrl("p")) - .withUserInfo( - new UserInfo() - .withFirstName("dkvwrwjfe") - .withLastName("nhutjeltmrldhugj") - .withEmailAddress("datqxhocdgeabl") - .withPhoneNumber("huticndvkao")) - .withPlanData( - new PlanData() - .withUsageType("i") - .withBillingCycle("yhxhu") - .withPlanDetails("k") - .withEffectiveDate(OffsetDateTime.parse("2021-04-05T15:40:07Z")))) - .withIdentity(new IdentityProperties().withType(ManagedIdentityTypes.SYSTEM_ASSIGNED)); - model = BinaryData.fromObject(model).toObject(LogzMonitorResourceInner.class); - Assertions.assertEquals("basyy", model.location()); - Assertions.assertEquals("dhsgcba", model.tags().get("phejkotynqgoulz")); - Assertions.assertEquals(MonitoringStatus.DISABLED, model.properties().monitoringStatus()); - Assertions - .assertEquals(MarketplaceSubscriptionStatus.ACTIVE, model.properties().marketplaceSubscriptionStatus()); - Assertions.assertEquals("czdzev", model.properties().logzOrganizationProperties().companyName()); - Assertions.assertEquals("d", model.properties().logzOrganizationProperties().enterpriseAppId()); - Assertions.assertEquals("p", model.properties().logzOrganizationProperties().singleSignOnUrl()); - Assertions.assertEquals("dkvwrwjfe", model.properties().userInfo().firstName()); - Assertions.assertEquals("nhutjeltmrldhugj", model.properties().userInfo().lastName()); - Assertions.assertEquals("datqxhocdgeabl", model.properties().userInfo().emailAddress()); - Assertions.assertEquals("huticndvkao", model.properties().userInfo().phoneNumber()); - Assertions.assertEquals("i", model.properties().planData().usageType()); - Assertions.assertEquals("yhxhu", model.properties().planData().billingCycle()); - Assertions.assertEquals("k", model.properties().planData().planDetails()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-04-05T15:40:07Z"), model.properties().planData().effectiveDate()); - Assertions.assertEquals(ManagedIdentityTypes.SYSTEM_ASSIGNED, model.identity().type()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceListResponseTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceListResponseTests.java deleted file mode 100644 index 8c704d05dc59..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceListResponseTests.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.fluent.models.LogzMonitorResourceInner; -import com.azure.resourcemanager.logz.models.IdentityProperties; -import com.azure.resourcemanager.logz.models.LogzMonitorResourceListResponse; -import com.azure.resourcemanager.logz.models.ManagedIdentityTypes; -import com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus; -import com.azure.resourcemanager.logz.models.MonitorProperties; -import com.azure.resourcemanager.logz.models.MonitoringStatus; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class LogzMonitorResourceListResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogzMonitorResourceListResponse model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"monitoringStatus\":\"Disabled\",\"marketplaceSubscriptionStatus\":\"Active\",\"liftrResourceCategory\":\"Unknown\",\"liftrResourcePreference\":271346012},\"identity\":{\"principalId\":\"cs\",\"tenantId\":\"s\",\"type\":\"UserAssigned\"},\"location\":\"yejhk\",\"tags\":{\"ni\":\"tnapczwlokjyemkk\",\"ilzyd\":\"joxzjnchgejspodm\",\"jwyahuxinpmqnja\":\"h\",\"tegjvwmf\":\"wixjsprozvcp\"},\"id\":\"atscmd\",\"name\":\"pjhulsuuvmkj\",\"type\":\"zkrwfn\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"monitoringStatus\":\"Disabled\",\"marketplaceSubscriptionStatus\":\"Active\",\"liftrResourceCategory\":\"MonitorLogs\",\"liftrResourcePreference\":672653689},\"identity\":{\"principalId\":\"qpsoacctazak\",\"tenantId\":\"lahbcryff\",\"type\":\"SystemAssigned\"},\"location\":\"osygex\",\"tags\":{\"rzevdphlxaol\":\"jakhmsbzjh\",\"fsinzgvfcjrwzoxx\":\"hqtrgqjbpf\",\"wfzitonpeqfpjk\":\"tfell\",\"nmayhuybb\":\"lxofpdvhpfxxypin\"},\"id\":\"podepoo\",\"name\":\"inuvamiheogn\",\"type\":\"rxzxtheo\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"monitoringStatus\":\"Disabled\",\"marketplaceSubscriptionStatus\":\"Suspended\",\"liftrResourceCategory\":\"Unknown\",\"liftrResourcePreference\":720964194},\"identity\":{\"principalId\":\"gbwjzrnf\",\"tenantId\":\"xgispemvtzfkufu\",\"type\":\"SystemAssigned\"},\"location\":\"ofx\",\"tags\":{\"hqjbasvmsmj\":\"fjaeq\",\"ybkzgcwr\":\"ulngsntn\",\"skcqvkocrcjd\":\"clxxwrljdo\"},\"id\":\"wtnhxbnjbiksqr\",\"name\":\"lssai\",\"type\":\"qpjwnzlljfm\"}],\"nextLink\":\"eebvmgxsab\"}") - .toObject(LogzMonitorResourceListResponse.class); - Assertions.assertEquals("yejhk", model.value().get(0).location()); - Assertions.assertEquals("tnapczwlokjyemkk", model.value().get(0).tags().get("ni")); - Assertions.assertEquals(MonitoringStatus.DISABLED, model.value().get(0).properties().monitoringStatus()); - Assertions - .assertEquals( - MarketplaceSubscriptionStatus.ACTIVE, - model.value().get(0).properties().marketplaceSubscriptionStatus()); - Assertions.assertEquals(ManagedIdentityTypes.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("eebvmgxsab", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogzMonitorResourceListResponse model = - new LogzMonitorResourceListResponse() - .withValue( - Arrays - .asList( - new LogzMonitorResourceInner() - .withLocation("yejhk") - .withTags( - mapOf( - "ni", - "tnapczwlokjyemkk", - "ilzyd", - "joxzjnchgejspodm", - "jwyahuxinpmqnja", - "h", - "tegjvwmf", - "wixjsprozvcp")) - .withProperties( - new MonitorProperties() - .withMonitoringStatus(MonitoringStatus.DISABLED) - .withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus.ACTIVE)) - .withIdentity(new IdentityProperties().withType(ManagedIdentityTypes.USER_ASSIGNED)), - new LogzMonitorResourceInner() - .withLocation("osygex") - .withTags( - mapOf( - "rzevdphlxaol", - "jakhmsbzjh", - "fsinzgvfcjrwzoxx", - "hqtrgqjbpf", - "wfzitonpeqfpjk", - "tfell", - "nmayhuybb", - "lxofpdvhpfxxypin")) - .withProperties( - new MonitorProperties() - .withMonitoringStatus(MonitoringStatus.DISABLED) - .withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus.ACTIVE)) - .withIdentity(new IdentityProperties().withType(ManagedIdentityTypes.SYSTEM_ASSIGNED)), - new LogzMonitorResourceInner() - .withLocation("ofx") - .withTags( - mapOf("hqjbasvmsmj", "fjaeq", "ybkzgcwr", "ulngsntn", "skcqvkocrcjd", "clxxwrljdo")) - .withProperties( - new MonitorProperties() - .withMonitoringStatus(MonitoringStatus.DISABLED) - .withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus.SUSPENDED)) - .withIdentity(new IdentityProperties().withType(ManagedIdentityTypes.SYSTEM_ASSIGNED)))) - .withNextLink("eebvmgxsab"); - model = BinaryData.fromObject(model).toObject(LogzMonitorResourceListResponse.class); - Assertions.assertEquals("yejhk", model.value().get(0).location()); - Assertions.assertEquals("tnapczwlokjyemkk", model.value().get(0).tags().get("ni")); - Assertions.assertEquals(MonitoringStatus.DISABLED, model.value().get(0).properties().monitoringStatus()); - Assertions - .assertEquals( - MarketplaceSubscriptionStatus.ACTIVE, - model.value().get(0).properties().marketplaceSubscriptionStatus()); - Assertions.assertEquals(ManagedIdentityTypes.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("eebvmgxsab", model.nextLink()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceUpdateParametersTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceUpdateParametersTests.java deleted file mode 100644 index a40d6a3b9efc..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzMonitorResourceUpdateParametersTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.models.LogzMonitorResourceUpdateParameters; -import com.azure.resourcemanager.logz.models.MonitorUpdateProperties; -import com.azure.resourcemanager.logz.models.MonitoringStatus; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class LogzMonitorResourceUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogzMonitorResourceUpdateParameters model = - BinaryData - .fromString("{\"properties\":{\"monitoringStatus\":\"Enabled\"},\"tags\":{\"z\":\"i\"}}") - .toObject(LogzMonitorResourceUpdateParameters.class); - Assertions.assertEquals(MonitoringStatus.ENABLED, model.properties().monitoringStatus()); - Assertions.assertEquals("i", model.tags().get("z")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogzMonitorResourceUpdateParameters model = - new LogzMonitorResourceUpdateParameters() - .withProperties(new MonitorUpdateProperties().withMonitoringStatus(MonitoringStatus.ENABLED)) - .withTags(mapOf("z", "i")); - model = BinaryData.fromObject(model).toObject(LogzMonitorResourceUpdateParameters.class); - Assertions.assertEquals(MonitoringStatus.ENABLED, model.properties().monitoringStatus()); - Assertions.assertEquals("i", model.tags().get("z")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzOrganizationPropertiesTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzOrganizationPropertiesTests.java deleted file mode 100644 index 46443abca287..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzOrganizationPropertiesTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.models.LogzOrganizationProperties; -import org.junit.jupiter.api.Assertions; - -public final class LogzOrganizationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogzOrganizationProperties model = - BinaryData - .fromString( - "{\"companyName\":\"wzwbnguitn\",\"id\":\"izgazxu\",\"enterpriseAppId\":\"zuckyfi\",\"singleSignOnUrl\":\"fidfvzw\"}") - .toObject(LogzOrganizationProperties.class); - Assertions.assertEquals("wzwbnguitn", model.companyName()); - Assertions.assertEquals("zuckyfi", model.enterpriseAppId()); - Assertions.assertEquals("fidfvzw", model.singleSignOnUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogzOrganizationProperties model = - new LogzOrganizationProperties() - .withCompanyName("wzwbnguitn") - .withEnterpriseAppId("zuckyfi") - .withSingleSignOnUrl("fidfvzw"); - model = BinaryData.fromObject(model).toObject(LogzOrganizationProperties.class); - Assertions.assertEquals("wzwbnguitn", model.companyName()); - Assertions.assertEquals("zuckyfi", model.enterpriseAppId()); - Assertions.assertEquals("fidfvzw", model.singleSignOnUrl()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnPropertiesTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnPropertiesTests.java deleted file mode 100644 index daf2398102d8..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnPropertiesTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.models.LogzSingleSignOnProperties; -import com.azure.resourcemanager.logz.models.SingleSignOnStates; -import org.junit.jupiter.api.Assertions; - -public final class LogzSingleSignOnPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogzSingleSignOnProperties model = - BinaryData - .fromString( - "{\"singleSignOnState\":\"Disable\",\"enterpriseAppId\":\"lzevgbmqjqab\",\"singleSignOnUrl\":\"pmivkwlzu\",\"provisioningState\":\"Deleting\"}") - .toObject(LogzSingleSignOnProperties.class); - Assertions.assertEquals(SingleSignOnStates.DISABLE, model.singleSignOnState()); - Assertions.assertEquals("lzevgbmqjqab", model.enterpriseAppId()); - Assertions.assertEquals("pmivkwlzu", model.singleSignOnUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogzSingleSignOnProperties model = - new LogzSingleSignOnProperties() - .withSingleSignOnState(SingleSignOnStates.DISABLE) - .withEnterpriseAppId("lzevgbmqjqab") - .withSingleSignOnUrl("pmivkwlzu"); - model = BinaryData.fromObject(model).toObject(LogzSingleSignOnProperties.class); - Assertions.assertEquals(SingleSignOnStates.DISABLE, model.singleSignOnState()); - Assertions.assertEquals("lzevgbmqjqab", model.enterpriseAppId()); - Assertions.assertEquals("pmivkwlzu", model.singleSignOnUrl()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnResourceInnerTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnResourceInnerTests.java deleted file mode 100644 index 6ba053677f7d..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnResourceInnerTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.fluent.models.LogzSingleSignOnResourceInner; -import com.azure.resourcemanager.logz.models.LogzSingleSignOnProperties; -import com.azure.resourcemanager.logz.models.SingleSignOnStates; -import org.junit.jupiter.api.Assertions; - -public final class LogzSingleSignOnResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogzSingleSignOnResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"singleSignOnState\":\"Enable\",\"enterpriseAppId\":\"wska\",\"singleSignOnUrl\":\"ktzlcuiywg\",\"provisioningState\":\"Deleting\"},\"id\":\"gndrvynh\",\"name\":\"gpphrcgyn\",\"type\":\"ocpecfvmmco\"}") - .toObject(LogzSingleSignOnResourceInner.class); - Assertions.assertEquals(SingleSignOnStates.ENABLE, model.properties().singleSignOnState()); - Assertions.assertEquals("wska", model.properties().enterpriseAppId()); - Assertions.assertEquals("ktzlcuiywg", model.properties().singleSignOnUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogzSingleSignOnResourceInner model = - new LogzSingleSignOnResourceInner() - .withProperties( - new LogzSingleSignOnProperties() - .withSingleSignOnState(SingleSignOnStates.ENABLE) - .withEnterpriseAppId("wska") - .withSingleSignOnUrl("ktzlcuiywg")); - model = BinaryData.fromObject(model).toObject(LogzSingleSignOnResourceInner.class); - Assertions.assertEquals(SingleSignOnStates.ENABLE, model.properties().singleSignOnState()); - Assertions.assertEquals("wska", model.properties().enterpriseAppId()); - Assertions.assertEquals("ktzlcuiywg", model.properties().singleSignOnUrl()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnResourceListResponseTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnResourceListResponseTests.java deleted file mode 100644 index b3ce2ffd79f1..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/LogzSingleSignOnResourceListResponseTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.fluent.models.LogzSingleSignOnResourceInner; -import com.azure.resourcemanager.logz.models.LogzSingleSignOnProperties; -import com.azure.resourcemanager.logz.models.LogzSingleSignOnResourceListResponse; -import com.azure.resourcemanager.logz.models.SingleSignOnStates; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LogzSingleSignOnResourceListResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogzSingleSignOnResourceListResponse model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"singleSignOnState\":\"Existing\",\"enterpriseAppId\":\"mqc\",\"singleSignOnUrl\":\"q\",\"provisioningState\":\"Deleted\"},\"id\":\"hix\",\"name\":\"igdtopbob\",\"type\":\"og\"},{\"properties\":{\"singleSignOnState\":\"Initial\",\"enterpriseAppId\":\"m\",\"singleSignOnUrl\":\"hrzayvvtpgvdf\",\"provisioningState\":\"Deleted\"},\"id\":\"tkftutqxlngx\",\"name\":\"efgugnxk\",\"type\":\"xdqmidtthzrvqdra\"}],\"nextLink\":\"jybige\"}") - .toObject(LogzSingleSignOnResourceListResponse.class); - Assertions.assertEquals(SingleSignOnStates.EXISTING, model.value().get(0).properties().singleSignOnState()); - Assertions.assertEquals("mqc", model.value().get(0).properties().enterpriseAppId()); - Assertions.assertEquals("q", model.value().get(0).properties().singleSignOnUrl()); - Assertions.assertEquals("jybige", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogzSingleSignOnResourceListResponse model = - new LogzSingleSignOnResourceListResponse() - .withValue( - Arrays - .asList( - new LogzSingleSignOnResourceInner() - .withProperties( - new LogzSingleSignOnProperties() - .withSingleSignOnState(SingleSignOnStates.EXISTING) - .withEnterpriseAppId("mqc") - .withSingleSignOnUrl("q")), - new LogzSingleSignOnResourceInner() - .withProperties( - new LogzSingleSignOnProperties() - .withSingleSignOnState(SingleSignOnStates.INITIAL) - .withEnterpriseAppId("m") - .withSingleSignOnUrl("hrzayvvtpgvdf")))) - .withNextLink("jybige"); - model = BinaryData.fromObject(model).toObject(LogzSingleSignOnResourceListResponse.class); - Assertions.assertEquals(SingleSignOnStates.EXISTING, model.value().get(0).properties().singleSignOnState()); - Assertions.assertEquals("mqc", model.value().get(0).properties().enterpriseAppId()); - Assertions.assertEquals("q", model.value().get(0).properties().singleSignOnUrl()); - Assertions.assertEquals("jybige", model.nextLink()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorOperationsListVMHostsMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorOperationsListVMHostsMockTests.java deleted file mode 100644 index 0af24fb85a82..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorOperationsListVMHostsMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.models.VMResources; -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 MonitorOperationsListVMHostsMockTests { - @Test - public void testListVMHosts() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{\"id\":\"ud\",\"agentVersion\":\"rx\"}]}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.monitorOperations().listVMHosts("wmewzsyy", "euzsoi", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ud", response.iterator().next().id()); - Assertions.assertEquals("rx", response.iterator().next().agentVersion()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorOperationsListVmHostUpdateMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorOperationsListVmHostUpdateMockTests.java deleted file mode 100644 index 89d1988ed220..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorOperationsListVmHostUpdateMockTests.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner; -import com.azure.resourcemanager.logz.models.VMHostUpdateRequest; -import com.azure.resourcemanager.logz.models.VMHostUpdateStates; -import com.azure.resourcemanager.logz.models.VMResources; -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 MonitorOperationsListVmHostUpdateMockTests { - @Test - public void testListVmHostUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{\"id\":\"zrtuzq\",\"agentVersion\":\"sexnevfdnw\"}]}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .monitorOperations() - .listVmHostUpdate( - "moadsuvarmy", - "dmjsjqb", - new VMHostUpdateRequest() - .withVmResourceIds( - Arrays - .asList( - new VMResourcesInner().withId("x").withAgentVersion("wlycoduhpkxkg"), - new VMResourcesInner().withId("areqna").withAgentVersion("qugjhkycube"), - new VMResourcesInner().withId("gssofwq").withAgentVersion("qal"), - new VMResourcesInner().withId("mnjijpxacqqudf").withAgentVersion("yxbaaabjyvayf"))) - .withState(VMHostUpdateStates.INSTALL), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("zrtuzq", response.iterator().next().id()); - Assertions.assertEquals("sexnevfdnw", response.iterator().next().agentVersion()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorPropertiesTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorPropertiesTests.java deleted file mode 100644 index 125d23d8f641..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorPropertiesTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.models.LogzOrganizationProperties; -import com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus; -import com.azure.resourcemanager.logz.models.MonitorProperties; -import com.azure.resourcemanager.logz.models.MonitoringStatus; -import com.azure.resourcemanager.logz.models.PlanData; -import com.azure.resourcemanager.logz.models.UserInfo; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class MonitorPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitorProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Succeeded\",\"monitoringStatus\":\"Enabled\",\"marketplaceSubscriptionStatus\":\"Active\",\"logzOrganizationProperties\":{\"companyName\":\"umkdosvqwhbmd\",\"id\":\"bjf\",\"enterpriseAppId\":\"gmbmbexppbh\",\"singleSignOnUrl\":\"qrolfpf\"},\"userInfo\":{\"firstName\":\"lgbquxig\",\"lastName\":\"jgzjaoyfhrtx\",\"emailAddress\":\"n\",\"phoneNumber\":\"kujysvlejuvfq\"},\"planData\":{\"usageType\":\"lyxwjkcprbnwbx\",\"billingCycle\":\"vtb\",\"planDetails\":\"ysszdnrujqguh\",\"effectiveDate\":\"2021-02-16T19:21:04Z\"},\"liftrResourceCategory\":\"MonitorLogs\",\"liftrResourcePreference\":1747028439}") - .toObject(MonitorProperties.class); - Assertions.assertEquals(MonitoringStatus.ENABLED, model.monitoringStatus()); - Assertions.assertEquals(MarketplaceSubscriptionStatus.ACTIVE, model.marketplaceSubscriptionStatus()); - Assertions.assertEquals("umkdosvqwhbmd", model.logzOrganizationProperties().companyName()); - Assertions.assertEquals("gmbmbexppbh", model.logzOrganizationProperties().enterpriseAppId()); - Assertions.assertEquals("qrolfpf", model.logzOrganizationProperties().singleSignOnUrl()); - Assertions.assertEquals("lgbquxig", model.userInfo().firstName()); - Assertions.assertEquals("jgzjaoyfhrtx", model.userInfo().lastName()); - Assertions.assertEquals("n", model.userInfo().emailAddress()); - Assertions.assertEquals("kujysvlejuvfq", model.userInfo().phoneNumber()); - Assertions.assertEquals("lyxwjkcprbnwbx", model.planData().usageType()); - Assertions.assertEquals("vtb", model.planData().billingCycle()); - Assertions.assertEquals("ysszdnrujqguh", model.planData().planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-16T19:21:04Z"), model.planData().effectiveDate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitorProperties model = - new MonitorProperties() - .withMonitoringStatus(MonitoringStatus.ENABLED) - .withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus.ACTIVE) - .withLogzOrganizationProperties( - new LogzOrganizationProperties() - .withCompanyName("umkdosvqwhbmd") - .withEnterpriseAppId("gmbmbexppbh") - .withSingleSignOnUrl("qrolfpf")) - .withUserInfo( - new UserInfo() - .withFirstName("lgbquxig") - .withLastName("jgzjaoyfhrtx") - .withEmailAddress("n") - .withPhoneNumber("kujysvlejuvfq")) - .withPlanData( - new PlanData() - .withUsageType("lyxwjkcprbnwbx") - .withBillingCycle("vtb") - .withPlanDetails("ysszdnrujqguh") - .withEffectiveDate(OffsetDateTime.parse("2021-02-16T19:21:04Z"))); - model = BinaryData.fromObject(model).toObject(MonitorProperties.class); - Assertions.assertEquals(MonitoringStatus.ENABLED, model.monitoringStatus()); - Assertions.assertEquals(MarketplaceSubscriptionStatus.ACTIVE, model.marketplaceSubscriptionStatus()); - Assertions.assertEquals("umkdosvqwhbmd", model.logzOrganizationProperties().companyName()); - Assertions.assertEquals("gmbmbexppbh", model.logzOrganizationProperties().enterpriseAppId()); - Assertions.assertEquals("qrolfpf", model.logzOrganizationProperties().singleSignOnUrl()); - Assertions.assertEquals("lgbquxig", model.userInfo().firstName()); - Assertions.assertEquals("jgzjaoyfhrtx", model.userInfo().lastName()); - Assertions.assertEquals("n", model.userInfo().emailAddress()); - Assertions.assertEquals("kujysvlejuvfq", model.userInfo().phoneNumber()); - Assertions.assertEquals("lyxwjkcprbnwbx", model.planData().usageType()); - Assertions.assertEquals("vtb", model.planData().billingCycle()); - Assertions.assertEquals("ysszdnrujqguh", model.planData().planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-16T19:21:04Z"), model.planData().effectiveDate()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorUpdatePropertiesTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorUpdatePropertiesTests.java deleted file mode 100644 index 9b265c8f920e..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorUpdatePropertiesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.models.MonitorUpdateProperties; -import com.azure.resourcemanager.logz.models.MonitoringStatus; -import org.junit.jupiter.api.Assertions; - -public final class MonitorUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitorUpdateProperties model = - BinaryData.fromString("{\"monitoringStatus\":\"Disabled\"}").toObject(MonitorUpdateProperties.class); - Assertions.assertEquals(MonitoringStatus.DISABLED, model.monitoringStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitorUpdateProperties model = new MonitorUpdateProperties().withMonitoringStatus(MonitoringStatus.DISABLED); - model = BinaryData.fromObject(model).toObject(MonitorUpdateProperties.class); - Assertions.assertEquals(MonitoringStatus.DISABLED, model.monitoringStatus()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoredResourceInnerTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoredResourceInnerTests.java deleted file mode 100644 index e11d152757f8..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoredResourceInnerTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.fluent.models.MonitoredResourceInner; -import org.junit.jupiter.api.Assertions; - -public final class MonitoredResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoredResourceInner model = - BinaryData - .fromString( - "{\"id\":\"ifsqesaagdfmg\",\"sendingMetrics\":false,\"reasonForMetricsStatus\":\"j\",\"sendingLogs\":true,\"reasonForLogsStatus\":\"wmrvktsizntocipa\"}") - .toObject(MonitoredResourceInner.class); - Assertions.assertEquals("ifsqesaagdfmg", model.id()); - Assertions.assertEquals(false, model.sendingMetrics()); - Assertions.assertEquals("j", model.reasonForMetricsStatus()); - Assertions.assertEquals(true, model.sendingLogs()); - Assertions.assertEquals("wmrvktsizntocipa", model.reasonForLogsStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoredResourceInner model = - new MonitoredResourceInner() - .withId("ifsqesaagdfmg") - .withSendingMetrics(false) - .withReasonForMetricsStatus("j") - .withSendingLogs(true) - .withReasonForLogsStatus("wmrvktsizntocipa"); - model = BinaryData.fromObject(model).toObject(MonitoredResourceInner.class); - Assertions.assertEquals("ifsqesaagdfmg", model.id()); - Assertions.assertEquals(false, model.sendingMetrics()); - Assertions.assertEquals("j", model.reasonForMetricsStatus()); - Assertions.assertEquals(true, model.sendingLogs()); - Assertions.assertEquals("wmrvktsizntocipa", model.reasonForLogsStatus()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoredResourceListResponseTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoredResourceListResponseTests.java deleted file mode 100644 index adbe2d19ae05..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoredResourceListResponseTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.fluent.models.MonitoredResourceInner; -import com.azure.resourcemanager.logz.models.MonitoredResourceListResponse; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MonitoredResourceListResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoredResourceListResponse model = - BinaryData - .fromString( - "{\"value\":[{\"id\":\"quvgjxpybczme\",\"sendingMetrics\":true,\"reasonForMetricsStatus\":\"opb\",\"sendingLogs\":false,\"reasonForLogsStatus\":\"pidgsybbejhphoyc\"},{\"id\":\"xaobhdxbmtqioqjz\",\"sendingMetrics\":false,\"reasonForMetricsStatus\":\"muf\",\"sendingLogs\":false,\"reasonForLogsStatus\":\"izhwlrxy\"},{\"id\":\"soqijg\",\"sendingMetrics\":true,\"reasonForMetricsStatus\":\"pazlobcufpdz\",\"sendingLogs\":false,\"reasonForLogsStatus\":\"qqjnqgl\"}],\"nextLink\":\"gnufoooj\"}") - .toObject(MonitoredResourceListResponse.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).id()); - Assertions.assertEquals(true, model.value().get(0).sendingMetrics()); - Assertions.assertEquals("opb", model.value().get(0).reasonForMetricsStatus()); - Assertions.assertEquals(false, model.value().get(0).sendingLogs()); - Assertions.assertEquals("pidgsybbejhphoyc", model.value().get(0).reasonForLogsStatus()); - Assertions.assertEquals("gnufoooj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoredResourceListResponse model = - new MonitoredResourceListResponse() - .withValue( - Arrays - .asList( - new MonitoredResourceInner() - .withId("quvgjxpybczme") - .withSendingMetrics(true) - .withReasonForMetricsStatus("opb") - .withSendingLogs(false) - .withReasonForLogsStatus("pidgsybbejhphoyc"), - new MonitoredResourceInner() - .withId("xaobhdxbmtqioqjz") - .withSendingMetrics(false) - .withReasonForMetricsStatus("muf") - .withSendingLogs(false) - .withReasonForLogsStatus("izhwlrxy"), - new MonitoredResourceInner() - .withId("soqijg") - .withSendingMetrics(true) - .withReasonForMetricsStatus("pazlobcufpdz") - .withSendingLogs(false) - .withReasonForLogsStatus("qqjnqgl"))) - .withNextLink("gnufoooj"); - model = BinaryData.fromObject(model).toObject(MonitoredResourceListResponse.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).id()); - Assertions.assertEquals(true, model.value().get(0).sendingMetrics()); - Assertions.assertEquals("opb", model.value().get(0).reasonForMetricsStatus()); - Assertions.assertEquals(false, model.value().get(0).sendingLogs()); - Assertions.assertEquals("pidgsybbejhphoyc", model.value().get(0).reasonForLogsStatus()); - Assertions.assertEquals("gnufoooj", model.nextLink()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesInnerTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesInnerTests.java deleted file mode 100644 index 4652600dcbdb..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesInnerTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner; -import com.azure.resourcemanager.logz.models.LogRules; -import com.azure.resourcemanager.logz.models.MonitoringTagRulesProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MonitoringTagRulesInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoringTagRulesInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"logRules\":{\"sendAadLogs\":true,\"sendSubscriptionLogs\":false,\"sendActivityLogs\":true,\"filteringTags\":[]}},\"id\":\"kudjkrlkhb\",\"name\":\"hfepgzgqex\",\"type\":\"locx\"}") - .toObject(MonitoringTagRulesInner.class); - Assertions.assertEquals(true, model.properties().logRules().sendAadLogs()); - Assertions.assertEquals(false, model.properties().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(true, model.properties().logRules().sendActivityLogs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoringTagRulesInner model = - new MonitoringTagRulesInner() - .withProperties( - new MonitoringTagRulesProperties() - .withLogRules( - new LogRules() - .withSendAadLogs(true) - .withSendSubscriptionLogs(false) - .withSendActivityLogs(true) - .withFilteringTags(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(MonitoringTagRulesInner.class); - Assertions.assertEquals(true, model.properties().logRules().sendAadLogs()); - Assertions.assertEquals(false, model.properties().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(true, model.properties().logRules().sendActivityLogs()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesListResponseTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesListResponseTests.java deleted file mode 100644 index 4ee5474262e2..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesListResponseTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner; -import com.azure.resourcemanager.logz.models.MonitoringTagRulesListResponse; -import com.azure.resourcemanager.logz.models.MonitoringTagRulesProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MonitoringTagRulesListResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoringTagRulesListResponse model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleted\"},\"id\":\"soodqxhcrmnoh\",\"name\":\"t\",\"type\":\"kwh\"},{\"properties\":{\"provisioningState\":\"Creating\"},\"id\":\"i\",\"name\":\"jxsqwpgrjbz\",\"type\":\"orcjxvsnby\"},{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"cpc\",\"name\":\"shurzafbljjgpbto\",\"type\":\"c\"}],\"nextLink\":\"klj\"}") - .toObject(MonitoringTagRulesListResponse.class); - Assertions.assertEquals("klj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoringTagRulesListResponse model = - new MonitoringTagRulesListResponse() - .withValue( - Arrays - .asList( - new MonitoringTagRulesInner().withProperties(new MonitoringTagRulesProperties()), - new MonitoringTagRulesInner().withProperties(new MonitoringTagRulesProperties()), - new MonitoringTagRulesInner().withProperties(new MonitoringTagRulesProperties()))) - .withNextLink("klj"); - model = BinaryData.fromObject(model).toObject(MonitoringTagRulesListResponse.class); - Assertions.assertEquals("klj", model.nextLink()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesPropertiesTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesPropertiesTests.java deleted file mode 100644 index 004474d0456f..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitoringTagRulesPropertiesTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.models.FilteringTag; -import com.azure.resourcemanager.logz.models.LogRules; -import com.azure.resourcemanager.logz.models.MonitoringTagRulesProperties; -import com.azure.resourcemanager.logz.models.TagAction; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MonitoringTagRulesPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoringTagRulesProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Succeeded\",\"logRules\":{\"sendAadLogs\":true,\"sendSubscriptionLogs\":true,\"sendActivityLogs\":true,\"filteringTags\":[{\"name\":\"l\",\"value\":\"majtjaod\",\"action\":\"Exclude\"},{\"name\":\"bdxkqpxokaj\",\"value\":\"npime\",\"action\":\"Include\"}]}}") - .toObject(MonitoringTagRulesProperties.class); - Assertions.assertEquals(true, model.logRules().sendAadLogs()); - Assertions.assertEquals(true, model.logRules().sendSubscriptionLogs()); - Assertions.assertEquals(true, model.logRules().sendActivityLogs()); - Assertions.assertEquals("l", model.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("majtjaod", model.logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.logRules().filteringTags().get(0).action()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoringTagRulesProperties model = - new MonitoringTagRulesProperties() - .withLogRules( - new LogRules() - .withSendAadLogs(true) - .withSendSubscriptionLogs(true) - .withSendActivityLogs(true) - .withFilteringTags( - Arrays - .asList( - new FilteringTag() - .withName("l") - .withValue("majtjaod") - .withAction(TagAction.EXCLUDE), - new FilteringTag() - .withName("bdxkqpxokaj") - .withValue("npime") - .withAction(TagAction.INCLUDE)))); - model = BinaryData.fromObject(model).toObject(MonitoringTagRulesProperties.class); - Assertions.assertEquals(true, model.logRules().sendAadLogs()); - Assertions.assertEquals(true, model.logRules().sendSubscriptionLogs()); - Assertions.assertEquals(true, model.logRules().sendActivityLogs()); - Assertions.assertEquals("l", model.logRules().filteringTags().get(0).name()); - Assertions.assertEquals("majtjaod", model.logRules().filteringTags().get(0).value()); - Assertions.assertEquals(TagAction.EXCLUDE, model.logRules().filteringTags().get(0).action()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsCreateMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsCreateMockTests.java deleted file mode 100644 index 689b85ab6a44..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsCreateMockTests.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.models.IdentityProperties; -import com.azure.resourcemanager.logz.models.LogzMonitorResource; -import com.azure.resourcemanager.logz.models.LogzOrganizationProperties; -import com.azure.resourcemanager.logz.models.ManagedIdentityTypes; -import com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus; -import com.azure.resourcemanager.logz.models.MonitorProperties; -import com.azure.resourcemanager.logz.models.MonitoringStatus; -import com.azure.resourcemanager.logz.models.PlanData; -import com.azure.resourcemanager.logz.models.UserInfo; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -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 MonitorsCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"monitoringStatus\":\"Enabled\",\"marketplaceSubscriptionStatus\":\"Active\",\"logzOrganizationProperties\":{\"companyName\":\"wd\",\"id\":\"wz\",\"enterpriseAppId\":\"dbpgnxytxhp\",\"singleSignOnUrl\":\"bzpfzab\"},\"userInfo\":{\"firstName\":\"uhxwtctyqiklbbov\",\"lastName\":\"wzbhvgyugu\",\"emailAddress\":\"vmkfssxqu\",\"phoneNumber\":\"fpl\"},\"planData\":{\"usageType\":\"sxnkjzkdeslpvlo\",\"billingCycle\":\"i\",\"planDetails\":\"ghxpkdw\",\"effectiveDate\":\"2021-11-18T13:59:23Z\"},\"liftrResourceCategory\":\"MonitorLogs\",\"liftrResourcePreference\":830727700},\"identity\":{\"principalId\":\"umnyqu\",\"tenantId\":\"deoj\",\"type\":\"UserAssigned\"},\"location\":\"ckhsmtxpsieb\",\"tags\":{\"tldwkyzxuutk\":\"vpesapskrdqmhjjd\",\"togt\":\"cwscwsvlx\",\"vce\":\"rupqsxvnmicy\",\"ovnotyfjfcnjbkcn\":\"vei\"},\"id\":\"dhbt\",\"name\":\"kphywpnvjto\",\"type\":\"nermcl\"}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - LogzMonitorResource response = - manager - .monitors() - .define("idokgjlj") - .withRegion("nbtkcxywnytnr") - .withExistingResourceGroup("vuujq") - .withTags( - mapOf("czfc", "lqidyby", "rqlfktsthsucocmn", "haaxdbabphl", "ckzywbiexzfeyue", "yazttbtwwrqpue")) - .withProperties( - new MonitorProperties() - .withMonitoringStatus(MonitoringStatus.DISABLED) - .withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus.SUSPENDED) - .withLogzOrganizationProperties( - new LogzOrganizationProperties() - .withCompanyName("ncghkje") - .withEnterpriseAppId("bfs") - .withSingleSignOnUrl("nehmpvecx")) - .withUserInfo( - new UserInfo() - .withFirstName("ebfqkkrbm") - .withLastName("kgriwflzlfbx") - .withEmailAddress("uzycispnqza") - .withPhoneNumber("gkbrpyyd")) - .withPlanData( - new PlanData() - .withUsageType("nuqqkpikadrgvt") - .withBillingCycle("gnbuy") - .withPlanDetails("ijggmebfsiar") - .withEffectiveDate(OffsetDateTime.parse("2021-08-14T22:49:32Z")))) - .withIdentity(new IdentityProperties().withType(ManagedIdentityTypes.USER_ASSIGNED)) - .create(); - - Assertions.assertEquals("ckhsmtxpsieb", response.location()); - Assertions.assertEquals("vpesapskrdqmhjjd", response.tags().get("tldwkyzxuutk")); - Assertions.assertEquals(MonitoringStatus.ENABLED, response.properties().monitoringStatus()); - Assertions - .assertEquals(MarketplaceSubscriptionStatus.ACTIVE, response.properties().marketplaceSubscriptionStatus()); - Assertions.assertEquals("wd", response.properties().logzOrganizationProperties().companyName()); - Assertions.assertEquals("dbpgnxytxhp", response.properties().logzOrganizationProperties().enterpriseAppId()); - Assertions.assertEquals("bzpfzab", response.properties().logzOrganizationProperties().singleSignOnUrl()); - Assertions.assertEquals("uhxwtctyqiklbbov", response.properties().userInfo().firstName()); - Assertions.assertEquals("wzbhvgyugu", response.properties().userInfo().lastName()); - Assertions.assertEquals("vmkfssxqu", response.properties().userInfo().emailAddress()); - Assertions.assertEquals("fpl", response.properties().userInfo().phoneNumber()); - Assertions.assertEquals("sxnkjzkdeslpvlo", response.properties().planData().usageType()); - Assertions.assertEquals("i", response.properties().planData().billingCycle()); - Assertions.assertEquals("ghxpkdw", response.properties().planData().planDetails()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-11-18T13:59:23Z"), response.properties().planData().effectiveDate()); - Assertions.assertEquals(ManagedIdentityTypes.USER_ASSIGNED, response.identity().type()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsDeleteMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsDeleteMockTests.java deleted file mode 100644 index cb5e56f7e69b..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.monitors().delete("nkymuctqhjfbebrj", "xerf", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsGetByResourceGroupWithResponseMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index ecfa9709a2aa..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.models.LogzMonitorResource; -import com.azure.resourcemanager.logz.models.ManagedIdentityTypes; -import com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus; -import com.azure.resourcemanager.logz.models.MonitoringStatus; -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 MonitorsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Updating\",\"monitoringStatus\":\"Enabled\",\"marketplaceSubscriptionStatus\":\"Active\",\"logzOrganizationProperties\":{\"companyName\":\"qzntypm\",\"id\":\"p\",\"enterpriseAppId\":\"c\",\"singleSignOnUrl\":\"qjsdpydnfyhxdeo\"},\"userInfo\":{\"firstName\":\"icwifsjtt\",\"lastName\":\"fbishcbkha\",\"emailAddress\":\"eyeam\",\"phoneNumber\":\"hagalpbuxwgipwh\"},\"planData\":{\"usageType\":\"wkgshwa\",\"billingCycle\":\"ixzbinjeputtmryw\",\"planDetails\":\"zoqftiyqzrnkcqvy\",\"effectiveDate\":\"2021-11-01T04:15:41Z\"},\"liftrResourceCategory\":\"Unknown\",\"liftrResourcePreference\":1368622267},\"identity\":{\"principalId\":\"ohoqqnwvlryav\",\"tenantId\":\"heun\",\"type\":\"UserAssigned\"},\"location\":\"hgyxzkonoc\",\"tags\":{\"szfkbe\":\"klyaxuconu\",\"jmwvvj\":\"pewr\",\"xsenhwlr\":\"kt\"},\"id\":\"ffrzpwvlqdqgbiqy\",\"name\":\"ihkaetcktvfc\",\"type\":\"vf\"}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - LogzMonitorResource response = - manager - .monitors() - .getByResourceGroupWithResponse("pocipazyxoegu", "g", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hgyxzkonoc", response.location()); - Assertions.assertEquals("klyaxuconu", response.tags().get("szfkbe")); - Assertions.assertEquals(MonitoringStatus.ENABLED, response.properties().monitoringStatus()); - Assertions - .assertEquals(MarketplaceSubscriptionStatus.ACTIVE, response.properties().marketplaceSubscriptionStatus()); - Assertions.assertEquals("qzntypm", response.properties().logzOrganizationProperties().companyName()); - Assertions.assertEquals("c", response.properties().logzOrganizationProperties().enterpriseAppId()); - Assertions - .assertEquals("qjsdpydnfyhxdeo", response.properties().logzOrganizationProperties().singleSignOnUrl()); - Assertions.assertEquals("icwifsjtt", response.properties().userInfo().firstName()); - Assertions.assertEquals("fbishcbkha", response.properties().userInfo().lastName()); - Assertions.assertEquals("eyeam", response.properties().userInfo().emailAddress()); - Assertions.assertEquals("hagalpbuxwgipwh", response.properties().userInfo().phoneNumber()); - Assertions.assertEquals("wkgshwa", response.properties().planData().usageType()); - Assertions.assertEquals("ixzbinjeputtmryw", response.properties().planData().billingCycle()); - Assertions.assertEquals("zoqftiyqzrnkcqvy", response.properties().planData().planDetails()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-11-01T04:15:41Z"), response.properties().planData().effectiveDate()); - Assertions.assertEquals(ManagedIdentityTypes.USER_ASSIGNED, response.identity().type()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListByResourceGroupMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListByResourceGroupMockTests.java deleted file mode 100644 index 9936ded2a77f..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListByResourceGroupMockTests.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.models.LogzMonitorResource; -import com.azure.resourcemanager.logz.models.ManagedIdentityTypes; -import com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus; -import com.azure.resourcemanager.logz.models.MonitoringStatus; -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 MonitorsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"monitoringStatus\":\"Disabled\",\"marketplaceSubscriptionStatus\":\"Suspended\",\"logzOrganizationProperties\":{\"companyName\":\"qjvsovmyokacs\",\"id\":\"w\",\"enterpriseAppId\":\"zdobpxjmflbvvnch\",\"singleSignOnUrl\":\"cciw\"},\"userInfo\":{\"firstName\":\"uqkhrsajiwku\",\"lastName\":\"oskg\",\"emailAddress\":\"auu\",\"phoneNumber\":\"jmvxie\"},\"planData\":{\"usageType\":\"gidyjrrf\",\"billingCycle\":\"aos\",\"planDetails\":\"xc\",\"effectiveDate\":\"2021-04-15T11:53:36Z\"},\"liftrResourceCategory\":\"MonitorLogs\",\"liftrResourcePreference\":316608134},\"identity\":{\"principalId\":\"ohslkevlegg\",\"tenantId\":\"buhfmvfaxkffeiit\",\"type\":\"SystemAssigned\"},\"location\":\"m\",\"tags\":{\"hxmzsbbzoggig\":\"v\",\"ydptkoen\":\"xwburvjxxjns\"},\"id\":\"ou\",\"name\":\"nvudwtiukb\",\"type\":\"dng\"}]}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.monitors().listByResourceGroup("watkpnpulexxb", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("m", response.iterator().next().location()); - Assertions.assertEquals("v", response.iterator().next().tags().get("hxmzsbbzoggig")); - Assertions.assertEquals(MonitoringStatus.DISABLED, response.iterator().next().properties().monitoringStatus()); - Assertions - .assertEquals( - MarketplaceSubscriptionStatus.SUSPENDED, - response.iterator().next().properties().marketplaceSubscriptionStatus()); - Assertions - .assertEquals( - "qjvsovmyokacs", response.iterator().next().properties().logzOrganizationProperties().companyName()); - Assertions - .assertEquals( - "zdobpxjmflbvvnch", - response.iterator().next().properties().logzOrganizationProperties().enterpriseAppId()); - Assertions - .assertEquals( - "cciw", response.iterator().next().properties().logzOrganizationProperties().singleSignOnUrl()); - Assertions.assertEquals("uqkhrsajiwku", response.iterator().next().properties().userInfo().firstName()); - Assertions.assertEquals("oskg", response.iterator().next().properties().userInfo().lastName()); - Assertions.assertEquals("auu", response.iterator().next().properties().userInfo().emailAddress()); - Assertions.assertEquals("jmvxie", response.iterator().next().properties().userInfo().phoneNumber()); - Assertions.assertEquals("gidyjrrf", response.iterator().next().properties().planData().usageType()); - Assertions.assertEquals("aos", response.iterator().next().properties().planData().billingCycle()); - Assertions.assertEquals("xc", response.iterator().next().properties().planData().planDetails()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-04-15T11:53:36Z"), - response.iterator().next().properties().planData().effectiveDate()); - Assertions.assertEquals(ManagedIdentityTypes.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListMockTests.java deleted file mode 100644 index 28ac639936eb..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListMockTests.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.models.LogzMonitorResource; -import com.azure.resourcemanager.logz.models.ManagedIdentityTypes; -import com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus; -import com.azure.resourcemanager.logz.models.MonitoringStatus; -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 MonitorsListMockTests { - @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\":{\"provisioningState\":\"Deleting\",\"monitoringStatus\":\"Disabled\",\"marketplaceSubscriptionStatus\":\"Suspended\",\"logzOrganizationProperties\":{\"companyName\":\"wey\",\"id\":\"menevfyexfwh\",\"enterpriseAppId\":\"cibvyvdcsitynn\",\"singleSignOnUrl\":\"mdectehfiqscjey\"},\"userInfo\":{\"firstName\":\"ezrkgqhcjrefo\",\"lastName\":\"mkqsleyyv\",\"emailAddress\":\"qjpkcattpngjcrc\",\"phoneNumber\":\"sqpjhvmdajvn\"},\"planData\":{\"usageType\":\"unqecanoae\",\"billingCycle\":\"fhyhltrpmopjmcma\",\"planDetails\":\"okth\",\"effectiveDate\":\"2021-07-03T23:07:28Z\"},\"liftrResourceCategory\":\"MonitorLogs\",\"liftrResourcePreference\":1445775245},\"identity\":{\"principalId\":\"cpkvxodp\",\"tenantId\":\"zmyzydagf\",\"type\":\"UserAssigned\"},\"location\":\"bezy\",\"tags\":{\"ywqsmbsurexim\":\"kktwhrdxw\",\"stkiiuxhqyud\":\"ryocfsfksymdd\",\"rq\":\"o\"},\"id\":\"b\",\"name\":\"oczvy\",\"type\":\"fqrvkdvjsllrmvvd\"}]}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.monitors().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("bezy", response.iterator().next().location()); - Assertions.assertEquals("kktwhrdxw", response.iterator().next().tags().get("ywqsmbsurexim")); - Assertions.assertEquals(MonitoringStatus.DISABLED, response.iterator().next().properties().monitoringStatus()); - Assertions - .assertEquals( - MarketplaceSubscriptionStatus.SUSPENDED, - response.iterator().next().properties().marketplaceSubscriptionStatus()); - Assertions - .assertEquals("wey", response.iterator().next().properties().logzOrganizationProperties().companyName()); - Assertions - .assertEquals( - "cibvyvdcsitynn", - response.iterator().next().properties().logzOrganizationProperties().enterpriseAppId()); - Assertions - .assertEquals( - "mdectehfiqscjey", - response.iterator().next().properties().logzOrganizationProperties().singleSignOnUrl()); - Assertions.assertEquals("ezrkgqhcjrefo", response.iterator().next().properties().userInfo().firstName()); - Assertions.assertEquals("mkqsleyyv", response.iterator().next().properties().userInfo().lastName()); - Assertions.assertEquals("qjpkcattpngjcrc", response.iterator().next().properties().userInfo().emailAddress()); - Assertions.assertEquals("sqpjhvmdajvn", response.iterator().next().properties().userInfo().phoneNumber()); - Assertions.assertEquals("unqecanoae", response.iterator().next().properties().planData().usageType()); - Assertions.assertEquals("fhyhltrpmopjmcma", response.iterator().next().properties().planData().billingCycle()); - Assertions.assertEquals("okth", response.iterator().next().properties().planData().planDetails()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-07-03T23:07:28Z"), - response.iterator().next().properties().planData().effectiveDate()); - Assertions.assertEquals(ManagedIdentityTypes.USER_ASSIGNED, response.iterator().next().identity().type()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListMonitoredResourcesMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListMonitoredResourcesMockTests.java deleted file mode 100644 index dbae68c1db14..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListMonitoredResourcesMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.models.MonitoredResource; -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\":\"udwxdndnvowguj\",\"sendingMetrics\":true,\"reasonForMetricsStatus\":\"dkcglhsl\",\"sendingLogs\":true,\"reasonForLogsStatus\":\"ggd\"}]}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.monitors().listMonitoredResources("avo", "xzdmohctb", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("udwxdndnvowguj", response.iterator().next().id()); - Assertions.assertEquals(true, response.iterator().next().sendingMetrics()); - Assertions.assertEquals("dkcglhsl", response.iterator().next().reasonForMetricsStatus()); - Assertions.assertEquals(true, response.iterator().next().sendingLogs()); - Assertions.assertEquals("ggd", response.iterator().next().reasonForLogsStatus()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListUserRolesMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListUserRolesMockTests.java deleted file mode 100644 index fb631fe93aa6..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/MonitorsListUserRolesMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.models.UserRole; -import com.azure.resourcemanager.logz.models.UserRoleRequest; -import com.azure.resourcemanager.logz.models.UserRoleResponse; -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 MonitorsListUserRolesMockTests { - @Test - public void testListUserRoles() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{\"role\":\"Admin\"}]}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .monitors() - .listUserRoles( - "wutttxfvjrbi", - "phxepcyvahf", - new UserRoleRequest().withEmailAddress("jky"), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals(UserRole.ADMIN, response.iterator().next().role()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationDisplayTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationDisplayTests.java deleted file mode 100644 index be638c944558..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationDisplayTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"pikxwczbyscnpqxu\",\"resource\":\"vyq\",\"operation\":\"wby\",\"description\":\"k\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("pikxwczbyscnpqxu", model.provider()); - Assertions.assertEquals("vyq", model.resource()); - Assertions.assertEquals("wby", model.operation()); - Assertions.assertEquals("k", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = - new OperationDisplay() - .withProvider("pikxwczbyscnpqxu") - .withResource("vyq") - .withOperation("wby") - .withDescription("k"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("pikxwczbyscnpqxu", model.provider()); - Assertions.assertEquals("vyq", model.resource()); - Assertions.assertEquals("wby", model.operation()); - Assertions.assertEquals("k", model.description()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationListResultTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationListResultTests.java deleted file mode 100644 index cef8df7b4573..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationListResultTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.fluent.models.OperationResultInner; -import com.azure.resourcemanager.logz.models.OperationDisplay; -import com.azure.resourcemanager.logz.models.OperationListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"psqucmpoyf\",\"isDataAction\":true,\"display\":{\"provider\":\"knygjofjddeq\",\"resource\":\"deupewnwrei\",\"operation\":\"zyf\",\"description\":\"sarhmofc\"},\"origin\":\"smy\"},{\"name\":\"kdtmlxhekuk\",\"isDataAction\":false,\"display\":{\"provider\":\"kc\",\"resource\":\"parcry\",\"operation\":\"nzwuxzd\",\"description\":\"a\"},\"origin\":\"lhmwhfpmrqobm\"}],\"nextLink\":\"kknryrtihf\"}") - .toObject(OperationListResult.class); - Assertions.assertEquals("psqucmpoyf", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("knygjofjddeq", model.value().get(0).display().provider()); - Assertions.assertEquals("deupewnwrei", model.value().get(0).display().resource()); - Assertions.assertEquals("zyf", model.value().get(0).display().operation()); - Assertions.assertEquals("sarhmofc", model.value().get(0).display().description()); - Assertions.assertEquals("smy", model.value().get(0).origin()); - Assertions.assertEquals("kknryrtihf", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = - new OperationListResult() - .withValue( - Arrays - .asList( - new OperationResultInner() - .withName("psqucmpoyf") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("knygjofjddeq") - .withResource("deupewnwrei") - .withOperation("zyf") - .withDescription("sarhmofc")) - .withOrigin("smy"), - new OperationResultInner() - .withName("kdtmlxhekuk") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("kc") - .withResource("parcry") - .withOperation("nzwuxzd") - .withDescription("a")) - .withOrigin("lhmwhfpmrqobm"))) - .withNextLink("kknryrtihf"); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - Assertions.assertEquals("psqucmpoyf", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("knygjofjddeq", model.value().get(0).display().provider()); - Assertions.assertEquals("deupewnwrei", model.value().get(0).display().resource()); - Assertions.assertEquals("zyf", model.value().get(0).display().operation()); - Assertions.assertEquals("sarhmofc", model.value().get(0).display().description()); - Assertions.assertEquals("smy", model.value().get(0).origin()); - Assertions.assertEquals("kknryrtihf", model.nextLink()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationResultInnerTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationResultInnerTests.java deleted file mode 100644 index 21d2ffefb421..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationResultInnerTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.fluent.models.OperationResultInner; -import com.azure.resourcemanager.logz.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationResultInner model = - BinaryData - .fromString( - "{\"name\":\"ijbpzvgnwzsymgl\",\"isDataAction\":true,\"display\":{\"provider\":\"zk\",\"resource\":\"dbihanufhfcbj\",\"operation\":\"a\",\"description\":\"th\"},\"origin\":\"hab\"}") - .toObject(OperationResultInner.class); - Assertions.assertEquals("ijbpzvgnwzsymgl", model.name()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals("zk", model.display().provider()); - Assertions.assertEquals("dbihanufhfcbj", model.display().resource()); - Assertions.assertEquals("a", model.display().operation()); - Assertions.assertEquals("th", model.display().description()); - Assertions.assertEquals("hab", model.origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationResultInner model = - new OperationResultInner() - .withName("ijbpzvgnwzsymgl") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("zk") - .withResource("dbihanufhfcbj") - .withOperation("a") - .withDescription("th")) - .withOrigin("hab"); - model = BinaryData.fromObject(model).toObject(OperationResultInner.class); - Assertions.assertEquals("ijbpzvgnwzsymgl", model.name()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals("zk", model.display().provider()); - Assertions.assertEquals("dbihanufhfcbj", model.display().resource()); - Assertions.assertEquals("a", model.display().operation()); - Assertions.assertEquals("th", model.display().description()); - Assertions.assertEquals("hab", model.origin()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationsListMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationsListMockTests.java deleted file mode 100644 index bbabd7d4cbb7..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/OperationsListMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.models.OperationResult; -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 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\":\"lphox\",\"isDataAction\":false,\"display\":{\"provider\":\"abgy\",\"resource\":\"sbj\",\"operation\":\"zq\",\"description\":\"xywpmueefjzwfqkq\"},\"origin\":\"ids\"}]}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("lphox", response.iterator().next().name()); - Assertions.assertEquals(false, response.iterator().next().isDataAction()); - Assertions.assertEquals("abgy", response.iterator().next().display().provider()); - Assertions.assertEquals("sbj", response.iterator().next().display().resource()); - Assertions.assertEquals("zq", response.iterator().next().display().operation()); - Assertions.assertEquals("xywpmueefjzwfqkq", response.iterator().next().display().description()); - Assertions.assertEquals("ids", response.iterator().next().origin()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/PlanDataTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/PlanDataTests.java deleted file mode 100644 index 3aa48c8796f0..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/PlanDataTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.models.PlanData; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class PlanDataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PlanData model = - BinaryData - .fromString( - "{\"usageType\":\"ymzidn\",\"billingCycle\":\"zcxtbzsgfyccsn\",\"planDetails\":\"mdwzjeiachboo\",\"effectiveDate\":\"2021-07-31T08:54:57Z\"}") - .toObject(PlanData.class); - Assertions.assertEquals("ymzidn", model.usageType()); - Assertions.assertEquals("zcxtbzsgfyccsn", model.billingCycle()); - Assertions.assertEquals("mdwzjeiachboo", model.planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-31T08:54:57Z"), model.effectiveDate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PlanData model = - new PlanData() - .withUsageType("ymzidn") - .withBillingCycle("zcxtbzsgfyccsn") - .withPlanDetails("mdwzjeiachboo") - .withEffectiveDate(OffsetDateTime.parse("2021-07-31T08:54:57Z")); - model = BinaryData.fromObject(model).toObject(PlanData.class); - Assertions.assertEquals("ymzidn", model.usageType()); - Assertions.assertEquals("zcxtbzsgfyccsn", model.billingCycle()); - Assertions.assertEquals("mdwzjeiachboo", model.planDetails()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-31T08:54:57Z"), model.effectiveDate()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsCreateOrUpdateMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsCreateOrUpdateMockTests.java deleted file mode 100644 index 70b684a31e3e..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.models.LogzSingleSignOnProperties; -import com.azure.resourcemanager.logz.models.LogzSingleSignOnResource; -import com.azure.resourcemanager.logz.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 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\":\"Existing\",\"enterpriseAppId\":\"ojvknmefqsgzvaha\",\"singleSignOnUrl\":\"y\",\"provisioningState\":\"Succeeded\"},\"id\":\"vgqzcjrvxd\",\"name\":\"zlmwlxkvugfhz\",\"type\":\"vawjvzunlu\"}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - LogzSingleSignOnResource response = - manager - .singleSignOns() - .define("iebwwaloayqcgwrt") - .withExistingMonitor("wxzvlvqhjkb", "gibtnm") - .withProperties( - new LogzSingleSignOnProperties() - .withSingleSignOnState(SingleSignOnStates.ENABLE) - .withEnterpriseAppId("yzm") - .withSingleSignOnUrl("xongmtsavjcbpwxq")) - .create(); - - Assertions.assertEquals(SingleSignOnStates.EXISTING, response.properties().singleSignOnState()); - Assertions.assertEquals("ojvknmefqsgzvaha", response.properties().enterpriseAppId()); - Assertions.assertEquals("y", response.properties().singleSignOnUrl()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsGetWithResponseMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsGetWithResponseMockTests.java deleted file mode 100644 index 7761f05c732c..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsGetWithResponseMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.models.LogzSingleSignOnResource; -import com.azure.resourcemanager.logz.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\":\"Enable\",\"enterpriseAppId\":\"upjm\",\"singleSignOnUrl\":\"fxobbcsws\",\"provisioningState\":\"Deleted\"},\"id\":\"riplrbpbewtg\",\"name\":\"fgb\",\"type\":\"c\"}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - LogzSingleSignOnResource response = - manager - .singleSignOns() - .getWithResponse("nhjdauw", "vylwzbtdhxuj", "nbmpowuwprzq", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(SingleSignOnStates.ENABLE, response.properties().singleSignOnState()); - Assertions.assertEquals("upjm", response.properties().enterpriseAppId()); - Assertions.assertEquals("fxobbcsws", response.properties().singleSignOnUrl()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsListMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsListMockTests.java deleted file mode 100644 index f076797305b0..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SingleSignOnsListMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.models.LogzSingleSignOnResource; -import com.azure.resourcemanager.logz.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\":\"Enable\",\"enterpriseAppId\":\"nrjawgqwg\",\"singleSignOnUrl\":\"ni\",\"provisioningState\":\"Accepted\"},\"id\":\"fbkp\",\"name\":\"cg\",\"type\":\"lwn\"}]}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.singleSignOns().list("hzceuojgjrwjue", "otwmcdyt", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(SingleSignOnStates.ENABLE, response.iterator().next().properties().singleSignOnState()); - Assertions.assertEquals("nrjawgqwg", response.iterator().next().properties().enterpriseAppId()); - Assertions.assertEquals("ni", response.iterator().next().properties().singleSignOnUrl()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesCreateOrUpdateWithResponseMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 9169f1d126be..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.fluent.models.MonitoringTagRulesInner; -import com.azure.resourcemanager.logz.models.LogRules; -import com.azure.resourcemanager.logz.models.MonitoringTagRules; -import com.azure.resourcemanager.logz.models.MonitoringTagRulesProperties; -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 SubAccountTagRulesCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Updating\",\"logRules\":{\"sendAadLogs\":false,\"sendSubscriptionLogs\":false,\"sendActivityLogs\":false,\"filteringTags\":[]}},\"id\":\"jhfjxwm\",\"name\":\"zk\",\"type\":\"foqreyfkzik\"}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MonitoringTagRules response = - manager - .subAccountTagRules() - .createOrUpdateWithResponse( - "ivgvvcna", - "rhyrnxxmueed", - "drd", - "stkwqqtch", - new MonitoringTagRulesInner() - .withProperties( - new MonitoringTagRulesProperties() - .withLogRules( - new LogRules() - .withSendAadLogs(false) - .withSendSubscriptionLogs(true) - .withSendActivityLogs(false) - .withFilteringTags(Arrays.asList()))), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.properties().logRules().sendAadLogs()); - Assertions.assertEquals(false, response.properties().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(false, response.properties().logRules().sendActivityLogs()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesDeleteWithResponseMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesDeleteWithResponseMockTests.java deleted file mode 100644 index f46f3cb93559..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -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 SubAccountTagRulesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .subAccountTagRules() - .deleteWithResponse("tcs", "fcktqumiekke", "zikhl", "fjhdg", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesGetWithResponseMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesGetWithResponseMockTests.java deleted file mode 100644 index 51b4a12228a5..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesGetWithResponseMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.models.MonitoringTagRules; -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 SubAccountTagRulesGetWithResponseMockTests { - @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\":{\"provisioningState\":\"Deleting\",\"logRules\":{\"sendAadLogs\":true,\"sendSubscriptionLogs\":false,\"sendActivityLogs\":false,\"filteringTags\":[]}},\"id\":\"osphyoul\",\"name\":\"jrvxaglrv\",\"type\":\"mjwosytx\"}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MonitoringTagRules response = - manager - .subAccountTagRules() - .getWithResponse("jawneaiv", "wczelpci", "elsfeaen", "abfatkl", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.properties().logRules().sendAadLogs()); - Assertions.assertEquals(false, response.properties().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(false, response.properties().logRules().sendActivityLogs()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesListMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesListMockTests.java deleted file mode 100644 index 18b206c2835e..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountTagRulesListMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.models.MonitoringTagRules; -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 SubAccountTagRulesListMockTests { - @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\":{\"provisioningState\":\"NotSpecified\",\"logRules\":{\"sendAadLogs\":true,\"sendSubscriptionLogs\":false,\"sendActivityLogs\":false,\"filteringTags\":[]}},\"id\":\"zikywgg\",\"name\":\"kallatmel\",\"type\":\"uipiccjzk\"}]}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.subAccountTagRules().list("ocogj", "tdtbnnhadooc", "kvci", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(true, response.iterator().next().properties().logRules().sendAadLogs()); - Assertions.assertEquals(false, response.iterator().next().properties().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(false, response.iterator().next().properties().logRules().sendActivityLogs()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsCreateMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsCreateMockTests.java deleted file mode 100644 index 6d6d9c0f63bb..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsCreateMockTests.java +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.fluent.models.LogzMonitorResourceInner; -import com.azure.resourcemanager.logz.models.IdentityProperties; -import com.azure.resourcemanager.logz.models.LogzMonitorResource; -import com.azure.resourcemanager.logz.models.LogzOrganizationProperties; -import com.azure.resourcemanager.logz.models.ManagedIdentityTypes; -import com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus; -import com.azure.resourcemanager.logz.models.MonitorProperties; -import com.azure.resourcemanager.logz.models.MonitoringStatus; -import com.azure.resourcemanager.logz.models.PlanData; -import com.azure.resourcemanager.logz.models.UserInfo; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -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 SubAccountsCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"monitoringStatus\":\"Enabled\",\"marketplaceSubscriptionStatus\":\"Active\",\"logzOrganizationProperties\":{\"companyName\":\"zdnds\",\"id\":\"nayqi\",\"enterpriseAppId\":\"nduhavhqlkthum\",\"singleSignOnUrl\":\"olbgycduiertgccy\"},\"userInfo\":{\"firstName\":\"olpsslqlf\",\"lastName\":\"dnbbglzps\",\"emailAddress\":\"ydmcwyhzdxssa\",\"phoneNumber\":\"zmnvdfznudaod\"},\"planData\":{\"usageType\":\"bncblylpstdbhhx\",\"billingCycle\":\"zdzucerscdntnevf\",\"planDetails\":\"jmygtdsslswtmwer\",\"effectiveDate\":\"2021-09-22T20:42:28Z\"},\"liftrResourceCategory\":\"Unknown\",\"liftrResourcePreference\":158092972},\"identity\":{\"principalId\":\"mwabnetshhszhedp\",\"tenantId\":\"wiwubm\",\"type\":\"UserAssigned\"},\"location\":\"esl\",\"tags\":{\"lcxog\":\"wwtppj\"},\"id\":\"okonzmnsikvmkqz\",\"name\":\"qqkdltfzxmhhvhgu\",\"type\":\"eodkwobda\"}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - LogzMonitorResource response = - manager - .subAccounts() - .create( - "ol", - "dahzxctobg", - "kdmoi", - new LogzMonitorResourceInner() - .withLocation("rfbjf") - .withTags(mapOf("zbexilzznfqqnvw", "ssotftpv")) - .withProperties( - new MonitorProperties() - .withMonitoringStatus(MonitoringStatus.ENABLED) - .withMarketplaceSubscriptionStatus(MarketplaceSubscriptionStatus.ACTIVE) - .withLogzOrganizationProperties( - new LogzOrganizationProperties() - .withCompanyName("unrmfqjhhkxb") - .withEnterpriseAppId("hx") - .withSingleSignOnUrl("yngudivk")) - .withUserInfo( - new UserInfo() - .withFirstName("wbxqzvszjfau") - .withLastName("fdxxivetvtcqaqtd") - .withEmailAddress("mcbxvwvxysl") - .withPhoneNumber("hsfxoblytkb")) - .withPlanData( - new PlanData() - .withUsageType("ewwwfbkrvrnsv") - .withBillingCycle("q") - .withPlanDetails("hxcr") - .withEffectiveDate(OffsetDateTime.parse("2020-12-28T12:25:09Z")))) - .withIdentity(new IdentityProperties().withType(ManagedIdentityTypes.USER_ASSIGNED)), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("esl", response.location()); - Assertions.assertEquals("wwtppj", response.tags().get("lcxog")); - Assertions.assertEquals(MonitoringStatus.ENABLED, response.properties().monitoringStatus()); - Assertions - .assertEquals(MarketplaceSubscriptionStatus.ACTIVE, response.properties().marketplaceSubscriptionStatus()); - Assertions.assertEquals("zdnds", response.properties().logzOrganizationProperties().companyName()); - Assertions.assertEquals("nduhavhqlkthum", response.properties().logzOrganizationProperties().enterpriseAppId()); - Assertions - .assertEquals("olbgycduiertgccy", response.properties().logzOrganizationProperties().singleSignOnUrl()); - Assertions.assertEquals("olpsslqlf", response.properties().userInfo().firstName()); - Assertions.assertEquals("dnbbglzps", response.properties().userInfo().lastName()); - Assertions.assertEquals("ydmcwyhzdxssa", response.properties().userInfo().emailAddress()); - Assertions.assertEquals("zmnvdfznudaod", response.properties().userInfo().phoneNumber()); - Assertions.assertEquals("bncblylpstdbhhx", response.properties().planData().usageType()); - Assertions.assertEquals("zdzucerscdntnevf", response.properties().planData().billingCycle()); - Assertions.assertEquals("jmygtdsslswtmwer", response.properties().planData().planDetails()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-09-22T20:42:28Z"), response.properties().planData().effectiveDate()); - Assertions.assertEquals(ManagedIdentityTypes.USER_ASSIGNED, response.identity().type()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsDeleteMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsDeleteMockTests.java deleted file mode 100644 index 3950bcf92d56..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -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 SubAccountsDeleteMockTests { - @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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.subAccounts().delete("ld", "mgxcxrslpm", "twuoegrpkhjwni", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsGetWithResponseMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsGetWithResponseMockTests.java deleted file mode 100644 index 771773c3733b..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsGetWithResponseMockTests.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.models.LogzMonitorResource; -import com.azure.resourcemanager.logz.models.ManagedIdentityTypes; -import com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus; -import com.azure.resourcemanager.logz.models.MonitoringStatus; -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 SubAccountsGetWithResponseMockTests { - @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\":{\"provisioningState\":\"Succeeded\",\"monitoringStatus\":\"Disabled\",\"marketplaceSubscriptionStatus\":\"Active\",\"logzOrganizationProperties\":{\"companyName\":\"tkoievseotgq\",\"id\":\"ltmuwlauwzizx\",\"enterpriseAppId\":\"pgcjefuzmuvp\",\"singleSignOnUrl\":\"tdum\"},\"userInfo\":{\"firstName\":\"pxebmnzbt\",\"lastName\":\"jpglkfgohdne\",\"emailAddress\":\"lfphsdyhtozfikd\",\"phoneNumber\":\"wq\"},\"planData\":{\"usageType\":\"xzxcl\",\"billingCycle\":\"thhqzonosggbh\",\"planDetails\":\"hfwdsjnkaljutiis\",\"effectiveDate\":\"2020-12-21T01:44:52Z\"},\"liftrResourceCategory\":\"Unknown\",\"liftrResourcePreference\":2043531661},\"identity\":{\"principalId\":\"zewk\",\"tenantId\":\"hqcrailvpnpp\",\"type\":\"SystemAssigned\"},\"location\":\"lrwdmhdlxyj\",\"tags\":{\"edgfbcvkcvq\":\"agafcnihgwqap\"},\"id\":\"pkeqdcvdrhvoo\",\"name\":\"sotbob\",\"type\":\"dopcjwvnh\"}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - LogzMonitorResource response = - manager - .subAccounts() - .getWithResponse("xtibqdxbxwakbog", "xndlkzgxhu", "iplbpodxunkbebxm", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("lrwdmhdlxyj", response.location()); - Assertions.assertEquals("agafcnihgwqap", response.tags().get("edgfbcvkcvq")); - Assertions.assertEquals(MonitoringStatus.DISABLED, response.properties().monitoringStatus()); - Assertions - .assertEquals(MarketplaceSubscriptionStatus.ACTIVE, response.properties().marketplaceSubscriptionStatus()); - Assertions.assertEquals("tkoievseotgq", response.properties().logzOrganizationProperties().companyName()); - Assertions.assertEquals("pgcjefuzmuvp", response.properties().logzOrganizationProperties().enterpriseAppId()); - Assertions.assertEquals("tdum", response.properties().logzOrganizationProperties().singleSignOnUrl()); - Assertions.assertEquals("pxebmnzbt", response.properties().userInfo().firstName()); - Assertions.assertEquals("jpglkfgohdne", response.properties().userInfo().lastName()); - Assertions.assertEquals("lfphsdyhtozfikd", response.properties().userInfo().emailAddress()); - Assertions.assertEquals("wq", response.properties().userInfo().phoneNumber()); - Assertions.assertEquals("xzxcl", response.properties().planData().usageType()); - Assertions.assertEquals("thhqzonosggbh", response.properties().planData().billingCycle()); - Assertions.assertEquals("hfwdsjnkaljutiis", response.properties().planData().planDetails()); - Assertions - .assertEquals( - OffsetDateTime.parse("2020-12-21T01:44:52Z"), response.properties().planData().effectiveDate()); - Assertions.assertEquals(ManagedIdentityTypes.SYSTEM_ASSIGNED, response.identity().type()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListMockTests.java deleted file mode 100644 index 9b2361020591..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListMockTests.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.models.LogzMonitorResource; -import com.azure.resourcemanager.logz.models.ManagedIdentityTypes; -import com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus; -import com.azure.resourcemanager.logz.models.MonitoringStatus; -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 SubAccountsListMockTests { - @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\":{\"provisioningState\":\"Succeeded\",\"monitoringStatus\":\"Disabled\",\"marketplaceSubscriptionStatus\":\"Suspended\",\"logzOrganizationProperties\":{\"companyName\":\"zumveekgpwo\",\"id\":\"hkfpbs\",\"enterpriseAppId\":\"ofd\",\"singleSignOnUrl\":\"uusdttouwa\"},\"userInfo\":{\"firstName\":\"kqvkelnsmvbxwyjs\",\"lastName\":\"hhcaal\",\"emailAddress\":\"ixisxyawjoy\",\"phoneNumber\":\"cslyjpk\"},\"planData\":{\"usageType\":\"zyexzn\",\"billingCycle\":\"ixhnrztf\",\"planDetails\":\"hb\",\"effectiveDate\":\"2021-09-08T07:53:31Z\"},\"liftrResourceCategory\":\"MonitorLogs\",\"liftrResourcePreference\":1904300707},\"identity\":{\"principalId\":\"ppg\",\"tenantId\":\"tpnapnyiropuhpig\",\"type\":\"UserAssigned\"},\"location\":\"ylgqgitxmedjvcsl\",\"tags\":{\"rmgucnap\":\"wwncwzzhxgk\",\"oellwp\":\"t\"},\"id\":\"fdygpfqbuaceopz\",\"name\":\"qrhhu\",\"type\":\"opppcqeq\"}]}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.subAccounts().list("hnnpr", "xipeilpjzuaejx", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ylgqgitxmedjvcsl", response.iterator().next().location()); - Assertions.assertEquals("wwncwzzhxgk", response.iterator().next().tags().get("rmgucnap")); - Assertions.assertEquals(MonitoringStatus.DISABLED, response.iterator().next().properties().monitoringStatus()); - Assertions - .assertEquals( - MarketplaceSubscriptionStatus.SUSPENDED, - response.iterator().next().properties().marketplaceSubscriptionStatus()); - Assertions - .assertEquals( - "zumveekgpwo", response.iterator().next().properties().logzOrganizationProperties().companyName()); - Assertions - .assertEquals( - "ofd", response.iterator().next().properties().logzOrganizationProperties().enterpriseAppId()); - Assertions - .assertEquals( - "uusdttouwa", response.iterator().next().properties().logzOrganizationProperties().singleSignOnUrl()); - Assertions.assertEquals("kqvkelnsmvbxwyjs", response.iterator().next().properties().userInfo().firstName()); - Assertions.assertEquals("hhcaal", response.iterator().next().properties().userInfo().lastName()); - Assertions.assertEquals("ixisxyawjoy", response.iterator().next().properties().userInfo().emailAddress()); - Assertions.assertEquals("cslyjpk", response.iterator().next().properties().userInfo().phoneNumber()); - Assertions.assertEquals("zyexzn", response.iterator().next().properties().planData().usageType()); - Assertions.assertEquals("ixhnrztf", response.iterator().next().properties().planData().billingCycle()); - Assertions.assertEquals("hb", response.iterator().next().properties().planData().planDetails()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-09-08T07:53:31Z"), - response.iterator().next().properties().planData().effectiveDate()); - Assertions.assertEquals(ManagedIdentityTypes.USER_ASSIGNED, response.iterator().next().identity().type()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListMonitoredResourcesMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListMonitoredResourcesMockTests.java deleted file mode 100644 index 05454f0037df..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListMonitoredResourcesMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.models.MonitoredResource; -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 SubAccountsListMonitoredResourcesMockTests { - @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\":\"uijfqk\",\"sendingMetrics\":false,\"reasonForMetricsStatus\":\"iipfpubj\",\"sendingLogs\":true,\"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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .subAccounts() - .listMonitoredResources("jxywsuws", "rsndsytgadgvra", "aeneqnzarrwl", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("uijfqk", response.iterator().next().id()); - Assertions.assertEquals(false, response.iterator().next().sendingMetrics()); - Assertions.assertEquals("iipfpubj", response.iterator().next().reasonForMetricsStatus()); - Assertions.assertEquals(true, response.iterator().next().sendingLogs()); - Assertions.assertEquals("f", response.iterator().next().reasonForLogsStatus()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListVMHostsMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListVMHostsMockTests.java deleted file mode 100644 index 8c7054042825..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListVMHostsMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.models.VMResources; -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 SubAccountsListVMHostsMockTests { - @Test - public void testListVMHosts() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{\"id\":\"ok\",\"agentVersion\":\"llxdyhgs\"}]}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.subAccounts().listVMHosts("nmabik", "sorgj", "xbldtlwwrlkdmtn", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ok", response.iterator().next().id()); - Assertions.assertEquals("llxdyhgs", response.iterator().next().agentVersion()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListVmHostUpdateMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListVmHostUpdateMockTests.java deleted file mode 100644 index 3ab99e5c61d0..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsListVmHostUpdateMockTests.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner; -import com.azure.resourcemanager.logz.models.VMHostUpdateRequest; -import com.azure.resourcemanager.logz.models.VMHostUpdateStates; -import com.azure.resourcemanager.logz.models.VMResources; -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 SubAccountsListVmHostUpdateMockTests { - @Test - public void testListVmHostUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{\"id\":\"itsmypyyn\",\"agentVersion\":\"dpumnzgmw\"}]}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .subAccounts() - .listVmHostUpdate( - "ph", - "op", - "odlqiyntor", - new VMHostUpdateRequest() - .withVmResourceIds( - Arrays - .asList( - new VMResourcesInner().withId("eosjswsr").withAgentVersion("lyzrpzbchckqqzqi"), - new VMResourcesInner().withId("iysui").withAgentVersion("ynkedyatrwyhqmib"))) - .withState(VMHostUpdateStates.INSTALL), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("itsmypyyn", response.iterator().next().id()); - Assertions.assertEquals("dpumnzgmw", response.iterator().next().agentVersion()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsUpdateWithResponseMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsUpdateWithResponseMockTests.java deleted file mode 100644 index c488db0f98f6..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/SubAccountsUpdateWithResponseMockTests.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.models.LogzMonitorResource; -import com.azure.resourcemanager.logz.models.LogzMonitorResourceUpdateParameters; -import com.azure.resourcemanager.logz.models.ManagedIdentityTypes; -import com.azure.resourcemanager.logz.models.MarketplaceSubscriptionStatus; -import com.azure.resourcemanager.logz.models.MonitorUpdateProperties; -import com.azure.resourcemanager.logz.models.MonitoringStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -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 SubAccountsUpdateWithResponseMockTests { - @Test - public void testUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"monitoringStatus\":\"Enabled\",\"marketplaceSubscriptionStatus\":\"Active\",\"logzOrganizationProperties\":{\"companyName\":\"pajqgxysm\",\"id\":\"mbqfqvmk\",\"enterpriseAppId\":\"oz\",\"singleSignOnUrl\":\"vhelxprglyatdd\"},\"userInfo\":{\"firstName\":\"bcuejrjxgci\",\"lastName\":\"brh\",\"emailAddress\":\"xsdqrhzoymibmrqy\",\"phoneNumber\":\"ahwfluszdtmhrk\"},\"planData\":{\"usageType\":\"yyv\",\"billingCycle\":\"acpie\",\"planDetails\":\"btgiwbwoenwas\",\"effectiveDate\":\"2021-04-27T10:32:13Z\"},\"liftrResourceCategory\":\"Unknown\",\"liftrResourcePreference\":1226493160},\"identity\":{\"principalId\":\"xwbpokulpiuj\",\"tenantId\":\"asipqiio\",\"type\":\"UserAssigned\"},\"location\":\"qerpqlpqwcc\",\"tags\":{\"btkuwhh\":\"gbdbutauv\",\"koymkcd\":\"hykojoxafnndlpic\"},\"id\":\"h\",\"name\":\"pkkpw\",\"type\":\"reqnovvqfov\"}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - LogzMonitorResource response = - manager - .subAccounts() - .updateWithResponse( - "qsluicp", - "ggkzzlvmbmpa", - "modfvuefywsbpfvm", - new LogzMonitorResourceUpdateParameters() - .withProperties(new MonitorUpdateProperties().withMonitoringStatus(MonitoringStatus.DISABLED)) - .withTags(mapOf("kcpwiy", "uyfta", "xkp", "vqtmnub", "mquxvypo", "ksmond")), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("qerpqlpqwcc", response.location()); - Assertions.assertEquals("gbdbutauv", response.tags().get("btkuwhh")); - Assertions.assertEquals(MonitoringStatus.ENABLED, response.properties().monitoringStatus()); - Assertions - .assertEquals(MarketplaceSubscriptionStatus.ACTIVE, response.properties().marketplaceSubscriptionStatus()); - Assertions.assertEquals("pajqgxysm", response.properties().logzOrganizationProperties().companyName()); - Assertions.assertEquals("oz", response.properties().logzOrganizationProperties().enterpriseAppId()); - Assertions.assertEquals("vhelxprglyatdd", response.properties().logzOrganizationProperties().singleSignOnUrl()); - Assertions.assertEquals("bcuejrjxgci", response.properties().userInfo().firstName()); - Assertions.assertEquals("brh", response.properties().userInfo().lastName()); - Assertions.assertEquals("xsdqrhzoymibmrqy", response.properties().userInfo().emailAddress()); - Assertions.assertEquals("ahwfluszdtmhrk", response.properties().userInfo().phoneNumber()); - Assertions.assertEquals("yyv", response.properties().planData().usageType()); - Assertions.assertEquals("acpie", response.properties().planData().billingCycle()); - Assertions.assertEquals("btgiwbwoenwas", response.properties().planData().planDetails()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-04-27T10:32:13Z"), response.properties().planData().effectiveDate()); - Assertions.assertEquals(ManagedIdentityTypes.USER_ASSIGNED, response.identity().type()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesCreateOrUpdateWithResponseMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 2e6f0959b5bf..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.models.LogRules; -import com.azure.resourcemanager.logz.models.MonitoringTagRules; -import com.azure.resourcemanager.logz.models.MonitoringTagRulesProperties; -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 TagRulesCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"NotSpecified\",\"logRules\":{\"sendAadLogs\":true,\"sendSubscriptionLogs\":false,\"sendActivityLogs\":false,\"filteringTags\":[]}},\"id\":\"xcug\",\"name\":\"cjooxdjebwpucwwf\",\"type\":\"ovbvmeueciv\"}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MonitoringTagRules response = - manager - .tagRules() - .define("vgomz") - .withExistingMonitor("ualaexqpvfadmw", "rcrgvx") - .withProperties( - new MonitoringTagRulesProperties() - .withLogRules( - new LogRules() - .withSendAadLogs(true) - .withSendSubscriptionLogs(false) - .withSendActivityLogs(false) - .withFilteringTags(Arrays.asList()))) - .create(); - - Assertions.assertEquals(true, response.properties().logRules().sendAadLogs()); - Assertions.assertEquals(false, response.properties().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(false, response.properties().logRules().sendActivityLogs()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesDeleteWithResponseMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesDeleteWithResponseMockTests.java deleted file mode 100644 index 57a3799ce031..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -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 TagRulesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .tagRules() - .deleteWithResponse("ofmxagkvtmelmqkr", "ahvljuaha", "uhcdhm", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesGetWithResponseMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesGetWithResponseMockTests.java deleted file mode 100644 index feadda235675..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesGetWithResponseMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.models.MonitoringTagRules; -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\":{\"provisioningState\":\"Failed\",\"logRules\":{\"sendAadLogs\":true,\"sendSubscriptionLogs\":false,\"sendActivityLogs\":false,\"filteringTags\":[]}},\"id\":\"v\",\"name\":\"us\",\"type\":\"tslhspkdeem\"}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MonitoringTagRules response = - manager - .tagRules() - .getWithResponse("bkyvp", "ca", "uzbpzkafku", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.properties().logRules().sendAadLogs()); - Assertions.assertEquals(false, response.properties().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(false, response.properties().logRules().sendActivityLogs()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesListMockTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesListMockTests.java deleted file mode 100644 index ea7dab147c32..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/TagRulesListMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -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.resourcemanager.logz.LogzManager; -import com.azure.resourcemanager.logz.models.MonitoringTagRules; -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\":{\"provisioningState\":\"Failed\",\"logRules\":{\"sendAadLogs\":true,\"sendSubscriptionLogs\":true,\"sendActivityLogs\":false,\"filteringTags\":[]}},\"id\":\"fudwpznt\",\"name\":\"hdzhlrqj\",\"type\":\"hckfrlhrx\"}]}"; - - 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); - })); - - LogzManager manager = - LogzManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.tagRules().list("yonobgl", "ocqxtccmg", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(true, response.iterator().next().properties().logRules().sendAadLogs()); - Assertions.assertEquals(true, response.iterator().next().properties().logRules().sendSubscriptionLogs()); - Assertions.assertEquals(false, response.iterator().next().properties().logRules().sendActivityLogs()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserInfoTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserInfoTests.java deleted file mode 100644 index 54de01b25d8b..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserInfoTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.models.UserInfo; -import org.junit.jupiter.api.Assertions; - -public final class UserInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserInfo model = - BinaryData - .fromString( - "{\"firstName\":\"uht\",\"lastName\":\"wisdkft\",\"emailAddress\":\"xmnteiwaop\",\"phoneNumber\":\"mijcmmxdcufufs\"}") - .toObject(UserInfo.class); - Assertions.assertEquals("uht", model.firstName()); - Assertions.assertEquals("wisdkft", model.lastName()); - Assertions.assertEquals("xmnteiwaop", model.emailAddress()); - Assertions.assertEquals("mijcmmxdcufufs", model.phoneNumber()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserInfo model = - new UserInfo() - .withFirstName("uht") - .withLastName("wisdkft") - .withEmailAddress("xmnteiwaop") - .withPhoneNumber("mijcmmxdcufufs"); - model = BinaryData.fromObject(model).toObject(UserInfo.class); - Assertions.assertEquals("uht", model.firstName()); - Assertions.assertEquals("wisdkft", model.lastName()); - Assertions.assertEquals("xmnteiwaop", model.emailAddress()); - Assertions.assertEquals("mijcmmxdcufufs", model.phoneNumber()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleListResponseTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleListResponseTests.java deleted file mode 100644 index 648cd611430a..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleListResponseTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.fluent.models.UserRoleResponseInner; -import com.azure.resourcemanager.logz.models.UserRole; -import com.azure.resourcemanager.logz.models.UserRoleListResponse; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UserRoleListResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserRoleListResponse model = - BinaryData - .fromString("{\"value\":[{\"role\":\"None\"},{\"role\":\"Admin\"}],\"nextLink\":\"wd\"}") - .toObject(UserRoleListResponse.class); - Assertions.assertEquals(UserRole.NONE, model.value().get(0).role()); - Assertions.assertEquals("wd", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserRoleListResponse model = - new UserRoleListResponse() - .withValue( - Arrays - .asList( - new UserRoleResponseInner().withRole(UserRole.NONE), - new UserRoleResponseInner().withRole(UserRole.ADMIN))) - .withNextLink("wd"); - model = BinaryData.fromObject(model).toObject(UserRoleListResponse.class); - Assertions.assertEquals(UserRole.NONE, model.value().get(0).role()); - Assertions.assertEquals("wd", model.nextLink()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleRequestTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleRequestTests.java deleted file mode 100644 index 7f7abbb8aa2f..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleRequestTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.models.UserRoleRequest; -import org.junit.jupiter.api.Assertions; - -public final class UserRoleRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserRoleRequest model = BinaryData.fromString("{\"emailAddress\":\"ltyfsop\"}").toObject(UserRoleRequest.class); - Assertions.assertEquals("ltyfsop", model.emailAddress()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserRoleRequest model = new UserRoleRequest().withEmailAddress("ltyfsop"); - model = BinaryData.fromObject(model).toObject(UserRoleRequest.class); - Assertions.assertEquals("ltyfsop", model.emailAddress()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleResponseInnerTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleResponseInnerTests.java deleted file mode 100644 index b3f54ee649d8..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/UserRoleResponseInnerTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.fluent.models.UserRoleResponseInner; -import com.azure.resourcemanager.logz.models.UserRole; -import org.junit.jupiter.api.Assertions; - -public final class UserRoleResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserRoleResponseInner model = - BinaryData.fromString("{\"role\":\"None\"}").toObject(UserRoleResponseInner.class); - Assertions.assertEquals(UserRole.NONE, model.role()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserRoleResponseInner model = new UserRoleResponseInner().withRole(UserRole.NONE); - model = BinaryData.fromObject(model).toObject(UserRoleResponseInner.class); - Assertions.assertEquals(UserRole.NONE, model.role()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMHostUpdateRequestTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMHostUpdateRequestTests.java deleted file mode 100644 index 0fd3ce00cafc..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMHostUpdateRequestTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner; -import com.azure.resourcemanager.logz.models.VMHostUpdateRequest; -import com.azure.resourcemanager.logz.models.VMHostUpdateStates; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VMHostUpdateRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMHostUpdateRequest model = - BinaryData - .fromString( - "{\"vmResourceIds\":[{\"id\":\"ebxetqgtzxdp\",\"agentVersion\":\"bqqwxrj\"},{\"id\":\"al\",\"agentVersion\":\"wsubisnja\"},{\"id\":\"mngnzscxaqw\",\"agentVersion\":\"chcbonqvpkvlrxnj\"},{\"id\":\"seiphe\",\"agentVersion\":\"lokeyy\"}],\"state\":\"Install\"}") - .toObject(VMHostUpdateRequest.class); - Assertions.assertEquals("ebxetqgtzxdp", model.vmResourceIds().get(0).id()); - Assertions.assertEquals("bqqwxrj", model.vmResourceIds().get(0).agentVersion()); - Assertions.assertEquals(VMHostUpdateStates.INSTALL, model.state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMHostUpdateRequest model = - new VMHostUpdateRequest() - .withVmResourceIds( - Arrays - .asList( - new VMResourcesInner().withId("ebxetqgtzxdp").withAgentVersion("bqqwxrj"), - new VMResourcesInner().withId("al").withAgentVersion("wsubisnja"), - new VMResourcesInner().withId("mngnzscxaqw").withAgentVersion("chcbonqvpkvlrxnj"), - new VMResourcesInner().withId("seiphe").withAgentVersion("lokeyy"))) - .withState(VMHostUpdateStates.INSTALL); - model = BinaryData.fromObject(model).toObject(VMHostUpdateRequest.class); - Assertions.assertEquals("ebxetqgtzxdp", model.vmResourceIds().get(0).id()); - Assertions.assertEquals("bqqwxrj", model.vmResourceIds().get(0).agentVersion()); - Assertions.assertEquals(VMHostUpdateStates.INSTALL, model.state()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMResourcesInnerTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMResourcesInnerTests.java deleted file mode 100644 index 09c04821aabf..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMResourcesInnerTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner; -import org.junit.jupiter.api.Assertions; - -public final class VMResourcesInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMResourcesInner model = - BinaryData - .fromString("{\"id\":\"bdlwtgrhpdjpj\",\"agentVersion\":\"asxazjpqyegualhb\"}") - .toObject(VMResourcesInner.class); - Assertions.assertEquals("bdlwtgrhpdjpj", model.id()); - Assertions.assertEquals("asxazjpqyegualhb", model.agentVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMResourcesInner model = new VMResourcesInner().withId("bdlwtgrhpdjpj").withAgentVersion("asxazjpqyegualhb"); - model = BinaryData.fromObject(model).toObject(VMResourcesInner.class); - Assertions.assertEquals("bdlwtgrhpdjpj", model.id()); - Assertions.assertEquals("asxazjpqyegualhb", model.agentVersion()); - } -} diff --git a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMResourcesListResponseTests.java b/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMResourcesListResponseTests.java deleted file mode 100644 index 76e0476b16c8..000000000000 --- a/sdk/logz/azure-resourcemanager-logz/src/test/java/com/azure/resourcemanager/logz/generated/VMResourcesListResponseTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.logz.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.logz.fluent.models.VMResourcesInner; -import com.azure.resourcemanager.logz.models.VMResourcesListResponse; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VMResourcesListResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VMResourcesListResponse model = - BinaryData - .fromString( - "{\"value\":[{\"id\":\"jj\",\"agentVersion\":\"v\"},{\"id\":\"dgwdslfhot\",\"agentVersion\":\"cynpwlbjnp\"}],\"nextLink\":\"cftadeh\"}") - .toObject(VMResourcesListResponse.class); - Assertions.assertEquals("jj", model.value().get(0).id()); - Assertions.assertEquals("v", model.value().get(0).agentVersion()); - Assertions.assertEquals("cftadeh", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VMResourcesListResponse model = - new VMResourcesListResponse() - .withValue( - Arrays - .asList( - new VMResourcesInner().withId("jj").withAgentVersion("v"), - new VMResourcesInner().withId("dgwdslfhot").withAgentVersion("cynpwlbjnp"))) - .withNextLink("cftadeh"); - model = BinaryData.fromObject(model).toObject(VMResourcesListResponse.class); - Assertions.assertEquals("jj", model.value().get(0).id()); - Assertions.assertEquals("v", model.value().get(0).agentVersion()); - Assertions.assertEquals("cftadeh", model.nextLink()); - } -}