diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md index b73233664d83..9b6917a311c0 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.6 (Unreleased) +## 1.0.0-beta.1 (2023-02-13) + +- Azure Resource Manager ApplicationInsights client library for Java. This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. Composite Swagger for Application Insights Management Client. Package tag package-2022-12-09-only. 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/applicationinsights/azure-resourcemanager-applicationinsights/README.md b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/README.md index c2eb8ee5509b..5c9be6874ef9 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/README.md +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/README.md @@ -2,7 +2,7 @@ Azure Resource Manager ApplicationInsights client library for Java. -This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. Composite Swagger for Application Insights Management Client. Package tag package-2022-04-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. Composite Swagger for Application Insights Management Client. Package tag package-2022-12-09-only. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-applicationinsights - 1.0.0-beta.5 + 1.0.0-beta.6 ``` [//]: # ({x-version-update-end}) @@ -41,19 +41,19 @@ Various documentation is available to help you get started Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. -[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation. +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. ### Authentication -By default, Azure Active Directory token authentication depends on correct configure of following environment variables. +By default, Azure Active Directory 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. - `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. -In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`. +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. -With above configuration, `azure` client can be authenticated by following code: +With above configuration, `azure` client can be authenticated using the following code: ```java AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); @@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on ## Contributing -For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). +For details on contributing to this repository, see the [contributing guide][cg]. -1. Fork it -1. Create your feature branch (`git checkout -b my-new-feature`) -1. Commit your changes (`git commit -am 'Add some feature'`) -1. Push to the branch (`git push origin my-new-feature`) -1. Create new Pull Request +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS @@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty [authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md [design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[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/ diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/SAMPLE.md b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/SAMPLE.md index 33081992ad74..16df95587bf2 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/SAMPLE.md +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/SAMPLE.md @@ -136,7 +136,6 @@ ### AnalyticsItems_Delete ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; /** Samples for AnalyticsItems Delete. */ @@ -159,7 +158,7 @@ public final class AnalyticsItemsDeleteSamples { ItemScopePath.ANALYTICS_ITEMS, "3466c160-4a10-4df8-afdf-0007f3f6dee5", null, - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -167,7 +166,6 @@ public final class AnalyticsItemsDeleteSamples { ### AnalyticsItems_Get ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; /** Samples for AnalyticsItems Get. */ @@ -190,7 +188,7 @@ public final class AnalyticsItemsGetSamples { ItemScopePath.ANALYTICS_ITEMS, "3466c160-4a10-4df8-afdf-0007f3f6dee5", null, - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -198,7 +196,6 @@ public final class AnalyticsItemsGetSamples { ### AnalyticsItems_List ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; /** Samples for AnalyticsItems List. */ @@ -216,7 +213,13 @@ public final class AnalyticsItemsListSamples { manager .analyticsItems() .listWithResponse( - "my-resource-group", "my-component", ItemScopePath.ANALYTICS_ITEMS, null, null, null, Context.NONE); + "my-resource-group", + "my-component", + ItemScopePath.ANALYTICS_ITEMS, + null, + null, + null, + com.azure.core.util.Context.NONE); } } ``` @@ -224,7 +227,6 @@ public final class AnalyticsItemsListSamples { ### AnalyticsItems_Put ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAnalyticsItemInner; import com.azure.resourcemanager.applicationinsights.models.ItemScope; import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; @@ -267,7 +269,7 @@ public final class AnalyticsItemsPutSamples { .withScope(ItemScope.SHARED) .withType(ItemType.QUERY), null, - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -275,7 +277,6 @@ public final class AnalyticsItemsPutSamples { ### Annotations_Create ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.AnnotationInner; import java.time.OffsetDateTime; @@ -302,7 +303,7 @@ public final class AnnotationsCreateSamples { .withEventTime(OffsetDateTime.parse("2018-01-31T13:41:38.657Z")) .withId("444e2c08-274a-4bbb-a89e-d77bb720f44a") .withProperties("{\"Comments\":\"Testing\",\"Label\":\"Success\"}"), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -310,8 +311,6 @@ public final class AnnotationsCreateSamples { ### Annotations_Delete ```java -import com.azure.core.util.Context; - /** Samples for Annotations Delete. */ public final class AnnotationsDeleteSamples { /* @@ -327,7 +326,10 @@ public final class AnnotationsDeleteSamples { manager .annotations() .deleteWithResponse( - "my-resource-group", "my-component", "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", Context.NONE); + "my-resource-group", + "my-component", + "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", + com.azure.core.util.Context.NONE); } } ``` @@ -335,8 +337,6 @@ public final class AnnotationsDeleteSamples { ### Annotations_Get ```java -import com.azure.core.util.Context; - /** Samples for Annotations Get. */ public final class AnnotationsGetSamples { /* @@ -351,7 +351,11 @@ public final class AnnotationsGetSamples { com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .annotations() - .getWithResponse("my-resource-group", "my-component", "444e2c08-274a-4bbb-a89e-d77bb720f44a", Context.NONE); + .getWithResponse( + "my-resource-group", + "my-component", + "444e2c08-274a-4bbb-a89e-d77bb720f44a", + com.azure.core.util.Context.NONE); } } ``` @@ -359,8 +363,6 @@ public final class AnnotationsGetSamples { ### Annotations_List ```java -import com.azure.core.util.Context; - /** Samples for Annotations List. */ public final class AnnotationsListSamples { /* @@ -380,7 +382,7 @@ public final class AnnotationsListSamples { "my-component", "2018-02-05T00%3A30%3A00.000Z", "2018-02-06T00%3A33A00.000Z", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -388,7 +390,6 @@ public final class AnnotationsListSamples { ### ApiKeys_Create ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.ApiKeyRequest; import java.util.Arrays; @@ -419,7 +420,7 @@ public final class ApiKeysCreateSamples { Arrays .asList( "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/annotations")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -427,8 +428,6 @@ public final class ApiKeysCreateSamples { ### ApiKeys_Delete ```java -import com.azure.core.util.Context; - /** Samples for ApiKeys Delete. */ public final class ApiKeysDeleteSamples { /* @@ -443,7 +442,10 @@ public final class ApiKeysDeleteSamples { manager .apiKeys() .deleteWithResponse( - "my-resource-group", "my-component", "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", Context.NONE); + "my-resource-group", + "my-component", + "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", + com.azure.core.util.Context.NONE); } } ``` @@ -451,8 +453,6 @@ public final class ApiKeysDeleteSamples { ### ApiKeys_Get ```java -import com.azure.core.util.Context; - /** Samples for ApiKeys Get. */ public final class ApiKeysGetSamples { /* @@ -466,7 +466,11 @@ public final class ApiKeysGetSamples { public static void aPIKeysGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .apiKeys() - .getWithResponse("my-resource-group", "my-component", "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", Context.NONE); + .getWithResponse( + "my-resource-group", + "my-component", + "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", + com.azure.core.util.Context.NONE); } } ``` @@ -474,8 +478,6 @@ public final class ApiKeysGetSamples { ### ApiKeys_List ```java -import com.azure.core.util.Context; - /** Samples for ApiKeys List. */ public final class ApiKeysListSamples { /* @@ -487,7 +489,7 @@ public final class ApiKeysListSamples { * @param manager Entry point to ApplicationInsightsManager. */ public static void aPIKeysList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.apiKeys().list("my-resource-group", "my-component", Context.NONE); + manager.apiKeys().list("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } ``` @@ -495,8 +497,6 @@ public final class ApiKeysListSamples { ### ComponentAvailableFeatures_Get ```java -import com.azure.core.util.Context; - /** Samples for ComponentAvailableFeatures Get. */ public final class ComponentAvailableFeaturesGetSamples { /* @@ -509,7 +509,9 @@ public final class ComponentAvailableFeaturesGetSamples { */ public static void componentCurrentBillingFeaturesGet( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.componentAvailableFeatures().getWithResponse("my-resource-group", "my-component", Context.NONE); + manager + .componentAvailableFeatures() + .getWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } ``` @@ -517,8 +519,6 @@ public final class ComponentAvailableFeaturesGetSamples { ### ComponentCurrentBillingFeatures_Get ```java -import com.azure.core.util.Context; - /** Samples for ComponentCurrentBillingFeatures Get. */ public final class ComponentCurrentBillingFeaturesGetSamples { /* @@ -531,7 +531,9 @@ public final class ComponentCurrentBillingFeaturesGetSamples { */ public static void componentCurrentBillingFeaturesGet( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.componentCurrentBillingFeatures().getWithResponse("my-resource-group", "my-component", Context.NONE); + manager + .componentCurrentBillingFeatures() + .getWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } ``` @@ -539,7 +541,6 @@ public final class ComponentCurrentBillingFeaturesGetSamples { ### ComponentCurrentBillingFeatures_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentBillingFeaturesInner; import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentDataVolumeCap; import java.util.Arrays; @@ -564,10 +565,10 @@ public final class ComponentCurrentBillingFeaturesUpdateSamples { new ApplicationInsightsComponentBillingFeaturesInner() .withDataVolumeCap( new ApplicationInsightsComponentDataVolumeCap() - .withCap(100.0f) + .withCap(100.0F) .withStopSendNotificationWhenHitCap(true)) .withCurrentBillingFeatures(Arrays.asList("Basic", "Application Insights Enterprise")), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -575,8 +576,6 @@ public final class ComponentCurrentBillingFeaturesUpdateSamples { ### ComponentFeatureCapabilities_Get ```java -import com.azure.core.util.Context; - /** Samples for ComponentFeatureCapabilities Get. */ public final class ComponentFeatureCapabilitiesGetSamples { /* @@ -589,7 +588,9 @@ public final class ComponentFeatureCapabilitiesGetSamples { */ public static void componentCurrentBillingFeaturesGet( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.componentFeatureCapabilities().getWithResponse("my-resource-group", "my-component", Context.NONE); + manager + .componentFeatureCapabilities() + .getWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } ``` @@ -625,7 +626,6 @@ public final class ComponentLinkedStorageAccountsOperationCreateAndUpdateSamples ### ComponentLinkedStorageAccountsOperation_Delete ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.StorageType; /** Samples for ComponentLinkedStorageAccountsOperation Delete. */ @@ -642,7 +642,8 @@ public final class ComponentLinkedStorageAccountsOperationDeleteSamples { com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .componentLinkedStorageAccountsOperations() - .deleteWithResponse("someResourceGroupName", "myComponent", StorageType.SERVICE_PROFILER, Context.NONE); + .deleteWithResponse( + "someResourceGroupName", "myComponent", StorageType.SERVICE_PROFILER, com.azure.core.util.Context.NONE); } } ``` @@ -650,7 +651,6 @@ public final class ComponentLinkedStorageAccountsOperationDeleteSamples { ### ComponentLinkedStorageAccountsOperation_Get ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.StorageType; /** Samples for ComponentLinkedStorageAccountsOperation Get. */ @@ -667,7 +667,8 @@ public final class ComponentLinkedStorageAccountsOperationGetSamples { com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .componentLinkedStorageAccountsOperations() - .getWithResponse("someResourceGroupName", "myComponent", StorageType.SERVICE_PROFILER, Context.NONE); + .getWithResponse( + "someResourceGroupName", "myComponent", StorageType.SERVICE_PROFILER, com.azure.core.util.Context.NONE); } } ``` @@ -675,7 +676,6 @@ public final class ComponentLinkedStorageAccountsOperationGetSamples { ### ComponentLinkedStorageAccountsOperation_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccounts; import com.azure.resourcemanager.applicationinsights.models.StorageType; @@ -694,7 +694,11 @@ public final class ComponentLinkedStorageAccountsOperationUpdateSamples { ComponentLinkedStorageAccounts resource = manager .componentLinkedStorageAccountsOperations() - .getWithResponse("someResourceGroupName", "myComponent", StorageType.SERVICE_PROFILER, Context.NONE) + .getWithResponse( + "someResourceGroupName", + "myComponent", + StorageType.SERVICE_PROFILER, + com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -708,8 +712,6 @@ public final class ComponentLinkedStorageAccountsOperationUpdateSamples { ### ComponentQuotaStatus_Get ```java -import com.azure.core.util.Context; - /** Samples for ComponentQuotaStatus Get. */ public final class ComponentQuotaStatusGetSamples { /* @@ -722,7 +724,9 @@ public final class ComponentQuotaStatusGetSamples { */ public static void componentCurrentBillingFeaturesGet( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.componentQuotaStatus().getWithResponse("my-resource-group", "my-component", Context.NONE); + manager + .componentQuotaStatus() + .getWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } ``` @@ -798,8 +802,6 @@ public final class ComponentsCreateOrUpdateSamples { ### Components_Delete ```java -import com.azure.core.util.Context; - /** Samples for Components Delete. */ public final class ComponentsDeleteSamples { /* @@ -812,7 +814,9 @@ public final class ComponentsDeleteSamples { */ public static void componentsDelete( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.components().deleteWithResponse("my-resource-group", "my-component", Context.NONE); + manager + .components() + .deleteByResourceGroupWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } ``` @@ -820,8 +824,6 @@ public final class ComponentsDeleteSamples { ### Components_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for Components GetByResourceGroup. */ public final class ComponentsGetByResourceGroupSamples { /* @@ -833,7 +835,9 @@ public final class ComponentsGetByResourceGroupSamples { * @param manager Entry point to ApplicationInsightsManager. */ public static void componentGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.components().getByResourceGroupWithResponse("my-resource-group", "my-component", Context.NONE); + manager + .components() + .getByResourceGroupWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } ``` @@ -841,8 +845,6 @@ public final class ComponentsGetByResourceGroupSamples { ### Components_GetPurgeStatus ```java -import com.azure.core.util.Context; - /** Samples for Components GetPurgeStatus. */ public final class ComponentsGetPurgeStatusSamples { /* @@ -858,7 +860,10 @@ public final class ComponentsGetPurgeStatusSamples { manager .components() .getPurgeStatusWithResponse( - "OIAutoRest5123", "aztest5048", "purge-970318e7-b859-4edb-8903-83b1b54d0b74", Context.NONE); + "OIAutoRest5123", + "aztest5048", + "purge-970318e7-b859-4edb-8903-83b1b54d0b74", + com.azure.core.util.Context.NONE); } } ``` @@ -866,8 +871,6 @@ public final class ComponentsGetPurgeStatusSamples { ### Components_List ```java -import com.azure.core.util.Context; - /** Samples for Components List. */ public final class ComponentsListSamples { /* @@ -880,7 +883,7 @@ public final class ComponentsListSamples { */ public static void componentsListJson( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.components().list(Context.NONE); + manager.components().list(com.azure.core.util.Context.NONE); } } ``` @@ -888,8 +891,6 @@ public final class ComponentsListSamples { ### Components_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for Components ListByResourceGroup. */ public final class ComponentsListByResourceGroupSamples { /* @@ -902,7 +903,7 @@ public final class ComponentsListByResourceGroupSamples { */ public static void componentListByResourceGroup( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.components().listByResourceGroup("my-resource-group", Context.NONE); + manager.components().listByResourceGroup("my-resource-group", com.azure.core.util.Context.NONE); } } ``` @@ -910,7 +911,6 @@ public final class ComponentsListByResourceGroupSamples { ### Components_Purge ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.ComponentPurgeBody; import com.azure.resourcemanager.applicationinsights.models.ComponentPurgeBodyFilters; import java.util.Arrays; @@ -941,7 +941,7 @@ public final class ComponentsPurgeSamples { .withColumn("TimeGenerated") .withOperator(">") .withValue("2017-09-01T00:00:00"))), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -949,7 +949,6 @@ public final class ComponentsPurgeSamples { ### Components_UpdateTags ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponent; import java.util.HashMap; import java.util.Map; @@ -969,7 +968,7 @@ public final class ComponentsUpdateTagsSamples { ApplicationInsightsComponent resource = manager .components() - .getByResourceGroupWithResponse("my-resource-group", "my-component", Context.NONE) + .getByResourceGroupWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -1004,7 +1003,6 @@ public final class ComponentsUpdateTagsSamples { ### ExportConfigurations_Create ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentExportRequest; /** Samples for ExportConfigurations Create. */ @@ -1038,7 +1036,7 @@ public final class ExportConfigurationsCreateSamples { .withDestinationStorageLocationId("eastus") .withDestinationAccountId( "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.ClassicStorage/storageAccounts/mystorageblob"), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1046,8 +1044,6 @@ public final class ExportConfigurationsCreateSamples { ### ExportConfigurations_Delete ```java -import com.azure.core.util.Context; - /** Samples for ExportConfigurations Delete. */ public final class ExportConfigurationsDeleteSamples { /* @@ -1062,7 +1058,8 @@ public final class ExportConfigurationsDeleteSamples { com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .exportConfigurations() - .deleteWithResponse("my-resource-group", "my-component", "uGOoki0jQsyEs3IdQ83Q4QsNr4=", Context.NONE); + .deleteWithResponse( + "my-resource-group", "my-component", "uGOoki0jQsyEs3IdQ83Q4QsNr4=", com.azure.core.util.Context.NONE); } } ``` @@ -1070,8 +1067,6 @@ public final class ExportConfigurationsDeleteSamples { ### ExportConfigurations_Get ```java -import com.azure.core.util.Context; - /** Samples for ExportConfigurations Get. */ public final class ExportConfigurationsGetSamples { /* @@ -1086,7 +1081,8 @@ public final class ExportConfigurationsGetSamples { com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .exportConfigurations() - .getWithResponse("my-resource-group", "my-component", "uGOoki0jQsyEs3IdQ83Q4QsNr4=", Context.NONE); + .getWithResponse( + "my-resource-group", "my-component", "uGOoki0jQsyEs3IdQ83Q4QsNr4=", com.azure.core.util.Context.NONE); } } ``` @@ -1094,8 +1090,6 @@ public final class ExportConfigurationsGetSamples { ### ExportConfigurations_List ```java -import com.azure.core.util.Context; - /** Samples for ExportConfigurations List. */ public final class ExportConfigurationsListSamples { /* @@ -1108,7 +1102,9 @@ public final class ExportConfigurationsListSamples { */ public static void exportConfigurationsList( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.exportConfigurations().listWithResponse("my-resource-group", "my-component", Context.NONE); + manager + .exportConfigurations() + .listWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } ``` @@ -1116,7 +1112,6 @@ public final class ExportConfigurationsListSamples { ### ExportConfigurations_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentExportRequest; /** Samples for ExportConfigurations Update. */ @@ -1151,7 +1146,7 @@ public final class ExportConfigurationsUpdateSamples { .withDestinationStorageLocationId("eastus") .withDestinationAccountId( "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.ClassicStorage/storageAccounts/mystorageblob"), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1159,7 +1154,6 @@ public final class ExportConfigurationsUpdateSamples { ### Favorites_Add ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFavoriteInner; import com.azure.resourcemanager.applicationinsights.models.FavoriteType; import java.util.Arrays; @@ -1312,7 +1306,7 @@ public final class FavoritesAddSamples { .withFavoriteType(FavoriteType.SHARED) .withTags(Arrays.asList("TagSample01", "TagSample02")) .withIsGeneratedFromTemplate(false), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1320,8 +1314,6 @@ public final class FavoritesAddSamples { ### Favorites_Delete ```java -import com.azure.core.util.Context; - /** Samples for Favorites Delete. */ public final class FavoritesDeleteSamples { /* @@ -1336,7 +1328,10 @@ public final class FavoritesDeleteSamples { manager .favorites() .deleteWithResponse( - "my-resource-group", "my-ai-component", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE); + "my-resource-group", + "my-ai-component", + "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", + com.azure.core.util.Context.NONE); } } ``` @@ -1344,8 +1339,6 @@ public final class FavoritesDeleteSamples { ### Favorites_Get ```java -import com.azure.core.util.Context; - /** Samples for Favorites Get. */ public final class FavoritesGetSamples { /* @@ -1360,7 +1353,10 @@ public final class FavoritesGetSamples { manager .favorites() .getWithResponse( - "my-resource-group", "my-ai-component", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE); + "my-resource-group", + "my-ai-component", + "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", + com.azure.core.util.Context.NONE); } } ``` @@ -1368,8 +1364,6 @@ public final class FavoritesGetSamples { ### Favorites_List ```java -import com.azure.core.util.Context; - /** Samples for Favorites List. */ public final class FavoritesListSamples { /* @@ -1383,7 +1377,8 @@ public final class FavoritesListSamples { public static void favoritesList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .favorites() - .listWithResponse("my-resource-group", "my-ai-component", null, null, null, null, Context.NONE); + .listWithResponse( + "my-resource-group", "my-ai-component", null, null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -1391,7 +1386,6 @@ public final class FavoritesListSamples { ### Favorites_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFavoriteInner; import com.azure.resourcemanager.applicationinsights.models.FavoriteType; import java.util.Arrays; @@ -1460,7 +1454,7 @@ public final class FavoritesUpdateSamples { .withFavoriteType(FavoriteType.SHARED) .withTags(Arrays.asList("TagSample01", "TagSample02", "TagSample03")) .withIsGeneratedFromTemplate(false), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1468,8 +1462,6 @@ public final class FavoritesUpdateSamples { ### LiveToken_Get ```java -import com.azure.core.util.Context; - /** Samples for LiveToken Get. */ public final class LiveTokenGetSamples { /* @@ -1486,7 +1478,7 @@ public final class LiveTokenGetSamples { .liveTokens() .getWithResponse( "subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/FabrikamFiberApp/providers/microsoft.insights/components/CustomAvailabilityTest/providers/microsoft.insights/generatelivetoken", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1546,8 +1538,6 @@ public final class MyWorkbooksCreateOrUpdateSamples { ### MyWorkbooks_Delete ```java -import com.azure.core.util.Context; - /** Samples for MyWorkbooks Delete. */ public final class MyWorkbooksDeleteSamples { /* @@ -1562,7 +1552,8 @@ public final class MyWorkbooksDeleteSamples { com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .myWorkbooks() - .deleteWithResponse("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE); + .deleteByResourceGroupWithResponse( + "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", com.azure.core.util.Context.NONE); } } ``` @@ -1570,8 +1561,6 @@ public final class MyWorkbooksDeleteSamples { ### MyWorkbooks_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for MyWorkbooks GetByResourceGroup. */ public final class MyWorkbooksGetByResourceGroupSamples { /* @@ -1585,7 +1574,8 @@ public final class MyWorkbooksGetByResourceGroupSamples { public static void workbookGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .myWorkbooks() - .getByResourceGroupWithResponse("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE); + .getByResourceGroupWithResponse( + "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", com.azure.core.util.Context.NONE); } } ``` @@ -1593,7 +1583,6 @@ public final class MyWorkbooksGetByResourceGroupSamples { ### MyWorkbooks_List ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.CategoryType; /** Samples for MyWorkbooks List. */ @@ -1607,7 +1596,7 @@ public final class MyWorkbooksListSamples { * @param manager Entry point to ApplicationInsightsManager. */ public static void workbooksList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.myWorkbooks().list(CategoryType.WORKBOOK, null, null, Context.NONE); + manager.myWorkbooks().list(CategoryType.WORKBOOK, null, null, com.azure.core.util.Context.NONE); } /* @@ -1620,7 +1609,7 @@ public final class MyWorkbooksListSamples { */ public static void workbooksList2( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.myWorkbooks().list(CategoryType.WORKBOOK, null, null, Context.NONE); + manager.myWorkbooks().list(CategoryType.WORKBOOK, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -1628,7 +1617,6 @@ public final class MyWorkbooksListSamples { ### MyWorkbooks_ListByResourceGroup ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.CategoryType; /** Samples for MyWorkbooks ListByResourceGroup. */ @@ -1644,7 +1632,8 @@ public final class MyWorkbooksListByResourceGroupSamples { public static void workbooksList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .myWorkbooks() - .listByResourceGroup("my-resource-group", CategoryType.WORKBOOK, null, null, null, Context.NONE); + .listByResourceGroup( + "my-resource-group", CategoryType.WORKBOOK, null, null, null, com.azure.core.util.Context.NONE); } /* @@ -1659,7 +1648,8 @@ public final class MyWorkbooksListByResourceGroupSamples { com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .myWorkbooks() - .listByResourceGroup("my-resource-group", CategoryType.WORKBOOK, null, null, null, Context.NONE); + .listByResourceGroup( + "my-resource-group", CategoryType.WORKBOOK, null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -1667,7 +1657,6 @@ public final class MyWorkbooksListByResourceGroupSamples { ### MyWorkbooks_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.Kind; import com.azure.resourcemanager.applicationinsights.models.MyWorkbook; @@ -1687,7 +1676,7 @@ public final class MyWorkbooksUpdateSamples { manager .myWorkbooks() .getByResourceGroupWithResponse( - "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE) + "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -1725,8 +1714,6 @@ public final class MyWorkbooksUpdateSamples { ### ProactiveDetectionConfigurations_Get ```java -import com.azure.core.util.Context; - /** Samples for ProactiveDetectionConfigurations Get. */ public final class ProactiveDetectionConfigurationsGetSamples { /* @@ -1741,7 +1728,7 @@ public final class ProactiveDetectionConfigurationsGetSamples { com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .proactiveDetectionConfigurations() - .getWithResponse("my-resource-group", "my-component", "slowpageloadtime", Context.NONE); + .getWithResponse("my-resource-group", "my-component", "slowpageloadtime", com.azure.core.util.Context.NONE); } } ``` @@ -1749,8 +1736,6 @@ public final class ProactiveDetectionConfigurationsGetSamples { ### ProactiveDetectionConfigurations_List ```java -import com.azure.core.util.Context; - /** Samples for ProactiveDetectionConfigurations List. */ public final class ProactiveDetectionConfigurationsListSamples { /* @@ -1763,7 +1748,9 @@ public final class ProactiveDetectionConfigurationsListSamples { */ public static void proactiveDetectionConfigurationsList( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.proactiveDetectionConfigurations().listWithResponse("my-resource-group", "my-component", Context.NONE); + manager + .proactiveDetectionConfigurations() + .listWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } ``` @@ -1771,7 +1758,6 @@ public final class ProactiveDetectionConfigurationsListSamples { ### ProactiveDetectionConfigurations_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentProactiveDetectionConfigurationInner; import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions; import java.util.Arrays; @@ -1810,7 +1796,7 @@ public final class ProactiveDetectionConfigurationsUpdateSamples { .withIsEnabledByDefault(true) .withIsInPreview(false) .withSupportsEmailNotifications(true)), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1818,8 +1804,6 @@ public final class ProactiveDetectionConfigurationsUpdateSamples { ### WebTestLocations_List ```java -import com.azure.core.util.Context; - /** Samples for WebTestLocations List. */ public final class WebTestLocationsListSamples { /* @@ -1832,7 +1816,7 @@ public final class WebTestLocationsListSamples { */ public static void webTestLocationsList( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.webTestLocations().list("my-resource-group", "my-component", Context.NONE); + manager.webTestLocations().list("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } ``` @@ -1840,15 +1824,18 @@ public final class WebTestLocationsListSamples { ### WebTests_CreateOrUpdate ```java +import com.azure.resourcemanager.applicationinsights.models.HeaderField; import com.azure.resourcemanager.applicationinsights.models.WebTestGeolocation; import com.azure.resourcemanager.applicationinsights.models.WebTestKind; import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesConfiguration; +import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesRequest; +import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesValidationRules; import java.util.Arrays; /** Samples for WebTests CreateOrUpdate. */ public final class WebTestsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestCreate.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestCreate.json */ /** * Sample code: webTestCreate. @@ -1889,7 +1876,50 @@ public final class WebTestsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestUpdate.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestCreateStandard.json + */ + /** + * Sample code: webTestCreateStandard. + * + * @param manager Entry point to ApplicationInsightsManager. + */ + public static void webTestCreateStandard( + com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager + .webTests() + .define("my-webtest-my-component") + .withRegion("South Central US") + .withExistingResourceGroup("my-resource-group") + .withSyntheticMonitorId("my-webtest-my-component") + .withWebTestName("my-webtest-my-component") + .withDescription("Ping web test alert for mytestwebapp") + .withEnabled(true) + .withFrequency(900) + .withTimeout(120) + .withWebTestKind(WebTestKind.STANDARD) + .withRetryEnabled(true) + .withLocations(Arrays.asList(new WebTestGeolocation().withLocation("us-fl-mia-edge"))) + .withRequest( + new WebTestPropertiesRequest() + .withRequestUrl("https://bing.com") + .withHeaders( + Arrays + .asList( + new HeaderField() + .withHeaderFieldName("fakeTokenPlaceholder") + .withHeaderFieldValue("de-DE"), + new HeaderField() + .withHeaderFieldName("fakeTokenPlaceholder") + .withHeaderFieldValue("de-DE"))) + .withHttpVerb("POST") + .withRequestBody("SGVsbG8gd29ybGQ=")) + .withValidationRules( + new WebTestPropertiesValidationRules().withSslCheck(true).withSslCertRemainingLifetimeCheck(100)) + .create(); + } + + /* + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestUpdate.json */ /** * Sample code: webTestUpdate. @@ -1935,12 +1965,10 @@ public final class WebTestsCreateOrUpdateSamples { ### WebTests_Delete ```java -import com.azure.core.util.Context; - /** Samples for WebTests Delete. */ public final class WebTestsDeleteSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestDelete.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestDelete.json */ /** * Sample code: webTestDelete. @@ -1948,7 +1976,10 @@ public final class WebTestsDeleteSamples { * @param manager Entry point to ApplicationInsightsManager. */ public static void webTestDelete(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.webTests().deleteWithResponse("my-resource-group", "my-webtest-01-mywebservice", Context.NONE); + manager + .webTests() + .deleteByResourceGroupWithResponse( + "my-resource-group", "my-webtest-01-mywebservice", com.azure.core.util.Context.NONE); } } ``` @@ -1956,12 +1987,10 @@ public final class WebTestsDeleteSamples { ### WebTests_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for WebTests GetByResourceGroup. */ public final class WebTestsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestGet.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestGet.json */ /** * Sample code: webTestGet. @@ -1971,7 +2000,8 @@ public final class WebTestsGetByResourceGroupSamples { public static void webTestGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .webTests() - .getByResourceGroupWithResponse("my-resource-group", "my-webtest-01-mywebservice", Context.NONE); + .getByResourceGroupWithResponse( + "my-resource-group", "my-webtest-01-mywebservice", com.azure.core.util.Context.NONE); } } ``` @@ -1979,12 +2009,10 @@ public final class WebTestsGetByResourceGroupSamples { ### WebTests_List ```java -import com.azure.core.util.Context; - /** Samples for WebTests List. */ public final class WebTestsListSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestList.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestList.json */ /** * Sample code: webTestList. @@ -1992,7 +2020,7 @@ public final class WebTestsListSamples { * @param manager Entry point to ApplicationInsightsManager. */ public static void webTestList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.webTests().list(Context.NONE); + manager.webTests().list(com.azure.core.util.Context.NONE); } } ``` @@ -2000,12 +2028,10 @@ public final class WebTestsListSamples { ### WebTests_ListByComponent ```java -import com.azure.core.util.Context; - /** Samples for WebTests ListByComponent. */ public final class WebTestsListByComponentSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestListByComponent.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestListByComponent.json */ /** * Sample code: webTestListByComponent. @@ -2014,7 +2040,7 @@ public final class WebTestsListByComponentSamples { */ public static void webTestListByComponent( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.webTests().listByComponent("my-component", "my-resource-group", Context.NONE); + manager.webTests().listByComponent("my-component", "my-resource-group", com.azure.core.util.Context.NONE); } } ``` @@ -2022,12 +2048,10 @@ public final class WebTestsListByComponentSamples { ### WebTests_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for WebTests ListByResourceGroup. */ public final class WebTestsListByResourceGroupSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestListByResourceGroup.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestListByResourceGroup.json */ /** * Sample code: webTestListByResourceGroup. @@ -2036,7 +2060,7 @@ public final class WebTestsListByResourceGroupSamples { */ public static void webTestListByResourceGroup( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.webTests().listByResourceGroup("my-resource-group", Context.NONE); + manager.webTests().listByResourceGroup("my-resource-group", com.azure.core.util.Context.NONE); } } ``` @@ -2044,7 +2068,6 @@ public final class WebTestsListByResourceGroupSamples { ### WebTests_UpdateTags ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.WebTest; import java.util.HashMap; import java.util.Map; @@ -2052,7 +2075,7 @@ import java.util.Map; /** Samples for WebTests UpdateTags. */ public final class WebTestsUpdateTagsSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestUpdateTagsOnly.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestUpdateTagsOnly.json */ /** * Sample code: webTestUpdateTags. @@ -2064,7 +2087,8 @@ public final class WebTestsUpdateTagsSamples { WebTest resource = manager .webTests() - .getByResourceGroupWithResponse("my-resource-group", "my-webtest-my-component", Context.NONE) + .getByResourceGroupWithResponse( + "my-resource-group", "my-webtest-my-component", com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -2077,8 +2101,6 @@ public final class WebTestsUpdateTagsSamples { "SystemType", "A08", "hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component", - "Resource", - "hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/mytestwebapp", "Resource")) .apply(); } @@ -2099,7 +2121,6 @@ public final class WebTestsUpdateTagsSamples { ### WorkItemConfigurations_Create ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.WorkItemCreateConfiguration; import java.util.HashMap; import java.util.Map; @@ -2127,7 +2148,7 @@ public final class WorkItemConfigurationsCreateSamples { "{\"VSOAccountBaseUrl\":\"https://testtodelete.visualstudio.com\",\"ProjectCollection\":\"DefaultCollection\",\"Project\":\"todeletefirst\",\"ResourceId\":\"d0662b05-439a-4a1b-840b-33a7f8b42ebf\",\"Custom\":\"{\\\"/fields/System.WorkItemType\\\":\\\"Bug\\\",\\\"/fields/System.AreaPath\\\":\\\"todeletefirst\\\",\\\"/fields/System.AssignedTo\\\":\\\"\\\"}\"}") .withValidateOnly(true) .withWorkItemProperties(mapOf()), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") @@ -2146,8 +2167,6 @@ public final class WorkItemConfigurationsCreateSamples { ### WorkItemConfigurations_Delete ```java -import com.azure.core.util.Context; - /** Samples for WorkItemConfigurations Delete. */ public final class WorkItemConfigurationsDeleteSamples { /* @@ -2162,7 +2181,8 @@ public final class WorkItemConfigurationsDeleteSamples { com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .workItemConfigurations() - .deleteWithResponse("my-resource-group", "my-component", "Visual Studio Team Services", Context.NONE); + .deleteWithResponse( + "my-resource-group", "my-component", "Visual Studio Team Services", com.azure.core.util.Context.NONE); } } ``` @@ -2170,8 +2190,6 @@ public final class WorkItemConfigurationsDeleteSamples { ### WorkItemConfigurations_GetDefault ```java -import com.azure.core.util.Context; - /** Samples for WorkItemConfigurations GetDefault. */ public final class WorkItemConfigurationsGetDefaultSamples { /* @@ -2184,7 +2202,9 @@ public final class WorkItemConfigurationsGetDefaultSamples { */ public static void workItemConfigurationsGetDefault( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.workItemConfigurations().getDefaultWithResponse("my-resource-group", "my-component", Context.NONE); + manager + .workItemConfigurations() + .getDefaultWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } ``` @@ -2192,8 +2212,6 @@ public final class WorkItemConfigurationsGetDefaultSamples { ### WorkItemConfigurations_GetItem ```java -import com.azure.core.util.Context; - /** Samples for WorkItemConfigurations GetItem. */ public final class WorkItemConfigurationsGetItemSamples { /* @@ -2208,7 +2226,8 @@ public final class WorkItemConfigurationsGetItemSamples { com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .workItemConfigurations() - .getItemWithResponse("my-resource-group", "my-component", "Visual Studio Team Services", Context.NONE); + .getItemWithResponse( + "my-resource-group", "my-component", "Visual Studio Team Services", com.azure.core.util.Context.NONE); } } ``` @@ -2216,8 +2235,6 @@ public final class WorkItemConfigurationsGetItemSamples { ### WorkItemConfigurations_List ```java -import com.azure.core.util.Context; - /** Samples for WorkItemConfigurations List. */ public final class WorkItemConfigurationsListSamples { /* @@ -2230,7 +2247,7 @@ public final class WorkItemConfigurationsListSamples { */ public static void workItemConfigurationsList( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.workItemConfigurations().list("my-resource-group", "my-component", Context.NONE); + manager.workItemConfigurations().list("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } ``` @@ -2238,7 +2255,6 @@ public final class WorkItemConfigurationsListSamples { ### WorkItemConfigurations_UpdateItem ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.WorkItemCreateConfiguration; import java.util.HashMap; import java.util.Map; @@ -2267,7 +2283,7 @@ public final class WorkItemConfigurationsUpdateItemSamples { "{\"VSOAccountBaseUrl\":\"https://testtodelete.visualstudio.com\",\"ProjectCollection\":\"DefaultCollection\",\"Project\":\"todeletefirst\",\"ResourceId\":\"d0662b05-439a-4a1b-840b-33a7f8b42ebf\",\"Custom\":\"{\\\"/fields/System.WorkItemType\\\":\\\"Bug\\\",\\\"/fields/System.AreaPath\\\":\\\"todeletefirst\\\",\\\"/fields/System.AssignedTo\\\":\\\"\\\"}\"}") .withValidateOnly(true) .withWorkItemProperties(mapOf()), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") @@ -2348,8 +2364,6 @@ public final class WorkbookTemplatesCreateOrUpdateSamples { ### WorkbookTemplates_Delete ```java -import com.azure.core.util.Context; - /** Samples for WorkbookTemplates Delete. */ public final class WorkbookTemplatesDeleteSamples { /* @@ -2362,7 +2376,10 @@ public final class WorkbookTemplatesDeleteSamples { */ public static void workbookTemplateDelete( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.workbookTemplates().deleteWithResponse("my-resource-group", "my-template-resource", Context.NONE); + manager + .workbookTemplates() + .deleteByResourceGroupWithResponse( + "my-resource-group", "my-template-resource", com.azure.core.util.Context.NONE); } } ``` @@ -2370,8 +2387,6 @@ public final class WorkbookTemplatesDeleteSamples { ### WorkbookTemplates_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for WorkbookTemplates GetByResourceGroup. */ public final class WorkbookTemplatesGetByResourceGroupSamples { /* @@ -2386,7 +2401,7 @@ public final class WorkbookTemplatesGetByResourceGroupSamples { com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .workbookTemplates() - .getByResourceGroupWithResponse("my-resource-group", "my-resource-name", Context.NONE); + .getByResourceGroupWithResponse("my-resource-group", "my-resource-name", com.azure.core.util.Context.NONE); } } ``` @@ -2394,8 +2409,6 @@ public final class WorkbookTemplatesGetByResourceGroupSamples { ### WorkbookTemplates_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for WorkbookTemplates ListByResourceGroup. */ public final class WorkbookTemplatesListByResourceGroupSamples { /* @@ -2408,7 +2421,7 @@ public final class WorkbookTemplatesListByResourceGroupSamples { */ public static void workbookTemplatesList( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.workbookTemplates().listByResourceGroup("my-resource-group", Context.NONE); + manager.workbookTemplates().listByResourceGroup("my-resource-group", com.azure.core.util.Context.NONE); } } ``` @@ -2416,7 +2429,6 @@ public final class WorkbookTemplatesListByResourceGroupSamples { ### WorkbookTemplates_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplate; /** Samples for WorkbookTemplates Update. */ @@ -2434,7 +2446,8 @@ public final class WorkbookTemplatesUpdateSamples { WorkbookTemplate resource = manager .workbookTemplates() - .getByResourceGroupWithResponse("my-resource-group", "my-template-resource", Context.NONE) + .getByResourceGroupWithResponse( + "my-resource-group", "my-template-resource", com.azure.core.util.Context.NONE) .getValue(); resource.update().apply(); } @@ -2550,8 +2563,6 @@ public final class WorkbooksCreateOrUpdateSamples { ### Workbooks_Delete ```java -import com.azure.core.util.Context; - /** Samples for Workbooks Delete. */ public final class WorkbooksDeleteSamples { /* @@ -2566,7 +2577,8 @@ public final class WorkbooksDeleteSamples { com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .workbooks() - .deleteWithResponse("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE); + .deleteByResourceGroupWithResponse( + "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", com.azure.core.util.Context.NONE); } } ``` @@ -2574,8 +2586,6 @@ public final class WorkbooksDeleteSamples { ### Workbooks_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for Workbooks GetByResourceGroup. */ public final class WorkbooksGetByResourceGroupSamples { /* @@ -2590,7 +2600,7 @@ public final class WorkbooksGetByResourceGroupSamples { manager .workbooks() .getByResourceGroupWithResponse( - "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, Context.NONE); + "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, com.azure.core.util.Context.NONE); } /* @@ -2606,7 +2616,7 @@ public final class WorkbooksGetByResourceGroupSamples { manager .workbooks() .getByResourceGroupWithResponse( - "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, Context.NONE); + "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, com.azure.core.util.Context.NONE); } /* @@ -2621,7 +2631,7 @@ public final class WorkbooksGetByResourceGroupSamples { manager .workbooks() .getByResourceGroupWithResponse( - "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, Context.NONE); + "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, com.azure.core.util.Context.NONE); } } ``` @@ -2629,7 +2639,6 @@ public final class WorkbooksGetByResourceGroupSamples { ### Workbooks_List ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.CategoryType; /** Samples for Workbooks List. */ @@ -2644,7 +2653,7 @@ public final class WorkbooksListSamples { */ public static void workbooksListSub( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.workbooks().list(CategoryType.WORKBOOK, null, null, Context.NONE); + manager.workbooks().list(CategoryType.WORKBOOK, null, null, com.azure.core.util.Context.NONE); } /* @@ -2657,7 +2666,7 @@ public final class WorkbooksListSamples { */ public static void workbooksList2( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.workbooks().list(CategoryType.WORKBOOK, null, null, Context.NONE); + manager.workbooks().list(CategoryType.WORKBOOK, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -2665,7 +2674,6 @@ public final class WorkbooksListSamples { ### Workbooks_ListByResourceGroup ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.CategoryType; /** Samples for Workbooks ListByResourceGroup. */ @@ -2688,7 +2696,7 @@ public final class WorkbooksListByResourceGroupSamples { null, "/subscriptions/6b643656-33eb-422f-aee8-3ac119r124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp", null, - Context.NONE); + com.azure.core.util.Context.NONE); } /* @@ -2708,7 +2716,7 @@ public final class WorkbooksListByResourceGroupSamples { null, "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp", null, - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -2716,8 +2724,6 @@ public final class WorkbooksListByResourceGroupSamples { ### Workbooks_RevisionGet ```java -import com.azure.core.util.Context; - /** Samples for Workbooks RevisionGet. */ public final class WorkbooksRevisionGetSamples { /* @@ -2736,7 +2742,7 @@ public final class WorkbooksRevisionGetSamples { "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", "1e2f8435b98248febee70c64ac22e1ab", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -2744,8 +2750,6 @@ public final class WorkbooksRevisionGetSamples { ### Workbooks_RevisionsList ```java -import com.azure.core.util.Context; - /** Samples for Workbooks RevisionsList. */ public final class WorkbooksRevisionsListSamples { /* @@ -2758,7 +2762,10 @@ public final class WorkbooksRevisionsListSamples { */ public static void workbookRevisionsList( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.workbooks().revisionsList("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE); + manager + .workbooks() + .revisionsList( + "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", com.azure.core.util.Context.NONE); } } ``` @@ -2766,7 +2773,6 @@ public final class WorkbooksRevisionsListSamples { ### Workbooks_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.Workbook; /** Samples for Workbooks Update. */ @@ -2785,7 +2791,7 @@ public final class WorkbooksUpdateSamples { manager .workbooks() .getByResourceGroupWithResponse( - "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, Context.NONE) + "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -2808,7 +2814,7 @@ public final class WorkbooksUpdateSamples { manager .workbooks() .getByResourceGroupWithResponse( - "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, Context.NONE) + "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, com.azure.core.util.Context.NONE) .getValue(); resource .update() diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml index 2438c9f7732a..1c2c3b5fdf54 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for ApplicationInsights Management - This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Composite Swagger for Application Insights Management Client. Package tag package-2022-04-01. + This package contains Microsoft Azure SDK for ApplicationInsights Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Composite Swagger for Application Insights Management Client. Package tag package-2022-12-09-only. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/ApplicationInsightsManager.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/ApplicationInsightsManager.java index 7a0a02f3a605..fdbb629ffa7c 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/ApplicationInsightsManager.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/ApplicationInsightsManager.java @@ -74,7 +74,7 @@ /** Entry point to ApplicationInsightsManager. Composite Swagger for Application Insights Management Client. */ public final class ApplicationInsightsManager { - private Operations operations; + private Components components; private Annotations annotations; @@ -102,18 +102,18 @@ public final class ApplicationInsightsManager { private AnalyticsItems analyticsItems; + private Operations operations; + private WorkbookTemplates workbookTemplates; private MyWorkbooks myWorkbooks; private Workbooks workbooks; - private Components components; + private LiveTokens liveTokens; private ComponentLinkedStorageAccountsOperations componentLinkedStorageAccountsOperations; - private LiveTokens liveTokens; - private final ApplicationInsightsManagementClient clientObject; private ApplicationInsightsManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -279,7 +279,7 @@ public ApplicationInsightsManager authenticate(TokenCredential credential, Azure .append("-") .append("com.azure.resourcemanager.applicationinsights") .append("/") - .append("1.0.0-beta.5"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -337,15 +337,15 @@ public ApplicationInsightsManager authenticate(TokenCredential credential, Azure } /** - * Gets the resource collection API of Operations. + * Gets the resource collection API of Components. It manages ApplicationInsightsComponent. * - * @return Resource collection API of Operations. + * @return Resource collection API of Components. */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); + public Components components() { + if (this.components == null) { + this.components = new ComponentsImpl(clientObject.getComponents(), this); } - return operations; + return components; } /** @@ -509,6 +509,18 @@ public AnalyticsItems analyticsItems() { return analyticsItems; } + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + /** * Gets the resource collection API of WorkbookTemplates. It manages WorkbookTemplate. * @@ -546,15 +558,15 @@ public Workbooks workbooks() { } /** - * Gets the resource collection API of Components. It manages ApplicationInsightsComponent. + * Gets the resource collection API of LiveTokens. * - * @return Resource collection API of Components. + * @return Resource collection API of LiveTokens. */ - public Components components() { - if (this.components == null) { - this.components = new ComponentsImpl(clientObject.getComponents(), this); + public LiveTokens liveTokens() { + if (this.liveTokens == null) { + this.liveTokens = new LiveTokensImpl(clientObject.getLiveTokens(), this); } - return components; + return liveTokens; } /** @@ -572,18 +584,6 @@ public ComponentLinkedStorageAccountsOperations componentLinkedStorageAccountsOp return componentLinkedStorageAccountsOperations; } - /** - * Gets the resource collection API of LiveTokens. - * - * @return Resource collection API of LiveTokens. - */ - public LiveTokens liveTokens() { - if (this.liveTokens == null) { - this.liveTokens = new LiveTokensImpl(clientObject.getLiveTokens(), this); - } - return liveTokens; - } - /** * @return Wrapped service client ApplicationInsightsManagementClient providing direct access to the underlying * auto-generated API implementation, based on Azure REST API. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnalyticsItemsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnalyticsItemsClient.java index 34de30d20f86..5f0ff63a4d70 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnalyticsItemsClient.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnalyticsItemsClient.java @@ -16,22 +16,6 @@ /** An instance of this class provides access to all the operations defined in AnalyticsItemsClient. */ public interface AnalyticsItemsClient { - /** - * Gets a list of Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Analytics Items defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - List list( - String resourceGroupName, String resourceName, ItemScopePath scopePath); - /** * Gets a list of Analytics Items defined within an Application Insights component. * @@ -61,7 +45,7 @@ Response> listWithResponse( Context context); /** - * Gets a specific Analytics Items defined within an Application Insights component. + * Gets a list of Analytics Items defined within an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. @@ -70,10 +54,10 @@ Response> listWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Analytics Items defined within an Application Insights component. + * @return a list of Analytics Items defined within an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentAnalyticsItemInner get( + List list( String resourceGroupName, String resourceName, ItemScopePath scopePath); /** @@ -101,25 +85,20 @@ Response getWithResponse( Context context); /** - * Adds or Updates a specific Analytics Item within an Application Insights component. + * Gets a specific Analytics Items defined within an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all * users with access to the Application Insights component. - * @param itemProperties Properties that need to be specified to create a new item and add it to an Application - * Insights component. * @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 properties that define an Analytics item that is associated to an Application Insights component. + * @return a specific Analytics Items defined within an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentAnalyticsItemInner put( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties); + ApplicationInsightsComponentAnalyticsItemInner get( + String resourceGroupName, String resourceName, ItemScopePath scopePath); /** * Adds or Updates a specific Analytics Item within an Application Insights component. @@ -149,18 +128,25 @@ Response putWithResponse( Context context); /** - * Deletes a specific Analytics Items defined within an Application Insights component. + * Adds or Updates a specific Analytics Item within an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all * users with access to the Application Insights component. + * @param itemProperties Properties that need to be specified to create a new item and add it to an Application + * Insights component. * @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 properties that define an Analytics item that is associated to an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, ItemScopePath scopePath); + ApplicationInsightsComponentAnalyticsItemInner put( + String resourceGroupName, + String resourceName, + ItemScopePath scopePath, + ApplicationInsightsComponentAnalyticsItemInner itemProperties); /** * Deletes a specific Analytics Items defined within an Application Insights component. @@ -185,4 +171,18 @@ Response deleteWithResponse( String id, String name, Context context); + + /** + * Deletes a specific Analytics Items defined within an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all + * users with access to the Application Insights component. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, ItemScopePath scopePath); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnnotationsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnnotationsClient.java index f225ed93af97..7e7a70aa842f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnnotationsClient.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/AnnotationsClient.java @@ -57,14 +57,16 @@ PagedIterable list( * @param resourceName The name of the Application Insights component resource. * @param annotationProperties Properties that need to be specified to create an annotation of a Application * Insights component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is * rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of Annotation. + * @return array of Annotation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - List create(String resourceGroupName, String resourceName, AnnotationInner annotationProperties); + Response> createWithResponse( + String resourceGroupName, String resourceName, AnnotationInner annotationProperties, Context context); /** * Create an Annotation of an Application Insights component. @@ -73,16 +75,14 @@ PagedIterable list( * @param resourceName The name of the Application Insights component resource. * @param annotationProperties Properties that need to be specified to create an annotation of a Application * Insights component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is * rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of Annotation along with {@link Response}. + * @return array of Annotation. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response> createWithResponse( - String resourceGroupName, String resourceName, AnnotationInner annotationProperties, Context context); + List create(String resourceGroupName, String resourceName, AnnotationInner annotationProperties); /** * Delete an Annotation of an Application Insights component. @@ -90,12 +90,15 @@ Response> createWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationId The unique annotation ID. This is unique within a Application Insights component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String annotationId); + Response deleteWithResponse( + String resourceGroupName, String resourceName, String annotationId, Context context); /** * Delete an Annotation of an Application Insights component. @@ -103,15 +106,12 @@ Response> createWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context); + void delete(String resourceGroupName, String resourceName, String annotationId); /** * Get the annotation for given id. @@ -119,14 +119,16 @@ Response deleteWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationId The unique annotation ID. This is unique within a Application Insights component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is * rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the annotation for given id. + * @return the annotation for given id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - List get(String resourceGroupName, String resourceName, String annotationId); + Response> getWithResponse( + String resourceGroupName, String resourceName, String annotationId, Context context); /** * Get the annotation for given id. @@ -134,14 +136,12 @@ Response deleteWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is * rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the annotation for given id along with {@link Response}. + * @return the annotation for given id. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response> getWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context); + List get(String resourceGroupName, String resourceName, String annotationId); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ApiKeysClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ApiKeysClient.java index f73033e768f5..76e513e7f6c8 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ApiKeysClient.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ApiKeysClient.java @@ -49,14 +49,15 @@ PagedIterable list( * @param resourceName The name of the Application Insights component resource. * @param apiKeyProperties Properties that need to be specified to create an API key of a Application Insights * component. + * @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 properties that define an API key of an Application Insights Component. + * @return properties that define an API key of an Application Insights Component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentApiKeyInner create( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties); + Response createWithResponse( + String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties, Context context); /** * Create an API Key of an Application Insights component. @@ -65,15 +66,14 @@ ApplicationInsightsComponentApiKeyInner create( * @param resourceName The name of the Application Insights component resource. * @param apiKeyProperties Properties that need to be specified to create an API key of a Application Insights * component. - * @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 properties that define an API key of an Application Insights Component along with {@link Response}. + * @return properties that define an API key of an Application Insights Component. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties, Context context); + ApplicationInsightsComponentApiKeyInner create( + String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties); /** * Delete an API Key of an Application Insights component. @@ -81,13 +81,15 @@ Response createWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param keyId The API Key ID. This is unique within a Application Insights component. + * @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 properties that define an API key of an Application Insights Component. + * @return properties that define an API key of an Application Insights Component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentApiKeyInner delete(String resourceGroupName, String resourceName, String keyId); + Response deleteWithResponse( + String resourceGroupName, String resourceName, String keyId, Context context); /** * Delete an API Key of an Application Insights component. @@ -95,15 +97,13 @@ Response createWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param keyId The API Key ID. This is unique within a Application Insights component. - * @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 properties that define an API key of an Application Insights Component along with {@link Response}. + * @return properties that define an API key of an Application Insights Component. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String resourceName, String keyId, Context context); + ApplicationInsightsComponentApiKeyInner delete(String resourceGroupName, String resourceName, String keyId); /** * Get the API Key for this key id. @@ -111,13 +111,15 @@ Response deleteWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param keyId The API Key ID. This is unique within a Application Insights component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the API Key for this key id. + * @return the API Key for this key id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentApiKeyInner get(String resourceGroupName, String resourceName, String keyId); + Response getWithResponse( + String resourceGroupName, String resourceName, String keyId, Context context); /** * Get the API Key for this key id. @@ -125,13 +127,11 @@ Response deleteWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param keyId The API Key ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the API Key for this key id along with {@link Response}. + * @return the API Key for this key id. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, String keyId, Context context); + ApplicationInsightsComponentApiKeyInner get(String resourceGroupName, String resourceName, String keyId); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ApplicationInsightsManagementClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ApplicationInsightsManagementClient.java index 5b4984d43ad4..7d6680144ae7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ApplicationInsightsManagementClient.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ApplicationInsightsManagementClient.java @@ -38,11 +38,11 @@ public interface ApplicationInsightsManagementClient { Duration getDefaultPollInterval(); /** - * Gets the OperationsClient object to access its operations. + * Gets the ComponentsClient object to access its operations. * - * @return the OperationsClient object. + * @return the ComponentsClient object. */ - OperationsClient getOperations(); + ComponentsClient getComponents(); /** * Gets the AnnotationsClient object to access its operations. @@ -135,6 +135,13 @@ public interface ApplicationInsightsManagementClient { */ AnalyticsItemsClient getAnalyticsItems(); + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + /** * Gets the WorkbookTemplatesClient object to access its operations. * @@ -157,11 +164,11 @@ public interface ApplicationInsightsManagementClient { WorkbooksClient getWorkbooks(); /** - * Gets the ComponentsClient object to access its operations. + * Gets the LiveTokensClient object to access its operations. * - * @return the ComponentsClient object. + * @return the LiveTokensClient object. */ - ComponentsClient getComponents(); + LiveTokensClient getLiveTokens(); /** * Gets the ComponentLinkedStorageAccountsOperationsClient object to access its operations. @@ -169,11 +176,4 @@ public interface ApplicationInsightsManagementClient { * @return the ComponentLinkedStorageAccountsOperationsClient object. */ ComponentLinkedStorageAccountsOperationsClient getComponentLinkedStorageAccountsOperations(); - - /** - * Gets the LiveTokensClient object to access its operations. - * - * @return the LiveTokensClient object. - */ - LiveTokensClient getLiveTokens(); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentAvailableFeaturesClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentAvailableFeaturesClient.java index 727c8c1cbc94..89be54026eb3 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentAvailableFeaturesClient.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentAvailableFeaturesClient.java @@ -17,26 +17,26 @@ public interface ComponentAvailableFeaturesClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component available features. + * @return an Application Insights component available features along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentAvailableFeaturesInner get(String resourceGroupName, String resourceName); + Response getWithResponse( + String resourceGroupName, String resourceName, Context context); /** * Returns all available features of the application insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component available features along with {@link Response}. + * @return an Application Insights component available features. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); + ApplicationInsightsComponentAvailableFeaturesInner get(String resourceGroupName, String resourceName); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentCurrentBillingFeaturesClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentCurrentBillingFeaturesClient.java index ac14426b9e58..a7f642c0bb84 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentCurrentBillingFeaturesClient.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentCurrentBillingFeaturesClient.java @@ -17,28 +17,28 @@ public interface ComponentCurrentBillingFeaturesClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component billing features. + * @return an Application Insights component billing features along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentBillingFeaturesInner get(String resourceGroupName, String resourceName); + Response getWithResponse( + String resourceGroupName, String resourceName, Context context); /** * Returns current billing features for an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component billing features along with {@link Response}. + * @return an Application Insights component billing features. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); + ApplicationInsightsComponentBillingFeaturesInner get(String resourceGroupName, String resourceName); /** * Update current billing features for an Application Insights component. @@ -47,16 +47,18 @@ Response getWithResponse( * @param resourceName The name of the Application Insights component resource. * @param billingFeaturesProperties Properties that need to be specified to update billing features for an * Application Insights component. + * @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 an Application Insights component billing features. + * @return an Application Insights component billing features along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentBillingFeaturesInner update( + Response updateWithResponse( String resourceGroupName, String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties); + ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, + Context context); /** * Update current billing features for an Application Insights component. @@ -65,16 +67,14 @@ ApplicationInsightsComponentBillingFeaturesInner update( * @param resourceName The name of the Application Insights component resource. * @param billingFeaturesProperties Properties that need to be specified to update billing features for an * Application Insights component. - * @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 an Application Insights component billing features along with {@link Response}. + * @return an Application Insights component billing features. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( + ApplicationInsightsComponentBillingFeaturesInner update( String resourceGroupName, String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, - Context context); + ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentFeatureCapabilitiesClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentFeatureCapabilitiesClient.java index 96636362f94e..afc84808e384 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentFeatureCapabilitiesClient.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentFeatureCapabilitiesClient.java @@ -17,26 +17,26 @@ public interface ComponentFeatureCapabilitiesClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component feature capabilities. + * @return an Application Insights component feature capabilities along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentFeatureCapabilitiesInner get(String resourceGroupName, String resourceName); + Response getWithResponse( + String resourceGroupName, String resourceName, Context context); /** * Returns feature capabilities of the application insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component feature capabilities along with {@link Response}. + * @return an Application Insights component feature capabilities. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); + ApplicationInsightsComponentFeatureCapabilitiesInner get(String resourceGroupName, String resourceName); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentLinkedStorageAccountsOperationsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentLinkedStorageAccountsOperationsClient.java index db16075e731a..535410e9d3bd 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentLinkedStorageAccountsOperationsClient.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentLinkedStorageAccountsOperationsClient.java @@ -23,13 +23,15 @@ public interface ComponentLinkedStorageAccountsOperationsClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param storageType The type of the Application Insights component data source for the linked storage account. + * @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 an Application Insights component linked storage accounts. + * @return an Application Insights component linked storage accounts along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComponentLinkedStorageAccountsInner get(String resourceGroupName, String resourceName, StorageType storageType); + Response getWithResponse( + String resourceGroupName, String resourceName, StorageType storageType, Context context); /** * Returns the current linked storage settings for an Application Insights component. @@ -37,15 +39,13 @@ public interface ComponentLinkedStorageAccountsOperationsClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param storageType The type of the Application Insights component data source for the linked storage account. - * @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 an Application Insights component linked storage accounts along with {@link Response}. + * @return an Application Insights component linked storage accounts. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, StorageType storageType, Context context); + ComponentLinkedStorageAccountsInner get(String resourceGroupName, String resourceName, StorageType storageType); /** * Replace current linked storage account for an Application Insights component. @@ -55,17 +55,19 @@ Response getWithResponse( * @param storageType The type of the Application Insights component data source for the linked storage account. * @param linkedStorageAccountsProperties Properties that need to be specified to update linked storage accounts for * an Application Insights component. + * @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 an Application Insights component linked storage accounts. + * @return an Application Insights component linked storage accounts along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComponentLinkedStorageAccountsInner createAndUpdate( + Response createAndUpdateWithResponse( String resourceGroupName, String resourceName, StorageType storageType, - ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties); + ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties, + Context context); /** * Replace current linked storage account for an Application Insights component. @@ -75,19 +77,17 @@ ComponentLinkedStorageAccountsInner createAndUpdate( * @param storageType The type of the Application Insights component data source for the linked storage account. * @param linkedStorageAccountsProperties Properties that need to be specified to update linked storage accounts for * an Application Insights component. - * @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 an Application Insights component linked storage accounts along with {@link Response}. + * @return an Application Insights component linked storage accounts. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createAndUpdateWithResponse( + ComponentLinkedStorageAccountsInner createAndUpdate( String resourceGroupName, String resourceName, StorageType storageType, - ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties, - Context context); + ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties); /** * Update linked storage accounts for an Application Insights component. @@ -97,17 +97,19 @@ Response createAndUpdateWithResponse( * @param storageType The type of the Application Insights component data source for the linked storage account. * @param linkedStorageAccountsProperties Properties that need to be specified to update a linked storage accounts * for an Application Insights component. + * @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 an Application Insights component linked storage accounts. + * @return an Application Insights component linked storage accounts along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComponentLinkedStorageAccountsInner update( + Response updateWithResponse( String resourceGroupName, String resourceName, StorageType storageType, - ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties); + ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties, + Context context); /** * Update linked storage accounts for an Application Insights component. @@ -117,19 +119,17 @@ ComponentLinkedStorageAccountsInner update( * @param storageType The type of the Application Insights component data source for the linked storage account. * @param linkedStorageAccountsProperties Properties that need to be specified to update a linked storage accounts * for an Application Insights component. - * @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 an Application Insights component linked storage accounts along with {@link Response}. + * @return an Application Insights component linked storage accounts. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( + ComponentLinkedStorageAccountsInner update( String resourceGroupName, String resourceName, StorageType storageType, - ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties, - Context context); + ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties); /** * Delete linked storage accounts for an Application Insights component. @@ -137,12 +137,15 @@ Response updateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param storageType The type of the Application Insights component data source for the linked storage account. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, StorageType storageType); + Response deleteWithResponse( + String resourceGroupName, String resourceName, StorageType storageType, Context context); /** * Delete linked storage accounts for an Application Insights component. @@ -150,13 +153,10 @@ Response updateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param storageType The type of the Application Insights component data source for the linked storage account. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String resourceName, StorageType storageType, Context context); + void delete(String resourceGroupName, String resourceName, StorageType storageType); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentQuotaStatusClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentQuotaStatusClient.java index f0c80ff37a83..c2b012636e06 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentQuotaStatusClient.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentQuotaStatusClient.java @@ -17,26 +17,26 @@ public interface ComponentQuotaStatusClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component daily data volume cap status. + * @return an Application Insights component daily data volume cap status along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentQuotaStatusInner get(String resourceGroupName, String resourceName); + Response getWithResponse( + String resourceGroupName, String resourceName, Context context); /** * Returns daily data volume cap (quota) status for an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component daily data volume cap status along with {@link Response}. + * @return an Application Insights component daily data volume cap status. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); + ApplicationInsightsComponentQuotaStatusInner get(String resourceGroupName, String resourceName); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentsClient.java index 552034af9f36..331f9d18022e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentsClient.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ComponentsClient.java @@ -68,18 +68,6 @@ public interface ComponentsClient { @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); - /** - * Deletes an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName); - /** * Deletes an Application Insights component. * @@ -95,17 +83,16 @@ public interface ComponentsClient { Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); /** - * Returns an Application Insights component. + * Deletes an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentInner getByResourceGroup(String resourceGroupName, String resourceName); + void delete(String resourceGroupName, String resourceName); /** * Returns an Application Insights component. @@ -123,20 +110,17 @@ Response getByResourceGroupWithResponse( String resourceGroupName, String resourceName, Context context); /** - * Creates (or updates) an Application Insights component. Note: You cannot specify a different value for - * InstrumentationKey nor AppId in the Put operation. + * Returns an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param insightProperties Properties that need to be specified to create an Application Insights component. * @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 an Application Insights component definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentInner createOrUpdate( - String resourceGroupName, String resourceName, ApplicationInsightsComponentInner insightProperties); + ApplicationInsightsComponentInner getByResourceGroup(String resourceGroupName, String resourceName); /** * Creates (or updates) an Application Insights component. Note: You cannot specify a different value for @@ -159,19 +143,20 @@ Response createOrUpdateWithResponse( Context context); /** - * Updates an existing component's tags. To update other fields use the CreateOrUpdate method. + * Creates (or updates) an Application Insights component. Note: You cannot specify a different value for + * InstrumentationKey nor AppId in the Put operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param componentTags Updated tag information to set into the component instance. + * @param insightProperties Properties that need to be specified to create an Application Insights component. * @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 an Application Insights component definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentInner updateTags( - String resourceGroupName, String resourceName, TagsResource componentTags); + ApplicationInsightsComponentInner createOrUpdate( + String resourceGroupName, String resourceName, ApplicationInsightsComponentInner insightProperties); /** * Updates an existing component's tags. To update other fields use the CreateOrUpdate method. @@ -190,23 +175,19 @@ Response updateTagsWithResponse( String resourceGroupName, String resourceName, TagsResource componentTags, Context context); /** - * Purges data in an Application Insights component by a set of user-defined filters. - * - *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch - * the execution of purge requests by sending a single command whose predicate includes all user identities that - * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. + * Updates an existing component's tags. To update other fields use the CreateOrUpdate method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param body Describes the body of a request to purge data in a single table of an Application Insights component. + * @param componentTags Updated tag information to set into the component instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response containing operationId for a specific purge action. + * @return an Application Insights component definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComponentPurgeResponseInner purge(String resourceGroupName, String resourceName, ComponentPurgeBody body); + ApplicationInsightsComponentInner updateTags( + String resourceGroupName, String resourceName, TagsResource componentTags); /** * Purges data in an Application Insights component by a set of user-defined filters. @@ -214,7 +195,10 @@ Response updateTagsWithResponse( *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch * the execution of purge requests by sending a single command whose predicate includes all user identities that * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. + * a purge request to verify that the results are expected. Note: this operation is intended for Classic resources, + * for workspace-based Application Insights resource please run purge operation (directly on the + * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific + * resource id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. @@ -230,18 +214,26 @@ Response purgeWithResponse( String resourceGroupName, String resourceName, ComponentPurgeBody body, Context context); /** - * Get status for an ongoing purge operation. + * Purges data in an Application Insights component by a set of user-defined filters. + * + *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch + * the execution of purge requests by sending a single command whose predicate includes all user identities that + * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for + * a purge request to verify that the results are expected. Note: this operation is intended for Classic resources, + * for workspace-based Application Insights resource please run purge operation (directly on the + * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific + * resource id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. + * @param body Describes the body of a request to purge data in a single table of an Application Insights component. * @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 status for an ongoing purge operation. + * @return response containing operationId for a specific purge action. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComponentPurgeStatusResponseInner getPurgeStatus(String resourceGroupName, String resourceName, String purgeId); + ComponentPurgeResponseInner purge(String resourceGroupName, String resourceName, ComponentPurgeBody body); /** * Get status for an ongoing purge operation. @@ -258,4 +250,18 @@ Response purgeWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response getPurgeStatusWithResponse( String resourceGroupName, String resourceName, String purgeId, Context context); + + /** + * Get status for an ongoing purge operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. + * @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 status for an ongoing purge operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ComponentPurgeStatusResponseInner getPurgeStatus(String resourceGroupName, String resourceName, String purgeId); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ExportConfigurationsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ExportConfigurationsClient.java index 3cdd5235d0e1..a46498bd465c 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ExportConfigurationsClient.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ExportConfigurationsClient.java @@ -14,19 +14,6 @@ /** An instance of this class provides access to all the operations defined in ExportConfigurationsClient. */ public interface ExportConfigurationsClient { - /** - * Gets a list of Continuous Export configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Continuous Export configuration of an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - List list(String resourceGroupName, String resourceName); - /** * Gets a list of Continuous Export configuration of an Application Insights component. * @@ -44,20 +31,17 @@ Response> listWithRes String resourceGroupName, String resourceName, Context context); /** - * Create a Continuous Export configuration of an Application Insights component. + * Gets a list of Continuous Export configuration of an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportProperties Properties that need to be specified to create a Continuous Export configuration of a - * Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Continuous Export configurations. + * @return a list of Continuous Export configuration of an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - List create( - String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties); + List list(String resourceGroupName, String resourceName); /** * Create a Continuous Export configuration of an Application Insights component. @@ -80,19 +64,20 @@ Response> createWithR Context context); /** - * Delete a Continuous Export configuration of an Application Insights component. + * Create a Continuous Export configuration of an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. + * @param exportProperties Properties that need to be specified to create a Continuous Export configuration of a + * Application Insights component. * @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 properties that define a Continuous Export configuration. + * @return a list of Continuous Export configurations. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentExportConfigurationInner delete( - String resourceGroupName, String resourceName, String exportId); + List create( + String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties); /** * Delete a Continuous Export configuration of an Application Insights component. @@ -111,7 +96,7 @@ Response deleteWithRespons String resourceGroupName, String resourceName, String exportId, Context context); /** - * Get the Continuous Export configuration for this export id. + * Delete a Continuous Export configuration of an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. @@ -119,10 +104,10 @@ Response deleteWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Continuous Export configuration for this export id. + * @return properties that define a Continuous Export configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentExportConfigurationInner get( + ApplicationInsightsComponentExportConfigurationInner delete( String resourceGroupName, String resourceName, String exportId); /** @@ -142,23 +127,19 @@ Response getWithResponse( String resourceGroupName, String resourceName, String exportId, Context context); /** - * Update the Continuous Export configuration for this export id. + * Get the Continuous Export configuration for this export id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @param exportProperties Properties that need to be specified to update the Continuous Export configuration. * @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 properties that define a Continuous Export configuration. + * @return the Continuous Export configuration for this export id. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentExportConfigurationInner update( - String resourceGroupName, - String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties); + ApplicationInsightsComponentExportConfigurationInner get( + String resourceGroupName, String resourceName, String exportId); /** * Update the Continuous Export configuration for this export id. @@ -180,4 +161,23 @@ Response updateWithRespons String exportId, ApplicationInsightsComponentExportRequest exportProperties, Context context); + + /** + * Update the Continuous Export configuration for this export id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. + * @param exportProperties Properties that need to be specified to update the Continuous Export configuration. + * @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 properties that define a Continuous Export configuration. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ApplicationInsightsComponentExportConfigurationInner update( + String resourceGroupName, + String resourceName, + String exportId, + ApplicationInsightsComponentExportRequest exportProperties); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/FavoritesClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/FavoritesClient.java index 36393aa0e312..53a5ace76bfb 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/FavoritesClient.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/FavoritesClient.java @@ -15,19 +15,6 @@ /** An instance of this class provides access to all the operations defined in FavoritesClient. */ public interface FavoritesClient { - /** - * Gets a list of favorites defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of favorites defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - List list(String resourceGroupName, String resourceName); - /** * Gets a list of favorites defined within an Application Insights component. * @@ -56,18 +43,17 @@ Response> listWithResponse( Context context); /** - * Get a single favorite by its FavoriteId, defined within an Application Insights component. + * Gets a list of favorites defined within an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single favorite by its FavoriteId, defined within an Application Insights component. + * @return a list of favorites defined within an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentFavoriteInner get(String resourceGroupName, String resourceName, String favoriteId); + List list(String resourceGroupName, String resourceName); /** * Get a single favorite by its FavoriteId, defined within an Application Insights component. @@ -87,24 +73,18 @@ Response getWithResponse( String resourceGroupName, String resourceName, String favoriteId, Context context); /** - * Adds a new favorites to an Application Insights component. + * Get a single favorite by its FavoriteId, defined within an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to create a new favorite and add it to an - * Application Insights component. * @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 properties that define a favorite that is associated to an Application Insights component. + * @return a single favorite by its FavoriteId, defined within an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentFavoriteInner add( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties); + ApplicationInsightsComponentFavoriteInner get(String resourceGroupName, String resourceName, String favoriteId); /** * Adds a new favorites to an Application Insights component. @@ -130,19 +110,20 @@ Response addWithResponse( Context context); /** - * Updates a favorite that has already been added to an Application Insights component. + * Adds a new favorites to an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to update the existing favorite. + * @param favoriteProperties Properties that need to be specified to create a new favorite and add it to an + * Application Insights component. * @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 properties that define a favorite that is associated to an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentFavoriteInner update( + ApplicationInsightsComponentFavoriteInner add( String resourceGroupName, String resourceName, String favoriteId, @@ -171,17 +152,23 @@ Response updateWithResponse( Context context); /** - * Remove a favorite that is associated to an Application Insights component. + * Updates a favorite that has already been added to an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component. + * @param favoriteProperties Properties that need to be specified to update the existing favorite. * @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 properties that define a favorite that is associated to an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String favoriteId); + ApplicationInsightsComponentFavoriteInner update( + String resourceGroupName, + String resourceName, + String favoriteId, + ApplicationInsightsComponentFavoriteInner favoriteProperties); /** * Remove a favorite that is associated to an Application Insights component. @@ -198,4 +185,17 @@ Response updateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( String resourceGroupName, String resourceName, String favoriteId, Context context); + + /** + * Remove a favorite that is associated to an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param favoriteId The Id of a specific favorite defined in the Application Insights component. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String favoriteId); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/LiveTokensClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/LiveTokensClient.java index 7659750d5fdb..3fa9baf5c68e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/LiveTokensClient.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/LiveTokensClient.java @@ -16,24 +16,24 @@ public interface LiveTokensClient { * **Gets an access token for live metrics stream data.**. * * @param resourceUri The identifier of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to a live token query. + * @return the response to a live token query along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - LiveTokenResponseInner get(String resourceUri); + Response getWithResponse(String resourceUri, Context context); /** * **Gets an access token for live metrics stream data.**. * * @param resourceUri The identifier of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to a live token query along with {@link Response}. + * @return the response to a live token query. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceUri, Context context); + LiveTokenResponseInner get(String resourceUri); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/MyWorkbooksClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/MyWorkbooksClient.java index ba1ccf6ed7e9..22093576b0b3 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/MyWorkbooksClient.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/MyWorkbooksClient.java @@ -89,20 +89,6 @@ PagedIterable listByResourceGroup( PagedIterable list( CategoryType category, List tags, Boolean canFetchContent, Context context); - /** - * Get a single private workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is - * rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MyWorkbookInner getByResourceGroup(String resourceGroupName, String resourceName); - /** * Get a single private workbook by its resourceName. * @@ -120,7 +106,7 @@ Response getByResourceGroupWithResponse( String resourceGroupName, String resourceName, Context context); /** - * Delete a private workbook. + * Get a single private workbook by its resourceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. @@ -128,9 +114,10 @@ Response getByResourceGroupWithResponse( * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is * rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single private workbook by its resourceName. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName); + MyWorkbookInner getByResourceGroup(String resourceGroupName, String resourceName); /** * Delete a private workbook. @@ -148,19 +135,17 @@ Response getByResourceGroupWithResponse( Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); /** - * Create a new private workbook. + * Delete a private workbook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is * rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - MyWorkbookInner createOrUpdate(String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties); + void delete(String resourceGroupName, String resourceName); /** * Create a new private workbook. @@ -185,7 +170,7 @@ Response createOrUpdateWithResponse( Context context); /** - * Updates a private workbook that has already been added. + * Create a new private workbook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. @@ -197,7 +182,7 @@ Response createOrUpdateWithResponse( * @return an Application Insights private workbook definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - MyWorkbookInner update(String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties); + MyWorkbookInner createOrUpdate(String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties); /** * Updates a private workbook that has already been added. @@ -220,4 +205,19 @@ Response updateWithResponse( MyWorkbookInner workbookProperties, String sourceId, Context context); + + /** + * Updates a private workbook that has already been added. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workbookProperties Properties that need to be specified to create a new private workbook. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is + * rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights private workbook definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MyWorkbookInner update(String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/OperationsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/OperationsClient.java index 179d564a1690..eef1549f5516 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/OperationsClient.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/OperationsClient.java @@ -17,7 +17,8 @@ public interface OperationsClient { * * @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 the request to list CDN operations as paginated response with {@link PagedIterable}. + * @return result of the request to list Azure Workbooks operations as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -29,7 +30,8 @@ public interface OperationsClient { * @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 the request to list CDN operations as paginated response with {@link PagedIterable}. + * @return result of the request to list Azure Workbooks operations as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ProactiveDetectionConfigurationsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ProactiveDetectionConfigurationsClient.java index a8e05b856372..95d35c1b8ce1 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ProactiveDetectionConfigurationsClient.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/ProactiveDetectionConfigurationsClient.java @@ -20,30 +20,30 @@ public interface ProactiveDetectionConfigurationsClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of ProactiveDetection configurations of an Application Insights component. + * @return a list of ProactiveDetection configurations of an Application Insights component along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - List list( - String resourceGroupName, String resourceName); + Response> listWithResponse( + String resourceGroupName, String resourceName, Context context); /** * Gets a list of ProactiveDetection configurations of an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of ProactiveDetection configurations of an Application Insights component along with {@link - * Response}. + * @return a list of ProactiveDetection configurations of an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response> listWithResponse( - String resourceGroupName, String resourceName, Context context); + List list( + String resourceGroupName, String resourceName); /** * Get the ProactiveDetection configuration for this configuration id. @@ -52,14 +52,15 @@ Response> * @param resourceName The name of the Application Insights component resource. * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights * component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the ProactiveDetection configuration for this configuration id. + * @return the ProactiveDetection configuration for this configuration id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentProactiveDetectionConfigurationInner get( - String resourceGroupName, String resourceName, String configurationId); + Response getWithResponse( + String resourceGroupName, String resourceName, String configurationId, Context context); /** * Get the ProactiveDetection configuration for this configuration id. @@ -68,15 +69,14 @@ ApplicationInsightsComponentProactiveDetectionConfigurationInner get( * @param resourceName The name of the Application Insights component resource. * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights * component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the ProactiveDetection configuration for this configuration id along with {@link Response}. + * @return the ProactiveDetection configuration for this configuration id. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, String configurationId, Context context); + ApplicationInsightsComponentProactiveDetectionConfigurationInner get( + String resourceGroupName, String resourceName, String configurationId); /** * Update the ProactiveDetection configuration for this configuration id. @@ -87,17 +87,19 @@ Response getWi * component. * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection * configuration. + * @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 properties that define a ProactiveDetection configuration. + * @return properties that define a ProactiveDetection configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInsightsComponentProactiveDetectionConfigurationInner update( + Response updateWithResponse( String resourceGroupName, String resourceName, String configurationId, - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties); + ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, + Context context); /** * Update the ProactiveDetection configuration for this configuration id. @@ -108,17 +110,15 @@ ApplicationInsightsComponentProactiveDetectionConfigurationInner update( * component. * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection * configuration. - * @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 properties that define a ProactiveDetection configuration along with {@link Response}. + * @return properties that define a ProactiveDetection configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( + ApplicationInsightsComponentProactiveDetectionConfigurationInner update( String resourceGroupName, String resourceName, String configurationId, - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, - Context context); + ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WebTestsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WebTestsClient.java index 389b5ec88568..b6b6194917a7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WebTestsClient.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WebTestsClient.java @@ -15,27 +15,27 @@ /** An instance of this class provides access to all the operations defined in WebTestsClient. */ public interface WebTestsClient { /** - * Get all Application Insights web tests defined within a specified resource group. + * Get all Application Insights web tests defined for 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined within a specified resource group as paginated response with + * @return all Application Insights web tests defined for the specified resource group as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** - * Get all Application Insights web tests defined within a specified resource group. + * Get all Application Insights web tests defined for 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. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined within a specified resource group as paginated response with + * @return all Application Insights web tests defined for the specified resource group as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -45,20 +45,7 @@ public interface WebTestsClient { * Get a specific Application Insights web test definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Application Insights web test definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WebTestInner getByResourceGroup(String resourceGroupName, String webTestName); - - /** - * Get a specific Application Insights web test definition. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest 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. @@ -70,32 +57,30 @@ Response getByResourceGroupWithResponse( String resourceGroupName, String webTestName, Context context); /** - * Creates or updates an Application Insights web test definition. + * Get a specific Application Insights web test definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestDefinition Properties that need to be specified to create or update an Application Insights web - * test definition. + * @param webTestName The name of the Application Insights WebTest resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights web test definition. + * @return a specific Application Insights web test definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - WebTestInner createOrUpdate(String resourceGroupName, String webTestName, WebTestInner webTestDefinition); + WebTestInner getByResourceGroup(String resourceGroupName, String webTestName); /** * Creates or updates an Application Insights web test definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. * @param webTestDefinition Properties that need to be specified to create or update an Application Insights web * test definition. * @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 an Application Insights web test definition along with {@link Response}. + * @return an Application Insights WebTest definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -105,49 +90,52 @@ Response createOrUpdateWithResponse( * Creates or updates an Application Insights web test definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestTags Updated tag information to set into the web test instance. + * @param webTestName The name of the Application Insights WebTest resource. + * @param webTestDefinition Properties that need to be specified to create or update an Application Insights web + * test definition. * @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 an Application Insights web test definition. + * @return an Application Insights WebTest definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - WebTestInner updateTags(String resourceGroupName, String webTestName, TagsResource webTestTags); + WebTestInner createOrUpdate(String resourceGroupName, String webTestName, WebTestInner webTestDefinition); /** - * Creates or updates an Application Insights web test definition. + * Updates the tags associated with an Application Insights web test. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestTags Updated tag information to set into the web test instance. + * @param webTestName The name of the Application Insights WebTest resource. + * @param webTestTags Updated tag information to associate with the web test resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights web test definition along with {@link Response}. + * @return an Application Insights WebTest definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateTagsWithResponse( String resourceGroupName, String webTestName, TagsResource webTestTags, Context context); /** - * Deletes an Application Insights web test. + * Updates the tags associated with an Application Insights web test. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. + * @param webTestTags Updated tag information to associate with the web test resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights WebTest definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String webTestName); + WebTestInner updateTags(String resourceGroupName, String webTestName, TagsResource webTestTags); /** * Deletes an Application Insights web test. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest 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. @@ -158,24 +146,36 @@ Response updateTagsWithResponse( Response deleteWithResponse(String resourceGroupName, String webTestName, Context context); /** - * Get all Application Insights web test alerts definitions within a subscription. + * Deletes an Application Insights web test. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param webTestName The name of the Application Insights WebTest resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String webTestName); + + /** + * Get all Application Insights web test definitions for 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 all Application Insights web test alerts definitions within a subscription as paginated response with + * @return all Application Insights web test definitions for the specified subscription as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** - * Get all Application Insights web test alerts definitions within a subscription. + * Get all Application Insights web test definitions for 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web test alerts definitions within a subscription as paginated response with + * @return all Application Insights web test definitions for the specified subscription as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkItemConfigurationsClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkItemConfigurationsClient.java index 41b5c4b356f2..005d889dd40f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkItemConfigurationsClient.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkItemConfigurationsClient.java @@ -45,22 +45,6 @@ public interface WorkItemConfigurationsClient { @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String resourceName, Context context); - /** - * Create a work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration - * of a Application Insights component. - * @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 work item configuration associated with an application insights resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkItemConfigurationInner create( - String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties); - /** * Create a work item configuration for an Application Insights component. * @@ -82,17 +66,20 @@ Response createWithResponse( Context context); /** - * Gets default work item configurations that exist for the application. + * Create a work item configuration for an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration + * of a Application Insights component. * @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 default work item configurations that exist for the application. + * @return work item configuration associated with an application insights resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkItemConfigurationInner getDefault(String resourceGroupName, String resourceName); + WorkItemConfigurationInner create( + String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties); /** * Gets default work item configurations that exist for the application. @@ -110,18 +97,17 @@ Response getDefaultWithResponse( String resourceGroupName, String resourceName, Context context); /** - * Delete a work item configuration of an Application Insights component. + * Gets default work item configurations that exist for the application. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. * @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 default work item configurations that exist for the application. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String workItemConfigId); + WorkItemConfigurationInner getDefault(String resourceGroupName, String resourceName); /** * Delete a work item configuration of an Application Insights component. @@ -141,7 +127,7 @@ Response deleteWithResponse( String resourceGroupName, String resourceName, String workItemConfigId, Context context); /** - * Gets specified work item configuration for an Application Insights component. + * Delete a work item configuration of an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. @@ -150,10 +136,9 @@ Response deleteWithResponse( * @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 specified work item configuration for an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkItemConfigurationInner getItem(String resourceGroupName, String resourceName, String workItemConfigId); + void delete(String resourceGroupName, String resourceName, String workItemConfigId); /** * Gets specified work item configuration for an Application Insights component. @@ -172,6 +157,21 @@ Response deleteWithResponse( Response getItemWithResponse( String resourceGroupName, String resourceName, String workItemConfigId, Context context); + /** + * Gets specified work item configuration for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as + * defined in connector configuration. + * @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 specified work item configuration for an Application Insights component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkItemConfigurationInner getItem(String resourceGroupName, String resourceName, String workItemConfigId); + /** * Update a work item configuration for an Application Insights component. * @@ -181,17 +181,19 @@ Response getItemWithResponse( * defined in connector configuration. * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration * for this Application Insights component. + * @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 work item configuration associated with an application insights resource. + * @return work item configuration associated with an application insights resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkItemConfigurationInner updateItem( + Response updateItemWithResponse( String resourceGroupName, String resourceName, String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties); + WorkItemCreateConfiguration workItemConfigurationProperties, + Context context); /** * Update a work item configuration for an Application Insights component. @@ -202,17 +204,15 @@ WorkItemConfigurationInner updateItem( * defined in connector configuration. * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration * for this Application Insights component. - * @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 work item configuration associated with an application insights resource along with {@link Response}. + * @return work item configuration associated with an application insights resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateItemWithResponse( + WorkItemConfigurationInner updateItem( String resourceGroupName, String resourceName, String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties, - Context context); + WorkItemCreateConfiguration workItemConfigurationProperties); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbookTemplatesClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbookTemplatesClient.java index 890e1ae89395..7cb3f51ddc46 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbookTemplatesClient.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbookTemplatesClient.java @@ -41,19 +41,6 @@ public interface WorkbookTemplatesClient { @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); - /** - * Get a single workbook template by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook template by its resourceName. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkbookTemplateInner getByResourceGroup(String resourceGroupName, String resourceName); - /** * Get a single workbook template by its resourceName. * @@ -70,16 +57,17 @@ Response getByResourceGroupWithResponse( String resourceGroupName, String resourceName, Context context); /** - * Delete a workbook template. + * Get a single workbook template by its resourceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single workbook template by its resourceName. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName); + WorkbookTemplateInner getByResourceGroup(String resourceGroupName, String resourceName); /** * Delete a workbook template. @@ -96,19 +84,16 @@ Response getByResourceGroupWithResponse( Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); /** - * Create a new workbook template. + * Delete a workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param workbookTemplateProperties Properties that need to be specified to create a new workbook. * @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 an Application Insights workbook template definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkbookTemplateInner createOrUpdate( - String resourceGroupName, String resourceName, WorkbookTemplateInner workbookTemplateProperties); + void delete(String resourceGroupName, String resourceName); /** * Create a new workbook template. @@ -130,17 +115,19 @@ Response createOrUpdateWithResponse( Context context); /** - * Updates a workbook template that has already been added. + * Create a new workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param workbookTemplateProperties Properties that need to be specified to create a new workbook. * @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 an Application Insights workbook template definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkbookTemplateInner update(String resourceGroupName, String resourceName); + WorkbookTemplateInner createOrUpdate( + String resourceGroupName, String resourceName, WorkbookTemplateInner workbookTemplateProperties); /** * Updates a workbook template that has already been added. @@ -160,4 +147,17 @@ Response updateWithResponse( String resourceName, WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters, Context context); + + /** + * Updates a workbook template that has already been added. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Application Insights workbook template definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkbookTemplateInner update(String resourceGroupName, String resourceName); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbooksClient.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbooksClient.java index c419ad3f6f36..083782eb5faf 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbooksClient.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/WorkbooksClient.java @@ -90,20 +90,6 @@ PagedIterable listByResourceGroup( Boolean canFetchContent, Context context); - /** - * Get a single workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the - * request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook by its resourceName. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkbookInner getByResourceGroup(String resourceGroupName, String resourceName); - /** * Get a single workbook by its resourceName. * @@ -123,7 +109,7 @@ Response getByResourceGroupWithResponse( String resourceGroupName, String resourceName, Boolean canFetchContent, Context context); /** - * Delete a workbook. + * Get a single workbook by its resourceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. @@ -131,9 +117,10 @@ Response getByResourceGroupWithResponse( * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single workbook by its resourceName. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName); + WorkbookInner getByResourceGroup(String resourceGroupName, String resourceName); /** * Delete a workbook. @@ -151,19 +138,17 @@ Response getByResourceGroupWithResponse( Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); /** - * Create a new workbook. + * Delete a workbook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. - * @param workbookProperties Properties that need to be specified to create a new workbook. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workbook definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkbookInner createOrUpdate(String resourceGroupName, String resourceName, WorkbookInner workbookProperties); + void delete(String resourceGroupName, String resourceName); /** * Create a new workbook. @@ -188,10 +173,11 @@ Response createOrUpdateWithResponse( Context context); /** - * Updates a workbook that has already been added. + * Create a new workbook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. + * @param workbookProperties Properties that need to be specified to create a new workbook. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the * request is rejected by server. @@ -199,7 +185,7 @@ Response createOrUpdateWithResponse( * @return a workbook definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkbookInner update(String resourceGroupName, String resourceName); + WorkbookInner createOrUpdate(String resourceGroupName, String resourceName, WorkbookInner workbookProperties); /** * Updates a workbook that has already been added. @@ -223,6 +209,20 @@ Response updateWithResponse( WorkbookUpdateParameters workbookUpdateParameters, Context context); + /** + * Updates a workbook that has already been added. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a workbook definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkbookInner update(String resourceGroupName, String resourceName); + /** * Get the revisions for the workbook defined by its resourceName. * @@ -260,14 +260,16 @@ Response updateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param revisionId The id of the workbook's revision. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook revision defined by its revisionId. + * @return a single workbook revision defined by its revisionId along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkbookInner revisionGet(String resourceGroupName, String resourceName, String revisionId); + Response revisionGetWithResponse( + String resourceGroupName, String resourceName, String revisionId, Context context); /** * Get a single workbook revision defined by its revisionId. @@ -275,14 +277,12 @@ Response updateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param revisionId The id of the workbook's revision. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook revision defined by its revisionId along with {@link Response}. + * @return a single workbook revision defined by its revisionId. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response revisionGetWithResponse( - String resourceGroupName, String resourceName, String revisionId, Context context); + WorkbookInner revisionGet(String resourceGroupName, String resourceName, String revisionId); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/AnnotationInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/AnnotationInner.java index 15f70037ac3c..1e5c69bab098 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/AnnotationInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/AnnotationInner.java @@ -47,6 +47,10 @@ public final class AnnotationInner { @JsonProperty(value = "RelatedAnnotation") private String relatedAnnotation; + /** Creates an instance of AnnotationInner class. */ + public AnnotationInner() { + } + /** * Get the annotationName property: Name of annotation. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAnalyticsItemInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAnalyticsItemInner.java index e9200b8bbb5e..5d0c3c653841 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAnalyticsItemInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAnalyticsItemInner.java @@ -32,16 +32,14 @@ public final class ApplicationInsightsComponentAnalyticsItemInner { private String content; /* - * This instance's version of the data model. This can change as new - * features are added. + * This instance's version of the data model. This can change as new features are added. */ @JsonProperty(value = "Version", access = JsonProperty.Access.WRITE_ONLY) private String version; /* - * Enum indicating if this item definition is owned by a specific user or - * is shared between all users with access to the Application Insights - * component. + * Enum indicating if this item definition is owned by a specific user or is shared between all users with access + * to the Application Insights component. */ @JsonProperty(value = "Scope") private ItemScope scope; @@ -59,19 +57,22 @@ public final class ApplicationInsightsComponentAnalyticsItemInner { private String timeCreated; /* - * Date and time in UTC of the last modification that was made to this - * item. + * Date and time in UTC of the last modification that was made to this item. */ @JsonProperty(value = "TimeModified", access = JsonProperty.Access.WRITE_ONLY) private String timeModified; /* - * A set of properties that can be defined in the context of a specific - * item type. Each type may have its own properties. + * A set of properties that can be defined in the context of a specific item type. Each type may have its own + * properties. */ @JsonProperty(value = "Properties") private ApplicationInsightsComponentAnalyticsItemProperties properties; + /** Creates an instance of ApplicationInsightsComponentAnalyticsItemInner class. */ + public ApplicationInsightsComponentAnalyticsItemInner() { + } + /** * Get the id property: Internally assigned unique id of the item definition. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentApiKeyInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentApiKeyInner.java index cc0406b16b24..4ca82677a176 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentApiKeyInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentApiKeyInner.java @@ -12,15 +12,14 @@ @Fluent public final class ApplicationInsightsComponentApiKeyInner { /* - * The unique ID of the API key inside an Application Insights component. - * It is auto generated when the API key is created. + * The unique ID of the API key inside an Application Insights component. It is auto generated when the API key is + * created. */ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; /* - * The API key value. It will be only return once when the API Key was - * created. + * The API key value. It will be only return once when the API Key was created. */ @JsonProperty(value = "apiKey", access = JsonProperty.Access.WRITE_ONLY) private String apiKey; @@ -49,6 +48,10 @@ public final class ApplicationInsightsComponentApiKeyInner { @JsonProperty(value = "linkedWriteProperties") private List linkedWriteProperties; + /** Creates an instance of ApplicationInsightsComponentApiKeyInner class. */ + public ApplicationInsightsComponentApiKeyInner() { + } + /** * Get the id property: The unique ID of the API key inside an Application Insights component. It is auto generated * when the API key is created. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAvailableFeaturesInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAvailableFeaturesInner.java index edead3d53003..b65a146d0cd4 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAvailableFeaturesInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentAvailableFeaturesInner.java @@ -18,6 +18,10 @@ public final class ApplicationInsightsComponentAvailableFeaturesInner { @JsonProperty(value = "Result", access = JsonProperty.Access.WRITE_ONLY) private List result; + /** Creates an instance of ApplicationInsightsComponentAvailableFeaturesInner class. */ + public ApplicationInsightsComponentAvailableFeaturesInner() { + } + /** * Get the result property: A list of Application Insights component feature. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentBillingFeaturesInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentBillingFeaturesInner.java index 5e1f727b1480..095c628f1080 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentBillingFeaturesInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentBillingFeaturesInner.java @@ -19,12 +19,16 @@ public final class ApplicationInsightsComponentBillingFeaturesInner { private ApplicationInsightsComponentDataVolumeCap dataVolumeCap; /* - * Current enabled pricing plan. When the component is in the Enterprise - * plan, this will list both 'Basic' and 'Application Insights Enterprise'. + * Current enabled pricing plan. When the component is in the Enterprise plan, this will list both 'Basic' and + * 'Application Insights Enterprise'. */ @JsonProperty(value = "CurrentBillingFeatures") private List currentBillingFeatures; + /** Creates an instance of ApplicationInsightsComponentBillingFeaturesInner class. */ + public ApplicationInsightsComponentBillingFeaturesInner() { + } + /** * Get the dataVolumeCap property: An Application Insights component daily data volume cap. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentExportConfigurationInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentExportConfigurationInner.java index 6892d0e698ce..2b6f2fe2eaae 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentExportConfigurationInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentExportConfigurationInner.java @@ -11,9 +11,8 @@ @Fluent public final class ApplicationInsightsComponentExportConfigurationInner { /* - * The unique ID of the export configuration inside an Application Insights - * component. It is auto generated when the Continuous Export configuration - * is created. + * The unique ID of the export configuration inside an Application Insights component. It is auto generated when + * the Continuous Export configuration is created. */ @JsonProperty(value = "ExportId", access = JsonProperty.Access.WRITE_ONLY) private String exportId; @@ -25,9 +24,8 @@ public final class ApplicationInsightsComponentExportConfigurationInner { private String instrumentationKey; /* - * This comma separated list of document types that will be exported. The - * possible values include 'Requests', 'Event', 'Exceptions', 'Metrics', - * 'PageViews', 'PageViewPerformance', 'Rdd', 'PerformanceCounters', + * This comma separated list of document types that will be exported. The possible values include 'Requests', + * 'Event', 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', 'PerformanceCounters', * 'Availability', 'Messages'. */ @JsonProperty(value = "RecordTypes") @@ -76,8 +74,7 @@ public final class ApplicationInsightsComponentExportConfigurationInner { private String destinationType; /* - * This will be 'true' if the Continuous Export configuration is enabled, - * otherwise it will be 'false'. + * This will be 'true' if the Continuous Export configuration is enabled, otherwise it will be 'false'. */ @JsonProperty(value = "IsUserEnabled", access = JsonProperty.Access.WRITE_ONLY) private String isUserEnabled; @@ -95,15 +92,15 @@ public final class ApplicationInsightsComponentExportConfigurationInner { private String notificationQueueEnabled; /* - * This indicates current Continuous Export configuration status. The - * possible values are 'Preparing', 'Success', 'Failure'. + * This indicates current Continuous Export configuration status. The possible values are 'Preparing', 'Success', + * 'Failure'. */ @JsonProperty(value = "ExportStatus", access = JsonProperty.Access.WRITE_ONLY) private String exportStatus; /* - * The last time data was successfully delivered to the destination storage - * container for this Continuous Export configuration. + * The last time data was successfully delivered to the destination storage container for this Continuous Export + * configuration. */ @JsonProperty(value = "LastSuccessTime", access = JsonProperty.Access.WRITE_ONLY) private String lastSuccessTime; @@ -115,8 +112,8 @@ public final class ApplicationInsightsComponentExportConfigurationInner { private String lastGapTime; /* - * This is the reason the Continuous Export configuration started failing. - * It can be 'AzureStorageNotFound' or 'AzureStorageAccessDenied'. + * This is the reason the Continuous Export configuration started failing. It can be 'AzureStorageNotFound' or + * 'AzureStorageAccessDenied'. */ @JsonProperty(value = "PermanentErrorReason", access = JsonProperty.Access.WRITE_ONLY) private String permanentErrorReason; @@ -133,6 +130,10 @@ public final class ApplicationInsightsComponentExportConfigurationInner { @JsonProperty(value = "ContainerName", access = JsonProperty.Access.WRITE_ONLY) private String containerName; + /** Creates an instance of ApplicationInsightsComponentExportConfigurationInner class. */ + public ApplicationInsightsComponentExportConfigurationInner() { + } + /** * Get the exportId property: The unique ID of the export configuration inside an Application Insights component. It * is auto generated when the Continuous Export configuration is created. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFavoriteInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFavoriteInner.java index a35bac698a26..9b1f710e7a0f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFavoriteInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFavoriteInner.java @@ -19,16 +19,15 @@ public final class ApplicationInsightsComponentFavoriteInner { private String name; /* - * Configuration of this particular favorite, which are driven by the Azure - * portal UX. Configuration data is a string containing valid JSON + * Configuration of this particular favorite, which are driven by the Azure portal UX. Configuration data is a + * string containing valid JSON */ @JsonProperty(value = "Config") private String config; /* - * This instance's version of the data model. This can change as new - * features are added that can be marked favorite. Current examples include - * MetricsExplorer (ME) and Search. + * This instance's version of the data model. This can change as new features are added that can be marked + * favorite. Current examples include MetricsExplorer (ME) and Search. */ @JsonProperty(value = "Version") private String version; @@ -40,9 +39,8 @@ public final class ApplicationInsightsComponentFavoriteInner { private String favoriteId; /* - * Enum indicating if this favorite definition is owned by a specific user - * or is shared between all users with access to the Application Insights - * component. + * Enum indicating if this favorite definition is owned by a specific user or is shared between all users with + * access to the Application Insights component. */ @JsonProperty(value = "FavoriteType") private FavoriteType favoriteType; @@ -54,15 +52,13 @@ public final class ApplicationInsightsComponentFavoriteInner { private String sourceType; /* - * Date and time in UTC of the last modification that was made to this - * favorite definition. + * Date and time in UTC of the last modification that was made to this favorite definition. */ @JsonProperty(value = "TimeModified", access = JsonProperty.Access.WRITE_ONLY) private String timeModified; /* - * A list of 0 or more tags that are associated with this favorite - * definition + * A list of 0 or more tags that are associated with this favorite definition */ @JsonProperty(value = "Tags") private List tags; @@ -85,6 +81,10 @@ public final class ApplicationInsightsComponentFavoriteInner { @JsonProperty(value = "UserId", access = JsonProperty.Access.WRITE_ONLY) private String userId; + /** Creates an instance of ApplicationInsightsComponentFavoriteInner class. */ + public ApplicationInsightsComponentFavoriteInner() { + } + /** * Get the name property: The user-defined name of the favorite. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFeatureCapabilitiesInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFeatureCapabilitiesInner.java index e3a2e056b297..cfb116faf312 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFeatureCapabilitiesInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentFeatureCapabilitiesInner.java @@ -106,6 +106,10 @@ public final class ApplicationInsightsComponentFeatureCapabilitiesInner { @JsonProperty(value = "ThrottleRate", access = JsonProperty.Access.WRITE_ONLY) private Float throttleRate; + /** Creates an instance of ApplicationInsightsComponentFeatureCapabilitiesInner class. */ + public ApplicationInsightsComponentFeatureCapabilitiesInner() { + } + /** * Get the supportExportData property: Whether allow to use continuous export feature. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentInner.java index 18f11a922b88..ea5812477ea3 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentInner.java @@ -22,9 +22,8 @@ @Fluent public final class ApplicationInsightsComponentInner extends ComponentsResource { /* - * The kind of application that this component refers to, used to customize - * UI. This value is a freeform string, values should typically be one of - * the following: web, ios, other, store, java, phone. + * The kind of application that this component refers to, used to customize UI. This value is a freeform string, + * values should typically be one of the following: web, ios, other, store, java, phone. */ @JsonProperty(value = "kind", required = true) private String kind; @@ -41,6 +40,10 @@ public final class ApplicationInsightsComponentInner extends ComponentsResource @JsonProperty(value = "properties") private ApplicationInsightsComponentProperties innerProperties; + /** Creates an instance of ApplicationInsightsComponentInner class. */ + public ApplicationInsightsComponentInner() { + } + /** * Get the kind property: The kind of application that this component refers to, used to customize UI. This value is * a freeform string, values should typically be one of the following: web, ios, other, store, java, phone. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProactiveDetectionConfigurationInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProactiveDetectionConfigurationInner.java index 40681ab28186..5d85a2959967 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProactiveDetectionConfigurationInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProactiveDetectionConfigurationInner.java @@ -25,8 +25,7 @@ public final class ApplicationInsightsComponentProactiveDetectionConfigurationIn private Boolean enabled; /* - * A flag that indicated whether notifications on this rule should be sent - * to subscription owners + * A flag that indicated whether notifications on this rule should be sent to subscription owners */ @JsonProperty(value = "SendEmailsToSubscriptionOwners") private Boolean sendEmailsToSubscriptionOwners; @@ -44,12 +43,15 @@ public final class ApplicationInsightsComponentProactiveDetectionConfigurationIn private String lastUpdatedTime; /* - * Static definitions of the ProactiveDetection configuration rule (same - * values for all components). + * Static definitions of the ProactiveDetection configuration rule (same values for all components). */ @JsonProperty(value = "RuleDefinitions") private ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions ruleDefinitions; + /** Creates an instance of ApplicationInsightsComponentProactiveDetectionConfigurationInner class. */ + public ApplicationInsightsComponentProactiveDetectionConfigurationInner() { + } + /** * Get the name property: The rule name. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProperties.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProperties.java index 4dfe395d589a..556d4e0ca95f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProperties.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentProperties.java @@ -20,8 +20,7 @@ @Fluent public final class ApplicationInsightsComponentProperties { /* - * The unique ID of your application. This field mirrors the 'Name' field - * and cannot be changed. + * The unique ID of your application. This field mirrors the 'Name' field and cannot be changed. */ @JsonProperty(value = "ApplicationId", access = JsonProperty.Access.WRITE_ONLY) private String applicationId; @@ -45,32 +44,29 @@ public final class ApplicationInsightsComponentProperties { private ApplicationType applicationType; /* - * Used by the Application Insights system to determine what kind of flow - * this component was created by. This is to be set to 'Bluefield' when - * creating/updating a component via the REST API. + * Used by the Application Insights system to determine what kind of flow this component was created by. This is to + * be set to 'Bluefield' when creating/updating a component via the REST API. */ @JsonProperty(value = "Flow_Type") private FlowType flowType; /* - * Describes what tool created this Application Insights component. - * Customers using this API should set this to the default 'rest'. + * Describes what tool created this Application Insights component. Customers using this API should set this to the + * default 'rest'. */ @JsonProperty(value = "Request_Source") private RequestSource requestSource; /* - * Application Insights Instrumentation key. A read-only value that - * applications can use to identify the destination for all telemetry sent - * to Azure Application Insights. This value will be supplied upon - * construction of each new Application Insights component. + * Application Insights Instrumentation key. A read-only value that applications can use to identify the + * destination for all telemetry sent to Azure Application Insights. This value will be supplied upon construction + * of each new Application Insights component. */ @JsonProperty(value = "InstrumentationKey", access = JsonProperty.Access.WRITE_ONLY) private String instrumentationKey; /* - * Creation Date for the Application Insights component, in ISO 8601 - * format. + * Creation Date for the Application Insights component, in ISO 8601 format. */ @JsonProperty(value = "CreationDate", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime creationDate; @@ -82,31 +78,29 @@ public final class ApplicationInsightsComponentProperties { private String tenantId; /* - * The unique application ID created when a new application is added to - * HockeyApp, used for communications with HockeyApp. + * The unique application ID created when a new application is added to HockeyApp, used for communications with + * HockeyApp. */ @JsonProperty(value = "HockeyAppId") private String hockeyAppId; /* - * Token used to authenticate communications with between Application - * Insights and HockeyApp. + * Token used to authenticate communications with between Application Insights and HockeyApp. */ @JsonProperty(value = "HockeyAppToken", access = JsonProperty.Access.WRITE_ONLY) private String hockeyAppToken; /* - * Current state of this component: whether or not is has been provisioned - * within the resource group it is defined. Users cannot change this value - * but are able to read from it. Values will include Succeeded, Deploying, - * Canceled, and Failed. + * Current state of this component: whether or not is has been provisioned within the resource group it is defined. + * Users cannot change this value but are able to read from it. Values will include Succeeded, Deploying, Canceled, + * and Failed. */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; /* - * Percentage of the data produced by the application being monitored that - * is being sampled for Application Insights telemetry. + * Percentage of the data produced by the application being monitored that is being sampled for Application + * Insights telemetry. */ @JsonProperty(value = "SamplingPercentage") private Double samplingPercentage; @@ -136,10 +130,8 @@ public final class ApplicationInsightsComponentProperties { private Boolean immediatePurgeDataOn30Days; /* - * Resource Id of the log analytics workspace which the data will be - * ingested to. This property is required to create an application with - * this API version. Applications from older versions will not have this - * property. + * Resource Id of the log analytics workspace which the data will be ingested to. This property is required to + * create an application with this API version. Applications from older versions will not have this property. */ @JsonProperty(value = "WorkspaceResourceId") private String workspaceResourceId; @@ -181,12 +173,15 @@ public final class ApplicationInsightsComponentProperties { private Boolean disableLocalAuth; /* - * Force users to create their own storage account for profiler and - * debugger. + * Force users to create their own storage account for profiler and debugger. */ @JsonProperty(value = "ForceCustomerStorageForProfiler") private Boolean forceCustomerStorageForProfiler; + /** Creates an instance of ApplicationInsightsComponentProperties class. */ + public ApplicationInsightsComponentProperties() { + } + /** * Get the applicationId property: The unique ID of your application. This field mirrors the 'Name' field and cannot * be changed. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentQuotaStatusInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentQuotaStatusInner.java index ffcbd1bfb622..82749296f272 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentQuotaStatusInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentQuotaStatusInner.java @@ -23,12 +23,15 @@ public final class ApplicationInsightsComponentQuotaStatusInner { private Boolean shouldBeThrottled; /* - * Date and time when the daily data volume cap will be reset, and data - * ingestion will resume. + * Date and time when the daily data volume cap will be reset, and data ingestion will resume. */ @JsonProperty(value = "ExpirationTime", access = JsonProperty.Access.WRITE_ONLY) private String expirationTime; + /** Creates an instance of ApplicationInsightsComponentQuotaStatusInner class. */ + public ApplicationInsightsComponentQuotaStatusInner() { + } + /** * Get the appId property: The Application ID for the Application Insights component. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentWebTestLocationInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentWebTestLocationInner.java index 08b76a00801f..dd2c01d59760 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentWebTestLocationInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ApplicationInsightsComponentWebTestLocationInner.java @@ -22,6 +22,10 @@ public final class ApplicationInsightsComponentWebTestLocationInner { @JsonProperty(value = "Tag", access = JsonProperty.Access.WRITE_ONLY) private String tag; + /** Creates an instance of ApplicationInsightsComponentWebTestLocationInner class. */ + public ApplicationInsightsComponentWebTestLocationInner() { + } + /** * Get the displayName property: The display name of the web test location. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentLinkedStorageAccountsInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentLinkedStorageAccountsInner.java index 5e72ba5dc848..63ae5f9f1e9a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentLinkedStorageAccountsInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentLinkedStorageAccountsInner.java @@ -17,6 +17,10 @@ public final class ComponentLinkedStorageAccountsInner extends ProxyResource { @JsonProperty(value = "properties") private LinkedStorageAccountsProperties innerProperties; + /** Creates an instance of ComponentLinkedStorageAccountsInner class. */ + public ComponentLinkedStorageAccountsInner() { + } + /** * Get the innerProperties property: The properties of the linked storage accounts. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeResponseInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeResponseInner.java index 8a5269ced552..17740139d0fb 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeResponseInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeResponseInner.java @@ -17,6 +17,10 @@ public final class ComponentPurgeResponseInner { @JsonProperty(value = "operationId", required = true) private String operationId; + /** Creates an instance of ComponentPurgeResponseInner class. */ + public ComponentPurgeResponseInner() { + } + /** * Get the operationId property: Id to use when querying for status for a particular purge operation. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeStatusResponseInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeStatusResponseInner.java index 2d665c7db72a..3add07f21c1e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeStatusResponseInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/ComponentPurgeStatusResponseInner.java @@ -18,6 +18,10 @@ public final class ComponentPurgeStatusResponseInner { @JsonProperty(value = "status", required = true) private PurgeState status; + /** Creates an instance of ComponentPurgeStatusResponseInner class. */ + public ComponentPurgeStatusResponseInner() { + } + /** * Get the status property: Status of the operation represented by the requested Id. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LinkedStorageAccountsProperties.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LinkedStorageAccountsProperties.java index b1778adacf71..e54a3bf4850d 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LinkedStorageAccountsProperties.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LinkedStorageAccountsProperties.java @@ -16,6 +16,10 @@ public final class LinkedStorageAccountsProperties { @JsonProperty(value = "linkedStorageAccount") private String linkedStorageAccount; + /** Creates an instance of LinkedStorageAccountsProperties class. */ + public LinkedStorageAccountsProperties() { + } + /** * Get the linkedStorageAccount property: Linked storage account resource ID. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LiveTokenResponseInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LiveTokenResponseInner.java index 5f7177892188..e6c8a9c28385 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LiveTokenResponseInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/LiveTokenResponseInner.java @@ -16,6 +16,10 @@ public final class LiveTokenResponseInner { @JsonProperty(value = "liveToken", access = JsonProperty.Access.WRITE_ONLY) private String liveToken; + /** Creates an instance of LiveTokenResponseInner class. */ + public LiveTokenResponseInner() { + } + /** * Get the liveToken property: JWT token for accessing live metrics stream data. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/MyWorkbookInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/MyWorkbookInner.java index 0185689e01ad..55ff07eea9cc 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/MyWorkbookInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/MyWorkbookInner.java @@ -34,6 +34,10 @@ public final class MyWorkbookInner extends MyWorkbookResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of MyWorkbookInner class. */ + public MyWorkbookInner() { + } + /** * Get the kind property: The kind of workbook. Choices are user and shared. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/MyWorkbookProperties.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/MyWorkbookProperties.java index bb7a9a9d691b..fd8c2f01eef1 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/MyWorkbookProperties.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/MyWorkbookProperties.java @@ -19,22 +19,20 @@ public final class MyWorkbookProperties { private String displayName; /* - * Configuration of this particular private workbook. Configuration data is - * a string containing valid JSON + * Configuration of this particular private workbook. Configuration data is a string containing valid JSON */ @JsonProperty(value = "serializedData", required = true) private String serializedData; /* - * This instance's version of the data model. This can change as new - * features are added that can be marked private workbook. + * This instance's version of the data model. This can change as new features are added that can be marked private + * workbook. */ @JsonProperty(value = "version") private String version; /* - * Date and time in UTC of the last modification that was made to this - * private workbook definition. + * Date and time in UTC of the last modification that was made to this private workbook definition. */ @JsonProperty(value = "timeModified", access = JsonProperty.Access.WRITE_ONLY) private String timeModified; @@ -46,8 +44,7 @@ public final class MyWorkbookProperties { private String category; /* - * A list of 0 or more tags that are associated with this private workbook - * definition + * A list of 0 or more tags that are associated with this private workbook definition */ @JsonProperty(value = "tags") private List tags; @@ -70,6 +67,10 @@ public final class MyWorkbookProperties { @JsonProperty(value = "storageUri") private String storageUri; + /** Creates an instance of MyWorkbookProperties class. */ + public MyWorkbookProperties() { + } + /** * Get the displayName property: The user-defined name of the private workbook. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/OperationInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/OperationInner.java index 437b7f7c17eb..4a3d048c8df7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/OperationInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/OperationInner.java @@ -8,7 +8,7 @@ import com.azure.resourcemanager.applicationinsights.models.OperationDisplay; import com.fasterxml.jackson.annotation.JsonProperty; -/** CDN REST API operation. */ +/** Azure Workbooks REST API operation. */ @Fluent public final class OperationInner { /* @@ -23,6 +23,10 @@ public final class OperationInner { @JsonProperty(value = "display") private OperationDisplay display; + /** Creates an instance of OperationInner class. */ + public OperationInner() { + } + /** * Get the name property: Operation name: {provider}/{resource}/{operation}. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WebTestInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WebTestInner.java index f5c12ebdf2d4..4d597cb797d6 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WebTestInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WebTestInner.java @@ -8,17 +8,18 @@ import com.azure.resourcemanager.applicationinsights.models.WebTestGeolocation; import com.azure.resourcemanager.applicationinsights.models.WebTestKind; import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesConfiguration; +import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesRequest; +import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesValidationRules; import com.azure.resourcemanager.applicationinsights.models.WebtestsResource; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; -/** An Application Insights web test definition. */ +/** An Application Insights WebTest definition. */ @Fluent public final class WebTestInner extends WebtestsResource { /* - * The kind of web test that this web test watches. Choices are ping and - * multistep. + * The kind of WebTest that this web test watches. Choices are ping, multistep and standard. */ @JsonProperty(value = "kind") private WebTestKind kind; @@ -29,8 +30,12 @@ public final class WebTestInner extends WebtestsResource { @JsonProperty(value = "properties") private WebTestProperties innerProperties; + /** Creates an instance of WebTestInner class. */ + public WebTestInner() { + } + /** - * Get the kind property: The kind of web test that this web test watches. Choices are ping and multistep. + * Get the kind property: The kind of WebTest that this web test watches. Choices are ping, multistep and standard. * * @return the kind value. */ @@ -39,7 +44,7 @@ public WebTestKind kind() { } /** - * Set the kind property: The kind of web test that this web test watches. Choices are ping and multistep. + * Set the kind property: The kind of WebTest that this web test watches. Choices are ping, multistep and standard. * * @param kind the kind value to set. * @return the WebTestInner object itself. @@ -121,7 +126,7 @@ public WebTestInner withWebTestName(String webTestName) { } /** - * Get the description property: Purpose/user defined descriptive test for this WebTest. + * Get the description property: User defined description for this WebTest. * * @return the description value. */ @@ -130,7 +135,7 @@ public String description() { } /** - * Set the description property: Purpose/user defined descriptive test for this WebTest. + * Set the description property: User defined description for this WebTest. * * @param description the description value to set. * @return the WebTestInner object itself. @@ -213,7 +218,7 @@ public WebTestInner withTimeout(Integer timeout) { } /** - * Get the webTestKind property: The kind of web test this is, valid choices are ping and multistep. + * Get the webTestKind property: The kind of web test this is, valid choices are ping, multistep and standard. * * @return the webTestKind value. */ @@ -222,7 +227,7 @@ public WebTestKind webTestKind() { } /** - * Set the webTestKind property: The kind of web test this is, valid choices are ping and multistep. + * Set the webTestKind property: The kind of web test this is, valid choices are ping, multistep and standard. * * @param webTestKind the webTestKind value to set. * @return the WebTestInner object itself. @@ -317,6 +322,52 @@ public String provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } + /** + * Get the request property: The collection of request properties. + * + * @return the request value. + */ + public WebTestPropertiesRequest request() { + return this.innerProperties() == null ? null : this.innerProperties().request(); + } + + /** + * Set the request property: The collection of request properties. + * + * @param request the request value to set. + * @return the WebTestInner object itself. + */ + public WebTestInner withRequest(WebTestPropertiesRequest request) { + if (this.innerProperties() == null) { + this.innerProperties = new WebTestProperties(); + } + this.innerProperties().withRequest(request); + return this; + } + + /** + * Get the validationRules property: The collection of validation rule properties. + * + * @return the validationRules value. + */ + public WebTestPropertiesValidationRules validationRules() { + return this.innerProperties() == null ? null : this.innerProperties().validationRules(); + } + + /** + * Set the validationRules property: The collection of validation rule properties. + * + * @param validationRules the validationRules value to set. + * @return the WebTestInner object itself. + */ + public WebTestInner withValidationRules(WebTestPropertiesValidationRules validationRules) { + if (this.innerProperties() == null) { + this.innerProperties = new WebTestProperties(); + } + this.innerProperties().withValidationRules(validationRules); + return this; + } + /** * Validates the instance. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WebTestProperties.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WebTestProperties.java index 1e2ecf0f8ecc..0f7959dc3998 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WebTestProperties.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WebTestProperties.java @@ -9,6 +9,8 @@ import com.azure.resourcemanager.applicationinsights.models.WebTestGeolocation; import com.azure.resourcemanager.applicationinsights.models.WebTestKind; import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesConfiguration; +import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesRequest; +import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesValidationRules; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -16,8 +18,7 @@ @Fluent public final class WebTestProperties { /* - * Unique ID of this WebTest. This is typically the same value as the Name - * field. + * Unique ID of this WebTest. This is typically the same value as the Name field. */ @JsonProperty(value = "SyntheticMonitorId", required = true) private String syntheticMonitorId; @@ -29,7 +30,7 @@ public final class WebTestProperties { private String webTestName; /* - * Purpose/user defined descriptive test for this WebTest. + * User defined description for this WebTest. */ @JsonProperty(value = "Description") private String description; @@ -41,8 +42,7 @@ public final class WebTestProperties { private Boolean enabled; /* - * Interval in seconds between test runs for this WebTest. Default value is - * 300. + * Interval in seconds between test runs for this WebTest. Default value is 300. */ @JsonProperty(value = "Frequency") private Integer frequency; @@ -54,7 +54,7 @@ public final class WebTestProperties { private Integer timeout; /* - * The kind of web test this is, valid choices are ping and multistep. + * The kind of web test this is, valid choices are ping, multistep and standard. */ @JsonProperty(value = "Kind", required = true) private WebTestKind webTestKind; @@ -66,8 +66,7 @@ public final class WebTestProperties { private Boolean retryEnabled; /* - * A list of where to physically run the tests from to give global coverage - * for accessibility of your application. + * A list of where to physically run the tests from to give global coverage for accessibility of your application. */ @JsonProperty(value = "Locations", required = true) private List locations; @@ -79,14 +78,29 @@ public final class WebTestProperties { private WebTestPropertiesConfiguration configuration; /* - * Current state of this component, whether or not is has been provisioned - * within the resource group it is defined. Users cannot change this value - * but are able to read from it. Values will include Succeeded, Deploying, - * Canceled, and Failed. + * Current state of this component, whether or not is has been provisioned within the resource group it is defined. + * Users cannot change this value but are able to read from it. Values will include Succeeded, Deploying, Canceled, + * and Failed. */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; + /* + * The collection of request properties + */ + @JsonProperty(value = "Request") + private WebTestPropertiesRequest request; + + /* + * The collection of validation rule properties + */ + @JsonProperty(value = "ValidationRules") + private WebTestPropertiesValidationRules validationRules; + + /** Creates an instance of WebTestProperties class. */ + public WebTestProperties() { + } + /** * Get the syntheticMonitorId property: Unique ID of this WebTest. This is typically the same value as the Name * field. @@ -130,7 +144,7 @@ public WebTestProperties withWebTestName(String webTestName) { } /** - * Get the description property: Purpose/user defined descriptive test for this WebTest. + * Get the description property: User defined description for this WebTest. * * @return the description value. */ @@ -139,7 +153,7 @@ public String description() { } /** - * Set the description property: Purpose/user defined descriptive test for this WebTest. + * Set the description property: User defined description for this WebTest. * * @param description the description value to set. * @return the WebTestProperties object itself. @@ -210,7 +224,7 @@ public WebTestProperties withTimeout(Integer timeout) { } /** - * Get the webTestKind property: The kind of web test this is, valid choices are ping and multistep. + * Get the webTestKind property: The kind of web test this is, valid choices are ping, multistep and standard. * * @return the webTestKind value. */ @@ -219,7 +233,7 @@ public WebTestKind webTestKind() { } /** - * Set the webTestKind property: The kind of web test this is, valid choices are ping and multistep. + * Set the webTestKind property: The kind of web test this is, valid choices are ping, multistep and standard. * * @param webTestKind the webTestKind value to set. * @return the WebTestProperties object itself. @@ -302,6 +316,46 @@ public String provisioningState() { return this.provisioningState; } + /** + * Get the request property: The collection of request properties. + * + * @return the request value. + */ + public WebTestPropertiesRequest request() { + return this.request; + } + + /** + * Set the request property: The collection of request properties. + * + * @param request the request value to set. + * @return the WebTestProperties object itself. + */ + public WebTestProperties withRequest(WebTestPropertiesRequest request) { + this.request = request; + return this; + } + + /** + * Get the validationRules property: The collection of validation rule properties. + * + * @return the validationRules value. + */ + public WebTestPropertiesValidationRules validationRules() { + return this.validationRules; + } + + /** + * Set the validationRules property: The collection of validation rule properties. + * + * @param validationRules the validationRules value to set. + * @return the WebTestProperties object itself. + */ + public WebTestProperties withValidationRules(WebTestPropertiesValidationRules validationRules) { + this.validationRules = validationRules; + return this; + } + /** * Validates the instance. * @@ -334,6 +388,12 @@ public void validate() { if (configuration() != null) { configuration().validate(); } + if (request() != null) { + request().validate(); + } + if (validationRules() != null) { + validationRules().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(WebTestProperties.class); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkItemConfigurationInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkItemConfigurationInner.java index 81b4547c2b8d..687c996e84b7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkItemConfigurationInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkItemConfigurationInner.java @@ -40,6 +40,10 @@ public final class WorkItemConfigurationInner { @JsonProperty(value = "ConfigProperties") private String configProperties; + /** Creates an instance of WorkItemConfigurationInner class. */ + public WorkItemConfigurationInner() { + } + /** * Get the connectorId property: Connector identifier where work item is created. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookInner.java index ecbe65dfe056..3d38d764aea7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookInner.java @@ -29,6 +29,10 @@ public final class WorkbookInner extends WorkbookResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of WorkbookInner class. */ + public WorkbookInner() { + } + /** * Get the innerProperties property: Metadata describing a workbook for an Azure resource. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookProperties.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookProperties.java index 57fd417fb212..20d9d41c2c29 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookProperties.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookProperties.java @@ -20,22 +20,19 @@ public final class WorkbookProperties { private String displayName; /* - * Configuration of this particular workbook. Configuration data is a - * string containing valid JSON + * Configuration of this particular workbook. Configuration data is a string containing valid JSON */ @JsonProperty(value = "serializedData", required = true) private String serializedData; /* - * Workbook schema version format, like 'Notebook/1.0', which should match - * the workbook in serializedData + * Workbook schema version format, like 'Notebook/1.0', which should match the workbook in serializedData */ @JsonProperty(value = "version") private String version; /* - * Date and time in UTC of the last modification that was made to this - * workbook definition. + * Date and time in UTC of the last modification that was made to this workbook definition. */ @JsonProperty(value = "timeModified", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime timeModified; @@ -65,8 +62,7 @@ public final class WorkbookProperties { private String sourceId; /* - * The resourceId to the storage account when bring your own storage is - * used + * The resourceId to the storage account when bring your own storage is used */ @JsonProperty(value = "storageUri") private String storageUri; @@ -83,6 +79,10 @@ public final class WorkbookProperties { @JsonProperty(value = "revision", access = JsonProperty.Access.WRITE_ONLY) private String revision; + /** Creates an instance of WorkbookProperties class. */ + public WorkbookProperties() { + } + /** * Get the displayName property: The user-defined name (display name) of the workbook. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookPropertiesUpdateParameters.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookPropertiesUpdateParameters.java index ae5fe8a053fe..350b986b2b06 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookPropertiesUpdateParameters.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookPropertiesUpdateParameters.java @@ -18,8 +18,7 @@ public final class WorkbookPropertiesUpdateParameters { private String displayName; /* - * Configuration of this particular workbook. Configuration data is a - * string containing valid JSON + * Configuration of this particular workbook. Configuration data is a string containing valid JSON */ @JsonProperty(value = "serializedData") private String serializedData; @@ -31,8 +30,7 @@ public final class WorkbookPropertiesUpdateParameters { private String category; /* - * A list of 0 or more tags that are associated with this workbook - * definition + * A list of 0 or more tags that are associated with this workbook definition */ @JsonProperty(value = "tags") private List tags; @@ -49,6 +47,10 @@ public final class WorkbookPropertiesUpdateParameters { @JsonProperty(value = "revision") private String revision; + /** Creates an instance of WorkbookPropertiesUpdateParameters class. */ + public WorkbookPropertiesUpdateParameters() { + } + /** * Get the displayName property: The user-defined name (display name) of the workbook. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookTemplateInner.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookTemplateInner.java index c0662c2dcf8b..ab41289cd9d1 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookTemplateInner.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookTemplateInner.java @@ -21,6 +21,10 @@ public final class WorkbookTemplateInner extends WorkbookTemplateResource { @JsonProperty(value = "properties") private WorkbookTemplateProperties innerProperties; + /** Creates an instance of WorkbookTemplateInner class. */ + public WorkbookTemplateInner() { + } + /** * Get the innerProperties property: Metadata describing a workbook template for an Azure resource. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookTemplateProperties.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookTemplateProperties.java index ee326b6a0a50..f8e4d8b0834c 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookTemplateProperties.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/fluent/models/WorkbookTemplateProperties.java @@ -17,8 +17,7 @@ @Fluent public final class WorkbookTemplateProperties { /* - * Priority of the template. Determines which template to open when a - * workbook gallery is opened in viewer mode. + * Priority of the template. Determines which template to open when a workbook gallery is opened in viewer mode. */ @JsonProperty(value = "priority") private Integer priority; @@ -42,13 +41,16 @@ public final class WorkbookTemplateProperties { private List galleries; /* - * Key value pair of localized gallery. Each key is the locale code of - * languages supported by the Azure portal. + * Key value pair of localized gallery. Each key is the locale code of languages supported by the Azure portal. */ @JsonProperty(value = "localized") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map> localized; + /** Creates an instance of WorkbookTemplateProperties class. */ + public WorkbookTemplateProperties() { + } + /** * Get the priority property: Priority of the template. Determines which template to open when a workbook gallery is * opened in viewer mode. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsClientImpl.java index d39916333157..a88606dc186f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsClientImpl.java @@ -57,7 +57,7 @@ public final class AnalyticsItemsClientImpl implements AnalyticsItemsClient { */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") - private interface AnalyticsItemsService { + public interface AnalyticsItemsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components" @@ -268,36 +268,6 @@ private Mono>> lis context); } - /** - * Gets a list of Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param scope Enum indicating if this item definition is owned by a specific user or is shared between all users - * with access to the Application Insights component. - * @param type Enum indicating the type of the Analytics item. - * @param includeContent Flag indicating whether or not to return the content of each applicable item. If false, - * only return the item information. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Analytics Items defined within an Application Insights component on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAsync( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ItemScope scope, - ItemTypeParameter type, - Boolean includeContent) { - return listWithResponseAsync(resourceGroupName, resourceName, scopePath, scope, type, includeContent) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - /** * Gets a list of Analytics Items defined within an Application Insights component. * @@ -321,27 +291,6 @@ private Mono> listAsync( .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Gets a list of Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Analytics Items defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public List list( - String resourceGroupName, String resourceName, ItemScopePath scopePath) { - final ItemScope scope = null; - final ItemTypeParameter type = null; - final Boolean includeContent = null; - return listAsync(resourceGroupName, resourceName, scopePath, scope, type, includeContent).block(); - } - /** * Gets a list of Analytics Items defined within an Application Insights component. * @@ -373,6 +322,28 @@ public Response> listWithRe .block(); } + /** + * Gets a list of Analytics Items defined within an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all + * users with access to the Application Insights component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Analytics Items defined within an Application Insights component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List list( + String resourceGroupName, String resourceName, ItemScopePath scopePath) { + final ItemScope scope = null; + final ItemTypeParameter type = null; + final Boolean includeContent = null; + return listWithResponse(resourceGroupName, resourceName, scopePath, scope, type, includeContent, Context.NONE) + .getValue(); + } + /** * Gets a specific Analytics Items defined within an Application Insights component. * @@ -503,8 +474,6 @@ private Mono> getWithRe * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all * users with access to the Application Insights component. - * @param id The Id of a specific item defined in the Application Insights component. - * @param name The name of a specific item defined in the Application Insights component. * @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. @@ -513,7 +482,9 @@ private Mono> getWithRe */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( - String resourceGroupName, String resourceName, ItemScopePath scopePath, String id, String name) { + String resourceGroupName, String resourceName, ItemScopePath scopePath) { + final String id = null; + final String name = null; return getWithResponseAsync(resourceGroupName, resourceName, scopePath, id, name) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -525,19 +496,23 @@ private Mono getAsync( * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all * users with access to the Application Insights component. + * @param id The Id of a specific item defined in the Application Insights component. + * @param name The name of a specific item defined in the Application Insights component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Analytics Items defined within an Application Insights component on successful completion of - * {@link Mono}. + * @return a specific Analytics Items defined within an Application Insights component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String resourceName, ItemScopePath scopePath) { - final String id = null; - final String name = null; - return getWithResponseAsync(resourceGroupName, resourceName, scopePath, id, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response getWithResponse( + String resourceGroupName, + String resourceName, + ItemScopePath scopePath, + String id, + String name, + Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, scopePath, id, name, context).block(); } /** @@ -557,33 +532,7 @@ public ApplicationInsightsComponentAnalyticsItemInner get( String resourceGroupName, String resourceName, ItemScopePath scopePath) { final String id = null; final String name = null; - return getAsync(resourceGroupName, resourceName, scopePath, id, name).block(); - } - - /** - * Gets a specific Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param id The Id of a specific item defined in the Application Insights component. - * @param name The name of a specific item defined in the Application Insights component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Analytics Items defined within an Application Insights component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - String id, - String name, - Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, scopePath, id, name, context).block(); + return getWithResponse(resourceGroupName, resourceName, scopePath, id, name, Context.NONE).getValue(); } /** @@ -736,8 +685,6 @@ private Mono> putWithRe * users with access to the Application Insights component. * @param itemProperties Properties that need to be specified to create a new item and add it to an Application * Insights component. - * @param overrideItem Flag indicating whether or not to force save an item. This allows overriding an item if it - * already exists. * @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. @@ -749,8 +696,8 @@ private Mono putAsync( String resourceGroupName, String resourceName, ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties, - Boolean overrideItem) { + ApplicationInsightsComponentAnalyticsItemInner itemProperties) { + final Boolean overrideItem = null; return putWithResponseAsync(resourceGroupName, resourceName, scopePath, itemProperties, overrideItem) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -764,21 +711,25 @@ private Mono putAsync( * users with access to the Application Insights component. * @param itemProperties Properties that need to be specified to create a new item and add it to an Application * Insights component. + * @param overrideItem Flag indicating whether or not to force save an item. This allows overriding an item if it + * already exists. + * @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 properties that define an Analytics item that is associated to an Application Insights component on - * successful completion of {@link Mono}. + * @return properties that define an Analytics item that is associated to an Application Insights component along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono putAsync( + public Response putWithResponse( String resourceGroupName, String resourceName, ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties) { - final Boolean overrideItem = null; - return putWithResponseAsync(resourceGroupName, resourceName, scopePath, itemProperties, overrideItem) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + ApplicationInsightsComponentAnalyticsItemInner itemProperties, + Boolean overrideItem, + Context context) { + return putWithResponseAsync(resourceGroupName, resourceName, scopePath, itemProperties, overrideItem, context) + .block(); } /** @@ -802,37 +753,8 @@ public ApplicationInsightsComponentAnalyticsItemInner put( ItemScopePath scopePath, ApplicationInsightsComponentAnalyticsItemInner itemProperties) { final Boolean overrideItem = null; - return putAsync(resourceGroupName, resourceName, scopePath, itemProperties, overrideItem).block(); - } - - /** - * Adds or Updates a specific Analytics Item within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param itemProperties Properties that need to be specified to create a new item and add it to an Application - * Insights component. - * @param overrideItem Flag indicating whether or not to force save an item. This allows overriding an item if it - * already exists. - * @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 properties that define an Analytics item that is associated to an Application Insights component along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response putWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties, - Boolean overrideItem, - Context context) { - return putWithResponseAsync(resourceGroupName, resourceName, scopePath, itemProperties, overrideItem, context) - .block(); + return putWithResponse(resourceGroupName, resourceName, scopePath, itemProperties, overrideItem, Context.NONE) + .getValue(); } /** @@ -952,27 +874,6 @@ private Mono> deleteWithResponseAsync( context); } - /** - * Deletes a specific Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @param id The Id of a specific item defined in the Application Insights component. - * @param name The name of a specific item defined in the Application Insights component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String resourceName, ItemScopePath scopePath, String id, String name) { - return deleteWithResponseAsync(resourceGroupName, resourceName, scopePath, id, name) - .flatMap(ignored -> Mono.empty()); - } - /** * Deletes a specific Analytics Items defined within an Application Insights component. * @@ -1000,15 +901,23 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, It * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all * users with access to the Application Insights component. + * @param id The Id of a specific item defined in the Application Insights component. + * @param name The name of a specific item defined in the Application Insights component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, ItemScopePath scopePath) { - final String id = null; - final String name = null; - deleteAsync(resourceGroupName, resourceName, scopePath, id, name).block(); + public Response deleteWithResponse( + String resourceGroupName, + String resourceName, + ItemScopePath scopePath, + String id, + String name, + Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, scopePath, id, name, context).block(); } /** @@ -1018,22 +927,14 @@ public void delete(String resourceGroupName, String resourceName, ItemScopePath * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all * users with access to the Application Insights component. - * @param id The Id of a specific item defined in the Application Insights component. - * @param name The name of a specific item defined in the Application Insights component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - String id, - String name, - Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, scopePath, id, name, context).block(); + public void delete(String resourceGroupName, String resourceName, ItemScopePath scopePath) { + final String id = null; + final String name = null; + deleteWithResponse(resourceGroupName, resourceName, scopePath, id, name, Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsImpl.java index 13501885114b..54464dafaeaa 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnalyticsItemsImpl.java @@ -33,22 +33,6 @@ public AnalyticsItemsImpl( this.serviceManager = serviceManager; } - public List list( - String resourceGroupName, String resourceName, ItemScopePath scopePath) { - List inner = - this.serviceClient().list(resourceGroupName, resourceName, scopePath); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new ApplicationInsightsComponentAnalyticsItemImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - public Response> listWithResponse( String resourceGroupName, String resourceName, @@ -76,14 +60,19 @@ public Response> listWithRespons } } - public ApplicationInsightsComponentAnalyticsItem get( + public List list( String resourceGroupName, String resourceName, ItemScopePath scopePath) { - ApplicationInsightsComponentAnalyticsItemInner inner = - this.serviceClient().get(resourceGroupName, resourceName, scopePath); + List inner = + this.serviceClient().list(resourceGroupName, resourceName, scopePath); if (inner != null) { - return new ApplicationInsightsComponentAnalyticsItemImpl(inner, this.manager()); + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new ApplicationInsightsComponentAnalyticsItemImpl(inner1, this.manager())) + .collect(Collectors.toList())); } else { - return null; + return Collections.emptyList(); } } @@ -107,13 +96,10 @@ public Response getWithResponse( } } - public ApplicationInsightsComponentAnalyticsItem put( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties) { + public ApplicationInsightsComponentAnalyticsItem get( + String resourceGroupName, String resourceName, ItemScopePath scopePath) { ApplicationInsightsComponentAnalyticsItemInner inner = - this.serviceClient().put(resourceGroupName, resourceName, scopePath, itemProperties); + this.serviceClient().get(resourceGroupName, resourceName, scopePath); if (inner != null) { return new ApplicationInsightsComponentAnalyticsItemImpl(inner, this.manager()); } else { @@ -143,8 +129,18 @@ public Response putWithResponse( } } - public void delete(String resourceGroupName, String resourceName, ItemScopePath scopePath) { - this.serviceClient().delete(resourceGroupName, resourceName, scopePath); + public ApplicationInsightsComponentAnalyticsItem put( + String resourceGroupName, + String resourceName, + ItemScopePath scopePath, + ApplicationInsightsComponentAnalyticsItemInner itemProperties) { + ApplicationInsightsComponentAnalyticsItemInner inner = + this.serviceClient().put(resourceGroupName, resourceName, scopePath, itemProperties); + if (inner != null) { + return new ApplicationInsightsComponentAnalyticsItemImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -157,6 +153,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, scopePath, id, name, context); } + public void delete(String resourceGroupName, String resourceName, ItemScopePath scopePath) { + this.serviceClient().delete(resourceGroupName, resourceName, scopePath); + } + private AnalyticsItemsClient serviceClient() { return this.innerClient; } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsClientImpl.java index 70b6055c29ee..d7af09ead0f1 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsClientImpl.java @@ -60,7 +60,7 @@ public final class AnnotationsClientImpl implements AnnotationsClient { */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") - private interface AnnotationsService { + public interface AnnotationsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" @@ -470,15 +470,16 @@ private Mono> createAsync( * @param resourceName The name of the Application Insights component resource. * @param annotationProperties Properties that need to be specified to create an annotation of a Application * Insights component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AnnotationErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of Annotation. + * @return array of Annotation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public List create( - String resourceGroupName, String resourceName, AnnotationInner annotationProperties) { - return createAsync(resourceGroupName, resourceName, annotationProperties).block(); + public Response> createWithResponse( + String resourceGroupName, String resourceName, AnnotationInner annotationProperties, Context context) { + return createWithResponseAsync(resourceGroupName, resourceName, annotationProperties, context).block(); } /** @@ -488,16 +489,15 @@ public List create( * @param resourceName The name of the Application Insights component resource. * @param annotationProperties Properties that need to be specified to create an annotation of a Application * Insights component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AnnotationErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of Annotation along with {@link Response}. + * @return array of Annotation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> createWithResponse( - String resourceGroupName, String resourceName, AnnotationInner annotationProperties, Context context) { - return createWithResponseAsync(resourceGroupName, resourceName, annotationProperties, context).block(); + public List create( + String resourceGroupName, String resourceName, AnnotationInner annotationProperties) { + return createWithResponse(resourceGroupName, resourceName, annotationProperties, Context.NONE).getValue(); } /** @@ -624,13 +624,16 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationId The unique annotation ID. This is unique within a Application Insights component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String annotationId) { - deleteAsync(resourceGroupName, resourceName, annotationId).block(); + public Response deleteWithResponse( + String resourceGroupName, String resourceName, String annotationId, Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, annotationId, context).block(); } /** @@ -639,16 +642,13 @@ public void delete(String resourceGroupName, String resourceName, String annotat * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, annotationId, context).block(); + public void delete(String resourceGroupName, String resourceName, String annotationId) { + deleteWithResponse(resourceGroupName, resourceName, annotationId, Context.NONE); } /** @@ -780,14 +780,16 @@ private Mono> getAsync(String resourceGroupName, String re * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationId The unique annotation ID. This is unique within a Application Insights component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AnnotationErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the annotation for given id. + * @return the annotation for given id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public List get(String resourceGroupName, String resourceName, String annotationId) { - return getAsync(resourceGroupName, resourceName, annotationId).block(); + public Response> getWithResponse( + String resourceGroupName, String resourceName, String annotationId, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, annotationId, context).block(); } /** @@ -796,15 +798,13 @@ public List get(String resourceGroupName, String resourceName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws AnnotationErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the annotation for given id along with {@link Response}. + * @return the annotation for given id. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> getWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, annotationId, context).block(); + public List get(String resourceGroupName, String resourceName, String annotationId) { + return getWithResponse(resourceGroupName, resourceName, annotationId, Context.NONE).getValue(); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsImpl.java index dad3d4fc6d2f..fd1133b807aa 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/AnnotationsImpl.java @@ -43,22 +43,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new AnnotationImpl(inner1, this.manager())); } - public List create( - String resourceGroupName, String resourceName, AnnotationInner annotationProperties) { - List inner = - this.serviceClient().create(resourceGroupName, resourceName, annotationProperties); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new AnnotationImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - public Response> createWithResponse( String resourceGroupName, String resourceName, AnnotationInner annotationProperties, Context context) { Response> inner = @@ -78,17 +62,10 @@ public Response> createWithResponse( } } - public void delete(String resourceGroupName, String resourceName, String annotationId) { - this.serviceClient().delete(resourceGroupName, resourceName, annotationId); - } - - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, annotationId, context); - } - - public List get(String resourceGroupName, String resourceName, String annotationId) { - List inner = this.serviceClient().get(resourceGroupName, resourceName, annotationId); + public List create( + String resourceGroupName, String resourceName, AnnotationInner annotationProperties) { + List inner = + this.serviceClient().create(resourceGroupName, resourceName, annotationProperties); if (inner != null) { return Collections .unmodifiableList( @@ -101,6 +78,15 @@ public List get(String resourceGroupName, String resourceName, Strin } } + public Response deleteWithResponse( + String resourceGroupName, String resourceName, String annotationId, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, annotationId, context); + } + + public void delete(String resourceGroupName, String resourceName, String annotationId) { + this.serviceClient().delete(resourceGroupName, resourceName, annotationId); + } + public Response> getWithResponse( String resourceGroupName, String resourceName, String annotationId, Context context) { Response> inner = @@ -120,6 +106,20 @@ public Response> getWithResponse( } } + public List get(String resourceGroupName, String resourceName, String annotationId) { + List inner = this.serviceClient().get(resourceGroupName, resourceName, annotationId); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new AnnotationImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + private AnnotationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysClientImpl.java index bd95be1478e2..42a5f416c39f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysClientImpl.java @@ -58,7 +58,7 @@ public final class ApiKeysClientImpl implements ApiKeysClient { */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") - private interface ApiKeysService { + public interface ApiKeysService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" @@ -437,15 +437,16 @@ private Mono createAsync( * @param resourceName The name of the Application Insights component resource. * @param apiKeyProperties Properties that need to be specified to create an API key of a Application Insights * component. + * @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 properties that define an API key of an Application Insights Component. + * @return properties that define an API key of an Application Insights Component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentApiKeyInner create( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties) { - return createAsync(resourceGroupName, resourceName, apiKeyProperties).block(); + public Response createWithResponse( + String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties, Context context) { + return createWithResponseAsync(resourceGroupName, resourceName, apiKeyProperties, context).block(); } /** @@ -455,16 +456,15 @@ public ApplicationInsightsComponentApiKeyInner create( * @param resourceName The name of the Application Insights component resource. * @param apiKeyProperties Properties that need to be specified to create an API key of a Application Insights * component. - * @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 properties that define an API key of an Application Insights Component along with {@link Response}. + * @return properties that define an API key of an Application Insights Component. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties, Context context) { - return createWithResponseAsync(resourceGroupName, resourceName, apiKeyProperties, context).block(); + public ApplicationInsightsComponentApiKeyInner create( + String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties) { + return createWithResponse(resourceGroupName, resourceName, apiKeyProperties, Context.NONE).getValue(); } /** @@ -600,14 +600,16 @@ private Mono deleteAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param keyId The API Key ID. This is unique within a Application Insights component. + * @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 properties that define an API key of an Application Insights Component. + * @return properties that define an API key of an Application Insights Component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentApiKeyInner delete(String resourceGroupName, String resourceName, String keyId) { - return deleteAsync(resourceGroupName, resourceName, keyId).block(); + public Response deleteWithResponse( + String resourceGroupName, String resourceName, String keyId, Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, keyId, context).block(); } /** @@ -616,16 +618,14 @@ public ApplicationInsightsComponentApiKeyInner delete(String resourceGroupName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param keyId The API Key ID. This is unique within a Application Insights component. - * @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 properties that define an API key of an Application Insights Component along with {@link Response}. + * @return properties that define an API key of an Application Insights Component. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String keyId, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, keyId, context).block(); + public ApplicationInsightsComponentApiKeyInner delete(String resourceGroupName, String resourceName, String keyId) { + return deleteWithResponse(resourceGroupName, resourceName, keyId, Context.NONE).getValue(); } /** @@ -758,14 +758,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param keyId The API Key ID. This is unique within a Application Insights component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the API Key for this key id. + * @return the API Key for this key id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentApiKeyInner get(String resourceGroupName, String resourceName, String keyId) { - return getAsync(resourceGroupName, resourceName, keyId).block(); + public Response getWithResponse( + String resourceGroupName, String resourceName, String keyId, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, keyId, context).block(); } /** @@ -774,15 +776,13 @@ public ApplicationInsightsComponentApiKeyInner get(String resourceGroupName, Str * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param keyId The API Key ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the API Key for this key id along with {@link Response}. + * @return the API Key for this key id. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, String keyId, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, keyId, context).block(); + public ApplicationInsightsComponentApiKeyInner get(String resourceGroupName, String resourceName, String keyId) { + return getWithResponse(resourceGroupName, resourceName, keyId, Context.NONE).getValue(); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysImpl.java index e8da74e95723..fed98f799dfb 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApiKeysImpl.java @@ -42,17 +42,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new ApplicationInsightsComponentApiKeyImpl(inner1, this.manager())); } - public ApplicationInsightsComponentApiKey create( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties) { - ApplicationInsightsComponentApiKeyInner inner = - this.serviceClient().create(resourceGroupName, resourceName, apiKeyProperties); - if (inner != null) { - return new ApplicationInsightsComponentApiKeyImpl(inner, this.manager()); - } else { - return null; - } - } - public Response createWithResponse( String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties, Context context) { Response inner = @@ -68,9 +57,10 @@ public Response createWithResponse( } } - public ApplicationInsightsComponentApiKey delete(String resourceGroupName, String resourceName, String keyId) { + public ApplicationInsightsComponentApiKey create( + String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties) { ApplicationInsightsComponentApiKeyInner inner = - this.serviceClient().delete(resourceGroupName, resourceName, keyId); + this.serviceClient().create(resourceGroupName, resourceName, apiKeyProperties); if (inner != null) { return new ApplicationInsightsComponentApiKeyImpl(inner, this.manager()); } else { @@ -93,9 +83,9 @@ public Response deleteWithResponse( } } - public ApplicationInsightsComponentApiKey get(String resourceGroupName, String resourceName, String keyId) { + public ApplicationInsightsComponentApiKey delete(String resourceGroupName, String resourceName, String keyId) { ApplicationInsightsComponentApiKeyInner inner = - this.serviceClient().get(resourceGroupName, resourceName, keyId); + this.serviceClient().delete(resourceGroupName, resourceName, keyId); if (inner != null) { return new ApplicationInsightsComponentApiKeyImpl(inner, this.manager()); } else { @@ -118,6 +108,16 @@ public Response getWithResponse( } } + public ApplicationInsightsComponentApiKey get(String resourceGroupName, String resourceName, String keyId) { + ApplicationInsightsComponentApiKeyInner inner = + this.serviceClient().get(resourceGroupName, resourceName, keyId); + if (inner != null) { + return new ApplicationInsightsComponentApiKeyImpl(inner, this.manager()); + } else { + return null; + } + } + private ApiKeysClient serviceClient() { return this.innerClient; } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentImpl.java index ebe648faf1a1..402d3bdf7e4f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsComponentImpl.java @@ -281,14 +281,14 @@ public ApplicationInsightsComponent refresh(Context context) { return this; } - public ComponentPurgeResponse purge(ComponentPurgeBody body) { - return serviceManager.components().purge(resourceGroupName, resourceName, body); - } - public Response purgeWithResponse(ComponentPurgeBody body, Context context) { return serviceManager.components().purgeWithResponse(resourceGroupName, resourceName, body, context); } + public ComponentPurgeResponse purge(ComponentPurgeBody body) { + return serviceManager.components().purge(resourceGroupName, resourceName, body); + } + public ApplicationInsightsComponentImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientBuilder.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientBuilder.java index 7793c01cd415..0c615d304b2b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientBuilder.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientBuilder.java @@ -119,24 +119,26 @@ public ApplicationInsightsManagementClientBuilder serializerAdapter(SerializerAd * @return an instance of ApplicationInsightsManagementClientImpl. */ public ApplicationInsightsManagementClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (pipeline == null) { - this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = + (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval = + (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = + (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); ApplicationInsightsManagementClientImpl client = new ApplicationInsightsManagementClientImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + subscriptionId, + localEndpoint); return client; } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientImpl.java index 495810507dd5..28450eccd204 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ApplicationInsightsManagementClientImpl.java @@ -115,16 +115,16 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The OperationsClient object to access its operations. */ - private final OperationsClient operations; + /** The ComponentsClient object to access its operations. */ + private final ComponentsClient components; /** - * Gets the OperationsClient object to access its operations. + * Gets the ComponentsClient object to access its operations. * - * @return the OperationsClient object. + * @return the ComponentsClient object. */ - public OperationsClient getOperations() { - return this.operations; + public ComponentsClient getComponents() { + return this.components; } /** The AnnotationsClient object to access its operations. */ @@ -283,6 +283,18 @@ public AnalyticsItemsClient getAnalyticsItems() { return this.analyticsItems; } + /** 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 WorkbookTemplatesClient object to access its operations. */ private final WorkbookTemplatesClient workbookTemplates; @@ -319,16 +331,16 @@ public WorkbooksClient getWorkbooks() { return this.workbooks; } - /** The ComponentsClient object to access its operations. */ - private final ComponentsClient components; + /** The LiveTokensClient object to access its operations. */ + private final LiveTokensClient liveTokens; /** - * Gets the ComponentsClient object to access its operations. + * Gets the LiveTokensClient object to access its operations. * - * @return the ComponentsClient object. + * @return the LiveTokensClient object. */ - public ComponentsClient getComponents() { - return this.components; + public LiveTokensClient getLiveTokens() { + return this.liveTokens; } /** The ComponentLinkedStorageAccountsOperationsClient object to access its operations. */ @@ -343,18 +355,6 @@ public ComponentLinkedStorageAccountsOperationsClient getComponentLinkedStorageA return this.componentLinkedStorageAccountsOperations; } - /** The LiveTokensClient object to access its operations. */ - private final LiveTokensClient liveTokens; - - /** - * Gets the LiveTokensClient object to access its operations. - * - * @return the LiveTokensClient object. - */ - public LiveTokensClient getLiveTokens() { - return this.liveTokens; - } - /** * Initializes an instance of ApplicationInsightsManagementClient client. * @@ -377,7 +377,7 @@ public LiveTokensClient getLiveTokens() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.operations = new OperationsClientImpl(this); + this.components = new ComponentsClientImpl(this); this.annotations = new AnnotationsClientImpl(this); this.apiKeys = new ApiKeysClientImpl(this); this.exportConfigurations = new ExportConfigurationsClientImpl(this); @@ -391,12 +391,12 @@ public LiveTokensClient getLiveTokens() { this.webTestLocations = new WebTestLocationsClientImpl(this); this.webTests = new WebTestsClientImpl(this); this.analyticsItems = new AnalyticsItemsClientImpl(this); + this.operations = new OperationsClientImpl(this); this.workbookTemplates = new WorkbookTemplatesClientImpl(this); this.myWorkbooks = new MyWorkbooksClientImpl(this); this.workbooks = new WorkbooksClientImpl(this); - this.components = new ComponentsClientImpl(this); - this.componentLinkedStorageAccountsOperations = new ComponentLinkedStorageAccountsOperationsClientImpl(this); this.liveTokens = new LiveTokensClientImpl(this); + this.componentLinkedStorageAccountsOperations = new ComponentLinkedStorageAccountsOperationsClientImpl(this); } /** diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesClientImpl.java index 8861b6b28aeb..4fc2deafadc6 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesClientImpl.java @@ -52,7 +52,7 @@ public final class ComponentAvailableFeaturesClientImpl implements ComponentAvai */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") - private interface ComponentAvailableFeaturesService { + public interface ComponentAvailableFeaturesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" @@ -188,14 +188,16 @@ private Mono getAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @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 an Application Insights component available features. + * @return an Application Insights component available features along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentAvailableFeaturesInner get(String resourceGroupName, String resourceName) { - return getAsync(resourceGroupName, resourceName).block(); + public Response getWithResponse( + String resourceGroupName, String resourceName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** @@ -203,15 +205,13 @@ public ApplicationInsightsComponentAvailableFeaturesInner get(String resourceGro * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component available features along with {@link Response}. + * @return an Application Insights component available features. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, context).block(); + public ApplicationInsightsComponentAvailableFeaturesInner get(String resourceGroupName, String resourceName) { + return getWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesImpl.java index ecb43a7830cc..c5c04b13f586 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentAvailableFeaturesImpl.java @@ -27,16 +27,6 @@ public ComponentAvailableFeaturesImpl( this.serviceManager = serviceManager; } - public ApplicationInsightsComponentAvailableFeatures get(String resourceGroupName, String resourceName) { - ApplicationInsightsComponentAvailableFeaturesInner inner = - this.serviceClient().get(resourceGroupName, resourceName); - if (inner != null) { - return new ApplicationInsightsComponentAvailableFeaturesImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String resourceName, Context context) { Response inner = @@ -52,6 +42,16 @@ public Response getWithResponse( } } + public ApplicationInsightsComponentAvailableFeatures get(String resourceGroupName, String resourceName) { + ApplicationInsightsComponentAvailableFeaturesInner inner = + this.serviceClient().get(resourceGroupName, resourceName); + if (inner != null) { + return new ApplicationInsightsComponentAvailableFeaturesImpl(inner, this.manager()); + } else { + return null; + } + } + private ComponentAvailableFeaturesClient serviceClient() { return this.innerClient; } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesClientImpl.java index 65ebfc728d6b..70d82f46d41b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesClientImpl.java @@ -56,7 +56,7 @@ public final class ComponentCurrentBillingFeaturesClientImpl implements Componen */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") - private interface ComponentCurrentBillingFeaturesService { + public interface ComponentCurrentBillingFeaturesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" @@ -208,14 +208,16 @@ private Mono getAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @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 an Application Insights component billing features. + * @return an Application Insights component billing features along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentBillingFeaturesInner get(String resourceGroupName, String resourceName) { - return getAsync(resourceGroupName, resourceName).block(); + public Response getWithResponse( + String resourceGroupName, String resourceName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** @@ -223,16 +225,14 @@ public ApplicationInsightsComponentBillingFeaturesInner get(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component billing features along with {@link Response}. + * @return an Application Insights component billing features. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, context).block(); + public ApplicationInsightsComponentBillingFeaturesInner get(String resourceGroupName, String resourceName) { + return getWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } /** @@ -388,17 +388,19 @@ private Mono updateAsync( * @param resourceName The name of the Application Insights component resource. * @param billingFeaturesProperties Properties that need to be specified to update billing features for an * Application Insights component. + * @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 an Application Insights component billing features. + * @return an Application Insights component billing features along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentBillingFeaturesInner update( + public Response updateWithResponse( String resourceGroupName, String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties) { - return updateAsync(resourceGroupName, resourceName, billingFeaturesProperties).block(); + ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, + Context context) { + return updateWithResponseAsync(resourceGroupName, resourceName, billingFeaturesProperties, context).block(); } /** @@ -408,18 +410,16 @@ public ApplicationInsightsComponentBillingFeaturesInner update( * @param resourceName The name of the Application Insights component resource. * @param billingFeaturesProperties Properties that need to be specified to update billing features for an * Application Insights component. - * @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 an Application Insights component billing features along with {@link Response}. + * @return an Application Insights component billing features. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( + public ApplicationInsightsComponentBillingFeaturesInner update( String resourceGroupName, String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, - Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, billingFeaturesProperties, context).block(); + ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties) { + return updateWithResponse(resourceGroupName, resourceName, billingFeaturesProperties, Context.NONE).getValue(); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesImpl.java index 5df442fb1add..b2d95c3b1f09 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentCurrentBillingFeaturesImpl.java @@ -27,16 +27,6 @@ public ComponentCurrentBillingFeaturesImpl( this.serviceManager = serviceManager; } - public ApplicationInsightsComponentBillingFeatures get(String resourceGroupName, String resourceName) { - ApplicationInsightsComponentBillingFeaturesInner inner = - this.serviceClient().get(resourceGroupName, resourceName); - if (inner != null) { - return new ApplicationInsightsComponentBillingFeaturesImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String resourceName, Context context) { Response inner = @@ -52,12 +42,9 @@ public Response getWithResponse( } } - public ApplicationInsightsComponentBillingFeatures update( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties) { + public ApplicationInsightsComponentBillingFeatures get(String resourceGroupName, String resourceName) { ApplicationInsightsComponentBillingFeaturesInner inner = - this.serviceClient().update(resourceGroupName, resourceName, billingFeaturesProperties); + this.serviceClient().get(resourceGroupName, resourceName); if (inner != null) { return new ApplicationInsightsComponentBillingFeaturesImpl(inner, this.manager()); } else { @@ -85,6 +72,19 @@ public Response updateWithResponse( } } + public ApplicationInsightsComponentBillingFeatures update( + String resourceGroupName, + String resourceName, + ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties) { + ApplicationInsightsComponentBillingFeaturesInner inner = + this.serviceClient().update(resourceGroupName, resourceName, billingFeaturesProperties); + if (inner != null) { + return new ApplicationInsightsComponentBillingFeaturesImpl(inner, this.manager()); + } else { + return null; + } + } + private ComponentCurrentBillingFeaturesClient serviceClient() { return this.innerClient; } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesClientImpl.java index 83dddce2d67f..1c8b5a3c6c1a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesClientImpl.java @@ -52,7 +52,7 @@ public final class ComponentFeatureCapabilitiesClientImpl implements ComponentFe */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") - private interface ComponentFeatureCapabilitiesService { + public interface ComponentFeatureCapabilitiesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" @@ -188,14 +188,16 @@ private Mono getAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @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 an Application Insights component feature capabilities. + * @return an Application Insights component feature capabilities along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentFeatureCapabilitiesInner get(String resourceGroupName, String resourceName) { - return getAsync(resourceGroupName, resourceName).block(); + public Response getWithResponse( + String resourceGroupName, String resourceName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** @@ -203,15 +205,13 @@ public ApplicationInsightsComponentFeatureCapabilitiesInner get(String resourceG * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component feature capabilities along with {@link Response}. + * @return an Application Insights component feature capabilities. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, context).block(); + public ApplicationInsightsComponentFeatureCapabilitiesInner get(String resourceGroupName, String resourceName) { + return getWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesImpl.java index 9cc9e7d0c18b..b51c6e81ccd3 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentFeatureCapabilitiesImpl.java @@ -27,16 +27,6 @@ public ComponentFeatureCapabilitiesImpl( this.serviceManager = serviceManager; } - public ApplicationInsightsComponentFeatureCapabilities get(String resourceGroupName, String resourceName) { - ApplicationInsightsComponentFeatureCapabilitiesInner inner = - this.serviceClient().get(resourceGroupName, resourceName); - if (inner != null) { - return new ApplicationInsightsComponentFeatureCapabilitiesImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String resourceName, Context context) { Response inner = @@ -52,6 +42,16 @@ public Response getWithResponse } } + public ApplicationInsightsComponentFeatureCapabilities get(String resourceGroupName, String resourceName) { + ApplicationInsightsComponentFeatureCapabilitiesInner inner = + this.serviceClient().get(resourceGroupName, resourceName); + if (inner != null) { + return new ApplicationInsightsComponentFeatureCapabilitiesImpl(inner, this.manager()); + } else { + return null; + } + } + private ComponentFeatureCapabilitiesClient serviceClient() { return this.innerClient; } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsClientImpl.java index bb1ee40cbdb1..b15e9be42460 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsClientImpl.java @@ -65,7 +65,7 @@ public final class ComponentLinkedStorageAccountsOperationsClientImpl */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") - private interface ComponentLinkedStorageAccountsOperationsService { + public interface ComponentLinkedStorageAccountsOperationsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components" @@ -265,15 +265,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param storageType The type of the Application Insights component data source for the linked storage account. + * @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 an Application Insights component linked storage accounts. + * @return an Application Insights component linked storage accounts along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentLinkedStorageAccountsInner get( - String resourceGroupName, String resourceName, StorageType storageType) { - return getAsync(resourceGroupName, resourceName, storageType).block(); + public Response getWithResponse( + String resourceGroupName, String resourceName, StorageType storageType, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, storageType, context).block(); } /** @@ -282,16 +283,15 @@ public ComponentLinkedStorageAccountsInner get( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param storageType The type of the Application Insights component data source for the linked storage account. - * @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 an Application Insights component linked storage accounts along with {@link Response}. + * @return an Application Insights component linked storage accounts. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, StorageType storageType, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, storageType, context).block(); + public ComponentLinkedStorageAccountsInner get( + String resourceGroupName, String resourceName, StorageType storageType) { + return getWithResponse(resourceGroupName, resourceName, storageType, Context.NONE).getValue(); } /** @@ -463,18 +463,21 @@ private Mono createAndUpdateAsync( * @param storageType The type of the Application Insights component data source for the linked storage account. * @param linkedStorageAccountsProperties Properties that need to be specified to update linked storage accounts for * an Application Insights component. + * @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 an Application Insights component linked storage accounts. + * @return an Application Insights component linked storage accounts along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentLinkedStorageAccountsInner createAndUpdate( + public Response createAndUpdateWithResponse( String resourceGroupName, String resourceName, StorageType storageType, - ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties) { - return createAndUpdateAsync(resourceGroupName, resourceName, storageType, linkedStorageAccountsProperties) + ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties, + Context context) { + return createAndUpdateWithResponseAsync( + resourceGroupName, resourceName, storageType, linkedStorageAccountsProperties, context) .block(); } @@ -486,22 +489,20 @@ public ComponentLinkedStorageAccountsInner createAndUpdate( * @param storageType The type of the Application Insights component data source for the linked storage account. * @param linkedStorageAccountsProperties Properties that need to be specified to update linked storage accounts for * an Application Insights component. - * @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 an Application Insights component linked storage accounts along with {@link Response}. + * @return an Application Insights component linked storage accounts. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createAndUpdateWithResponse( + public ComponentLinkedStorageAccountsInner createAndUpdate( String resourceGroupName, String resourceName, StorageType storageType, - ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties, - Context context) { - return createAndUpdateWithResponseAsync( - resourceGroupName, resourceName, storageType, linkedStorageAccountsProperties, context) - .block(); + ComponentLinkedStorageAccountsInner linkedStorageAccountsProperties) { + return createAndUpdateWithResponse( + resourceGroupName, resourceName, storageType, linkedStorageAccountsProperties, Context.NONE) + .getValue(); } /** @@ -672,18 +673,22 @@ private Mono updateAsync( * @param storageType The type of the Application Insights component data source for the linked storage account. * @param linkedStorageAccountsProperties Properties that need to be specified to update a linked storage accounts * for an Application Insights component. + * @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 an Application Insights component linked storage accounts. + * @return an Application Insights component linked storage accounts along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentLinkedStorageAccountsInner update( + public Response updateWithResponse( String resourceGroupName, String resourceName, StorageType storageType, - ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties) { - return updateAsync(resourceGroupName, resourceName, storageType, linkedStorageAccountsProperties).block(); + ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties, + Context context) { + return updateWithResponseAsync( + resourceGroupName, resourceName, storageType, linkedStorageAccountsProperties, context) + .block(); } /** @@ -694,22 +699,20 @@ public ComponentLinkedStorageAccountsInner update( * @param storageType The type of the Application Insights component data source for the linked storage account. * @param linkedStorageAccountsProperties Properties that need to be specified to update a linked storage accounts * for an Application Insights component. - * @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 an Application Insights component linked storage accounts along with {@link Response}. + * @return an Application Insights component linked storage accounts. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( + public ComponentLinkedStorageAccountsInner update( String resourceGroupName, String resourceName, StorageType storageType, - ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties, - Context context) { - return updateWithResponseAsync( - resourceGroupName, resourceName, storageType, linkedStorageAccountsProperties, context) - .block(); + ComponentLinkedStorageAccountsPatch linkedStorageAccountsProperties) { + return updateWithResponse( + resourceGroupName, resourceName, storageType, linkedStorageAccountsProperties, Context.NONE) + .getValue(); } /** @@ -840,13 +843,16 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param storageType The type of the Application Insights component data source for the linked storage account. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, StorageType storageType) { - deleteAsync(resourceGroupName, resourceName, storageType).block(); + public Response deleteWithResponse( + String resourceGroupName, String resourceName, StorageType storageType, Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, storageType, context).block(); } /** @@ -855,15 +861,12 @@ public void delete(String resourceGroupName, String resourceName, StorageType st * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param storageType The type of the Application Insights component data source for the linked storage account. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String resourceName, StorageType storageType, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, storageType, context).block(); + public void delete(String resourceGroupName, String resourceName, StorageType storageType) { + deleteWithResponse(resourceGroupName, resourceName, storageType, Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsImpl.java index 0e3953147b8a..fc44f8505512 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentLinkedStorageAccountsOperationsImpl.java @@ -28,16 +28,6 @@ public ComponentLinkedStorageAccountsOperationsImpl( this.serviceManager = serviceManager; } - public ComponentLinkedStorageAccounts get(String resourceGroupName, String resourceName, StorageType storageType) { - ComponentLinkedStorageAccountsInner inner = - this.serviceClient().get(resourceGroupName, resourceName, storageType); - if (inner != null) { - return new ComponentLinkedStorageAccountsImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String resourceName, StorageType storageType, Context context) { Response inner = @@ -53,8 +43,14 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String resourceName, StorageType storageType) { - this.serviceClient().delete(resourceGroupName, resourceName, storageType); + public ComponentLinkedStorageAccounts get(String resourceGroupName, String resourceName, StorageType storageType) { + ComponentLinkedStorageAccountsInner inner = + this.serviceClient().get(resourceGroupName, resourceName, storageType); + if (inner != null) { + return new ComponentLinkedStorageAccountsImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -62,6 +58,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, storageType, context); } + public void delete(String resourceGroupName, String resourceName, StorageType storageType) { + this.serviceClient().delete(resourceGroupName, resourceName, storageType); + } + public ComponentLinkedStorageAccounts getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { @@ -78,8 +78,8 @@ public ComponentLinkedStorageAccounts getById(String id) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); } - StorageType storageType = StorageType.fromString(Utils.getValueFromIdByName(id, "linkedStorageAccounts")); - if (storageType == null) { + String storageTypeLocal = Utils.getValueFromIdByName(id, "linkedStorageAccounts"); + if (storageTypeLocal == null) { throw LOGGER .logExceptionAsError( new IllegalArgumentException( @@ -88,6 +88,7 @@ public ComponentLinkedStorageAccounts getById(String id) { "The resource ID '%s' is not valid. Missing path segment 'linkedStorageAccounts'.", id))); } + StorageType storageType = StorageType.fromString(storageTypeLocal); return this.getWithResponse(resourceGroupName, resourceName, storageType, Context.NONE).getValue(); } @@ -107,8 +108,8 @@ public Response getByIdWithResponse(String id, C new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); } - StorageType storageType = StorageType.fromString(Utils.getValueFromIdByName(id, "linkedStorageAccounts")); - if (storageType == null) { + String storageTypeLocal = Utils.getValueFromIdByName(id, "linkedStorageAccounts"); + if (storageTypeLocal == null) { throw LOGGER .logExceptionAsError( new IllegalArgumentException( @@ -117,6 +118,7 @@ public Response getByIdWithResponse(String id, C "The resource ID '%s' is not valid. Missing path segment 'linkedStorageAccounts'.", id))); } + StorageType storageType = StorageType.fromString(storageTypeLocal); return this.getWithResponse(resourceGroupName, resourceName, storageType, context); } @@ -136,8 +138,8 @@ public void deleteById(String id) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); } - StorageType storageType = StorageType.fromString(Utils.getValueFromIdByName(id, "linkedStorageAccounts")); - if (storageType == null) { + String storageTypeLocal = Utils.getValueFromIdByName(id, "linkedStorageAccounts"); + if (storageTypeLocal == null) { throw LOGGER .logExceptionAsError( new IllegalArgumentException( @@ -146,6 +148,7 @@ public void deleteById(String id) { "The resource ID '%s' is not valid. Missing path segment 'linkedStorageAccounts'.", id))); } + StorageType storageType = StorageType.fromString(storageTypeLocal); this.deleteWithResponse(resourceGroupName, resourceName, storageType, Context.NONE); } @@ -165,8 +168,8 @@ public Response deleteByIdWithResponse(String id, Context context) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); } - StorageType storageType = StorageType.fromString(Utils.getValueFromIdByName(id, "linkedStorageAccounts")); - if (storageType == null) { + String storageTypeLocal = Utils.getValueFromIdByName(id, "linkedStorageAccounts"); + if (storageTypeLocal == null) { throw LOGGER .logExceptionAsError( new IllegalArgumentException( @@ -175,6 +178,7 @@ public Response deleteByIdWithResponse(String id, Context context) { "The resource ID '%s' is not valid. Missing path segment 'linkedStorageAccounts'.", id))); } + StorageType storageType = StorageType.fromString(storageTypeLocal); return this.deleteWithResponse(resourceGroupName, resourceName, storageType, context); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusClientImpl.java index 9e6a71b5f26f..addf0343a301 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusClientImpl.java @@ -51,7 +51,7 @@ public final class ComponentQuotaStatusClientImpl implements ComponentQuotaStatu */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") - private interface ComponentQuotaStatusService { + public interface ComponentQuotaStatusService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" @@ -186,14 +186,16 @@ private Mono getAsync(String resou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @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 an Application Insights component daily data volume cap status. + * @return an Application Insights component daily data volume cap status along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentQuotaStatusInner get(String resourceGroupName, String resourceName) { - return getAsync(resourceGroupName, resourceName).block(); + public Response getWithResponse( + String resourceGroupName, String resourceName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** @@ -201,15 +203,13 @@ public ApplicationInsightsComponentQuotaStatusInner get(String resourceGroupName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component daily data volume cap status along with {@link Response}. + * @return an Application Insights component daily data volume cap status. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, context).block(); + public ApplicationInsightsComponentQuotaStatusInner get(String resourceGroupName, String resourceName) { + return getWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusImpl.java index afff0fb0d107..6bab8ad35f65 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentQuotaStatusImpl.java @@ -27,15 +27,6 @@ public ComponentQuotaStatusImpl( this.serviceManager = serviceManager; } - public ApplicationInsightsComponentQuotaStatus get(String resourceGroupName, String resourceName) { - ApplicationInsightsComponentQuotaStatusInner inner = this.serviceClient().get(resourceGroupName, resourceName); - if (inner != null) { - return new ApplicationInsightsComponentQuotaStatusImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String resourceName, Context context) { Response inner = @@ -51,6 +42,15 @@ public Response getWithResponse( } } + public ApplicationInsightsComponentQuotaStatus get(String resourceGroupName, String resourceName) { + ApplicationInsightsComponentQuotaStatusInner inner = this.serviceClient().get(resourceGroupName, resourceName); + if (inner != null) { + return new ApplicationInsightsComponentQuotaStatusImpl(inner, this.manager()); + } else { + return null; + } + } + private ComponentQuotaStatusClient serviceClient() { return this.innerClient; } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsClientImpl.java index b1cb815f3010..7c9e786dd8bd 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsClientImpl.java @@ -64,7 +64,7 @@ public final class ComponentsClientImpl implements ComponentsClient { */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") - private interface ComponentsService { + public interface ComponentsService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Insights/components") @ExpectedResponses({200}) @@ -632,13 +632,15 @@ private Mono deleteAsync(String resourceGroupName, String resourceName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName) { - deleteAsync(resourceGroupName, resourceName).block(); + public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** @@ -646,15 +648,13 @@ public void delete(String resourceGroupName, String resourceName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); + public void delete(String resourceGroupName, String resourceName) { + deleteWithResponse(resourceGroupName, resourceName, Context.NONE); } /** @@ -777,14 +777,16 @@ private Mono getByResourceGroupAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @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 an Application Insights component definition. + * @return an Application Insights component definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentInner getByResourceGroup(String resourceGroupName, String resourceName) { - return getByResourceGroupAsync(resourceGroupName, resourceName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** @@ -792,16 +794,14 @@ public ApplicationInsightsComponentInner getByResourceGroup(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @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 an Application Insights component definition along with {@link Response}. + * @return an Application Insights component definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); + public ApplicationInsightsComponentInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } /** @@ -949,15 +949,19 @@ private Mono createOrUpdateAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param insightProperties Properties that need to be specified to create an Application Insights component. + * @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 an Application Insights component definition. + * @return an Application Insights component definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentInner createOrUpdate( - String resourceGroupName, String resourceName, ApplicationInsightsComponentInner insightProperties) { - return createOrUpdateAsync(resourceGroupName, resourceName, insightProperties).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String resourceName, + ApplicationInsightsComponentInner insightProperties, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, insightProperties, context).block(); } /** @@ -967,19 +971,15 @@ public ApplicationInsightsComponentInner createOrUpdate( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param insightProperties Properties that need to be specified to create an Application Insights component. - * @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 an Application Insights component definition along with {@link Response}. + * @return an Application Insights component definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentInner insightProperties, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, insightProperties, context).block(); + public ApplicationInsightsComponentInner createOrUpdate( + String resourceGroupName, String resourceName, ApplicationInsightsComponentInner insightProperties) { + return createOrUpdateWithResponse(resourceGroupName, resourceName, insightProperties, Context.NONE).getValue(); } /** @@ -1118,15 +1118,16 @@ private Mono updateTagsAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param componentTags Updated tag information to set into the component instance. + * @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 an Application Insights component definition. + * @return an Application Insights component definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentInner updateTags( - String resourceGroupName, String resourceName, TagsResource componentTags) { - return updateTagsAsync(resourceGroupName, resourceName, componentTags).block(); + public Response updateTagsWithResponse( + String resourceGroupName, String resourceName, TagsResource componentTags, Context context) { + return updateTagsWithResponseAsync(resourceGroupName, resourceName, componentTags, context).block(); } /** @@ -1135,16 +1136,15 @@ public ApplicationInsightsComponentInner updateTags( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param componentTags Updated tag information to set into the component instance. - * @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 an Application Insights component definition along with {@link Response}. + * @return an Application Insights component definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateTagsWithResponse( - String resourceGroupName, String resourceName, TagsResource componentTags, Context context) { - return updateTagsWithResponseAsync(resourceGroupName, resourceName, componentTags, context).block(); + public ApplicationInsightsComponentInner updateTags( + String resourceGroupName, String resourceName, TagsResource componentTags) { + return updateTagsWithResponse(resourceGroupName, resourceName, componentTags, Context.NONE).getValue(); } /** @@ -1153,7 +1153,10 @@ public Response updateTagsWithResponse( *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch * the execution of purge requests by sending a single command whose predicate includes all user identities that * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. + * a purge request to verify that the results are expected. Note: this operation is intended for Classic resources, + * for workspace-based Application Insights resource please run purge operation (directly on the + * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific + * resource id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. @@ -1215,7 +1218,10 @@ private Mono> purgeWithResponseAsync( *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch * the execution of purge requests by sending a single command whose predicate includes all user identities that * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. + * a purge request to verify that the results are expected. Note: this operation is intended for Classic resources, + * for workspace-based Application Insights resource please run purge operation (directly on the + * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific + * resource id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. @@ -1275,7 +1281,10 @@ private Mono> purgeWithResponseAsync( *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch * the execution of purge requests by sending a single command whose predicate includes all user identities that * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. + * a purge request to verify that the results are expected. Note: this operation is intended for Classic resources, + * for workspace-based Application Insights resource please run purge operation (directly on the + * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific + * resource id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. @@ -1298,19 +1307,24 @@ private Mono purgeAsync( *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch * the execution of purge requests by sending a single command whose predicate includes all user identities that * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. + * a purge request to verify that the results are expected. Note: this operation is intended for Classic resources, + * for workspace-based Application Insights resource please run purge operation (directly on the + * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific + * resource id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param body Describes the body of a request to purge data in a single table of an Application Insights component. + * @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 containing operationId for a specific purge action. + * @return response containing operationId for a specific purge action along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentPurgeResponseInner purge(String resourceGroupName, String resourceName, ComponentPurgeBody body) { - return purgeAsync(resourceGroupName, resourceName, body).block(); + public Response purgeWithResponse( + String resourceGroupName, String resourceName, ComponentPurgeBody body, Context context) { + return purgeWithResponseAsync(resourceGroupName, resourceName, body, context).block(); } /** @@ -1319,21 +1333,22 @@ public ComponentPurgeResponseInner purge(String resourceGroupName, String resour *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch * the execution of purge requests by sending a single command whose predicate includes all user identities that * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. + * a purge request to verify that the results are expected. Note: this operation is intended for Classic resources, + * for workspace-based Application Insights resource please run purge operation (directly on the + * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific + * resource id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param body Describes the body of a request to purge data in a single table of an Application Insights component. - * @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 containing operationId for a specific purge action along with {@link Response}. + * @return response containing operationId for a specific purge action. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response purgeWithResponse( - String resourceGroupName, String resourceName, ComponentPurgeBody body, Context context) { - return purgeWithResponseAsync(resourceGroupName, resourceName, body, context).block(); + public ComponentPurgeResponseInner purge(String resourceGroupName, String resourceName, ComponentPurgeBody body) { + return purgeWithResponse(resourceGroupName, resourceName, body, Context.NONE).getValue(); } /** @@ -1468,15 +1483,16 @@ private Mono getPurgeStatusAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. + * @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 status for an ongoing purge operation. + * @return status for an ongoing purge operation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentPurgeStatusResponseInner getPurgeStatus( - String resourceGroupName, String resourceName, String purgeId) { - return getPurgeStatusAsync(resourceGroupName, resourceName, purgeId).block(); + public Response getPurgeStatusWithResponse( + String resourceGroupName, String resourceName, String purgeId, Context context) { + return getPurgeStatusWithResponseAsync(resourceGroupName, resourceName, purgeId, context).block(); } /** @@ -1485,22 +1501,22 @@ public ComponentPurgeStatusResponseInner getPurgeStatus( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. - * @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 status for an ongoing purge operation along with {@link Response}. + * @return status for an ongoing purge operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPurgeStatusWithResponse( - String resourceGroupName, String resourceName, String purgeId, Context context) { - return getPurgeStatusWithResponseAsync(resourceGroupName, resourceName, purgeId, context).block(); + public ComponentPurgeStatusResponseInner getPurgeStatus( + String resourceGroupName, String resourceName, String purgeId) { + return getPurgeStatusWithResponse(resourceGroupName, resourceName, purgeId, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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. @@ -1536,7 +1552,8 @@ private Mono> listNextSinglePag /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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. @@ -1574,7 +1591,8 @@ private Mono> listNextSinglePag /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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. @@ -1612,7 +1630,8 @@ private Mono> listByResourceGro /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsImpl.java index 569604d13325..0e025ca8ed65 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ComponentsImpl.java @@ -55,22 +55,13 @@ public PagedIterable listByResourceGroup(String re return Utils.mapPage(inner, inner1 -> new ApplicationInsightsComponentImpl(inner1, this.manager())); } - public void deleteByResourceGroup(String resourceGroupName, String resourceName) { - this.serviceClient().delete(resourceGroupName, resourceName); - } - - public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { + public Response deleteByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, context); } - public ApplicationInsightsComponent getByResourceGroup(String resourceGroupName, String resourceName) { - ApplicationInsightsComponentInner inner = - this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); - if (inner != null) { - return new ApplicationInsightsComponentImpl(inner, this.manager()); - } else { - return null; - } + public void deleteByResourceGroup(String resourceGroupName, String resourceName) { + this.serviceClient().delete(resourceGroupName, resourceName); } public Response getByResourceGroupWithResponse( @@ -88,10 +79,11 @@ public Response getByResourceGroupWithResponse( } } - public ComponentPurgeResponse purge(String resourceGroupName, String resourceName, ComponentPurgeBody body) { - ComponentPurgeResponseInner inner = this.serviceClient().purge(resourceGroupName, resourceName, body); + public ApplicationInsightsComponent getByResourceGroup(String resourceGroupName, String resourceName) { + ApplicationInsightsComponentInner inner = + this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); if (inner != null) { - return new ComponentPurgeResponseImpl(inner, this.manager()); + return new ApplicationInsightsComponentImpl(inner, this.manager()); } else { return null; } @@ -112,11 +104,10 @@ public Response purgeWithResponse( } } - public ComponentPurgeStatusResponse getPurgeStatus(String resourceGroupName, String resourceName, String purgeId) { - ComponentPurgeStatusResponseInner inner = - this.serviceClient().getPurgeStatus(resourceGroupName, resourceName, purgeId); + public ComponentPurgeResponse purge(String resourceGroupName, String resourceName, ComponentPurgeBody body) { + ComponentPurgeResponseInner inner = this.serviceClient().purge(resourceGroupName, resourceName, body); if (inner != null) { - return new ComponentPurgeStatusResponseImpl(inner, this.manager()); + return new ComponentPurgeResponseImpl(inner, this.manager()); } else { return null; } @@ -137,6 +128,16 @@ public Response getPurgeStatusWithResponse( } } + public ComponentPurgeStatusResponse getPurgeStatus(String resourceGroupName, String resourceName, String purgeId) { + ComponentPurgeStatusResponseInner inner = + this.serviceClient().getPurgeStatus(resourceGroupName, resourceName, purgeId); + if (inner != null) { + return new ComponentPurgeStatusResponseImpl(inner, this.manager()); + } else { + return null; + } + } + public ApplicationInsightsComponent getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { @@ -191,7 +192,7 @@ public void deleteById(String id) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); } - this.deleteWithResponse(resourceGroupName, resourceName, Context.NONE); + this.deleteByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { @@ -210,7 +211,7 @@ public Response deleteByIdWithResponse(String id, Context context) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'components'.", id))); } - return this.deleteWithResponse(resourceGroupName, resourceName, context); + return this.deleteByResourceGroupWithResponse(resourceGroupName, resourceName, context); } private ComponentsClient serviceClient() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsClientImpl.java index 07a9cfd6213f..a70e130839c0 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsClientImpl.java @@ -57,7 +57,7 @@ public final class ExportConfigurationsClientImpl implements ExportConfiguration */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") - private interface ExportConfigurationsService { + public interface ExportConfigurationsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" @@ -259,15 +259,17 @@ private Mono> listAsy * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Continuous Export configuration of an Application Insights component. + * @return a list of Continuous Export configuration of an Application Insights component along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public List list( - String resourceGroupName, String resourceName) { - return listAsync(resourceGroupName, resourceName).block(); + public Response> listWithResponse( + String resourceGroupName, String resourceName, Context context) { + return listWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** @@ -275,17 +277,15 @@ public List list( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Continuous Export configuration of an Application Insights component along with {@link - * Response}. + * @return a list of Continuous Export configuration of an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> listWithResponse( - String resourceGroupName, String resourceName, Context context) { - return listWithResponseAsync(resourceGroupName, resourceName, context).block(); + public List list( + String resourceGroupName, String resourceName) { + return listWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } /** @@ -433,15 +433,19 @@ private Mono> createA * @param resourceName The name of the Application Insights component resource. * @param exportProperties Properties that need to be specified to create a Continuous Export configuration of a * Application Insights component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Continuous Export configurations. + * @return a list of Continuous Export configurations along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public List create( - String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties) { - return createAsync(resourceGroupName, resourceName, exportProperties).block(); + public Response> createWithResponse( + String resourceGroupName, + String resourceName, + ApplicationInsightsComponentExportRequest exportProperties, + Context context) { + return createWithResponseAsync(resourceGroupName, resourceName, exportProperties, context).block(); } /** @@ -451,19 +455,15 @@ public List create( * @param resourceName The name of the Application Insights component resource. * @param exportProperties Properties that need to be specified to create a Continuous Export configuration of a * Application Insights component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Continuous Export configurations along with {@link Response}. + * @return a list of Continuous Export configurations. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> createWithResponse( - String resourceGroupName, - String resourceName, - ApplicationInsightsComponentExportRequest exportProperties, - Context context) { - return createWithResponseAsync(resourceGroupName, resourceName, exportProperties, context).block(); + public List create( + String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties) { + return createWithResponse(resourceGroupName, resourceName, exportProperties, Context.NONE).getValue(); } /** @@ -598,15 +598,16 @@ private Mono deleteAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. + * @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 properties that define a Continuous Export configuration. + * @return properties that define a Continuous Export configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentExportConfigurationInner delete( - String resourceGroupName, String resourceName, String exportId) { - return deleteAsync(resourceGroupName, resourceName, exportId).block(); + public Response deleteWithResponse( + String resourceGroupName, String resourceName, String exportId, Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, exportId, context).block(); } /** @@ -615,16 +616,15 @@ public ApplicationInsightsComponentExportConfigurationInner delete( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @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 properties that define a Continuous Export configuration along with {@link Response}. + * @return properties that define a Continuous Export configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String exportId, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, exportId, context).block(); + public ApplicationInsightsComponentExportConfigurationInner delete( + String resourceGroupName, String resourceName, String exportId) { + return deleteWithResponse(resourceGroupName, resourceName, exportId, Context.NONE).getValue(); } /** @@ -759,15 +759,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Continuous Export configuration for this export id. + * @return the Continuous Export configuration for this export id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentExportConfigurationInner get( - String resourceGroupName, String resourceName, String exportId) { - return getAsync(resourceGroupName, resourceName, exportId).block(); + public Response getWithResponse( + String resourceGroupName, String resourceName, String exportId, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, exportId, context).block(); } /** @@ -776,16 +777,15 @@ public ApplicationInsightsComponentExportConfigurationInner get( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Continuous Export configuration for this export id along with {@link Response}. + * @return the Continuous Export configuration for this export id. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, String exportId, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, exportId, context).block(); + public ApplicationInsightsComponentExportConfigurationInner get( + String resourceGroupName, String resourceName, String exportId) { + return getWithResponse(resourceGroupName, resourceName, exportId, Context.NONE).getValue(); } /** @@ -948,18 +948,20 @@ private Mono updateAsync( * @param resourceName The name of the Application Insights component resource. * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. * @param exportProperties Properties that need to be specified to update the Continuous Export configuration. + * @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 properties that define a Continuous Export configuration. + * @return properties that define a Continuous Export configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentExportConfigurationInner update( + public Response updateWithResponse( String resourceGroupName, String resourceName, String exportId, - ApplicationInsightsComponentExportRequest exportProperties) { - return updateAsync(resourceGroupName, resourceName, exportId, exportProperties).block(); + ApplicationInsightsComponentExportRequest exportProperties, + Context context) { + return updateWithResponseAsync(resourceGroupName, resourceName, exportId, exportProperties, context).block(); } /** @@ -969,19 +971,17 @@ public ApplicationInsightsComponentExportConfigurationInner update( * @param resourceName The name of the Application Insights component resource. * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. * @param exportProperties Properties that need to be specified to update the Continuous Export configuration. - * @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 properties that define a Continuous Export configuration along with {@link Response}. + * @return properties that define a Continuous Export configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( + public ApplicationInsightsComponentExportConfigurationInner update( String resourceGroupName, String resourceName, String exportId, - ApplicationInsightsComponentExportRequest exportProperties, - Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, exportId, exportProperties, context).block(); + ApplicationInsightsComponentExportRequest exportProperties) { + return updateWithResponse(resourceGroupName, resourceName, exportId, exportProperties, Context.NONE).getValue(); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsImpl.java index af7c175f633a..ca429849613c 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ExportConfigurationsImpl.java @@ -31,21 +31,6 @@ public ExportConfigurationsImpl( this.serviceManager = serviceManager; } - public List list(String resourceGroupName, String resourceName) { - List inner = - this.serviceClient().list(resourceGroupName, resourceName); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new ApplicationInsightsComponentExportConfigurationImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - public Response> listWithResponse( String resourceGroupName, String resourceName, Context context) { Response> inner = @@ -65,10 +50,9 @@ public Response> listWithR } } - public List create( - String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties) { + public List list(String resourceGroupName, String resourceName) { List inner = - this.serviceClient().create(resourceGroupName, resourceName, exportProperties); + this.serviceClient().list(resourceGroupName, resourceName); if (inner != null) { return Collections .unmodifiableList( @@ -103,14 +87,19 @@ public Response> createWit } } - public ApplicationInsightsComponentExportConfiguration delete( - String resourceGroupName, String resourceName, String exportId) { - ApplicationInsightsComponentExportConfigurationInner inner = - this.serviceClient().delete(resourceGroupName, resourceName, exportId); + public List create( + String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties) { + List inner = + this.serviceClient().create(resourceGroupName, resourceName, exportProperties); if (inner != null) { - return new ApplicationInsightsComponentExportConfigurationImpl(inner, this.manager()); + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new ApplicationInsightsComponentExportConfigurationImpl(inner1, this.manager())) + .collect(Collectors.toList())); } else { - return null; + return Collections.emptyList(); } } @@ -129,10 +118,10 @@ public Response deleteWithRespo } } - public ApplicationInsightsComponentExportConfiguration get( + public ApplicationInsightsComponentExportConfiguration delete( String resourceGroupName, String resourceName, String exportId) { ApplicationInsightsComponentExportConfigurationInner inner = - this.serviceClient().get(resourceGroupName, resourceName, exportId); + this.serviceClient().delete(resourceGroupName, resourceName, exportId); if (inner != null) { return new ApplicationInsightsComponentExportConfigurationImpl(inner, this.manager()); } else { @@ -155,13 +144,10 @@ public Response getWithResponse } } - public ApplicationInsightsComponentExportConfiguration update( - String resourceGroupName, - String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties) { + public ApplicationInsightsComponentExportConfiguration get( + String resourceGroupName, String resourceName, String exportId) { ApplicationInsightsComponentExportConfigurationInner inner = - this.serviceClient().update(resourceGroupName, resourceName, exportId, exportProperties); + this.serviceClient().get(resourceGroupName, resourceName, exportId); if (inner != null) { return new ApplicationInsightsComponentExportConfigurationImpl(inner, this.manager()); } else { @@ -190,6 +176,20 @@ public Response updateWithRespo } } + public ApplicationInsightsComponentExportConfiguration update( + String resourceGroupName, + String resourceName, + String exportId, + ApplicationInsightsComponentExportRequest exportProperties) { + ApplicationInsightsComponentExportConfigurationInner inner = + this.serviceClient().update(resourceGroupName, resourceName, exportId, exportProperties); + if (inner != null) { + return new ApplicationInsightsComponentExportConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + private ExportConfigurationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesClientImpl.java index 2f315dae742c..109e7c5eb7aa 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesClientImpl.java @@ -25,13 +25,13 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.serializer.CollectionFormat; -import com.azure.core.util.serializer.JacksonAdapter; import com.azure.resourcemanager.applicationinsights.fluent.FavoritesClient; import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFavoriteInner; import com.azure.resourcemanager.applicationinsights.models.FavoriteSourceType; import com.azure.resourcemanager.applicationinsights.models.FavoriteType; import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in FavoritesClient. */ @@ -59,7 +59,7 @@ public final class FavoritesClientImpl implements FavoritesClient { */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") - private interface FavoritesService { + public interface FavoritesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" @@ -192,7 +192,9 @@ private Mono>> listWith final String apiVersion = "2015-05-01"; final String accept = "application/json"; String tagsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); + (tags == null) + ? null + : tags.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); return FluxUtil .withContext( context -> @@ -261,7 +263,9 @@ private Mono>> listWith final String apiVersion = "2015-05-01"; final String accept = "application/json"; String tagsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); + (tags == null) + ? null + : tags.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); context = this.client.mergeContext(context); return service .list( @@ -278,35 +282,6 @@ private Mono>> listWith context); } - /** - * Gets a list of favorites defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param favoriteType The type of favorite. Value can be either shared or user. - * @param sourceType Source type of favorite to return. When left out, the source type defaults to 'other' (not - * present in this enum). - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable favorite. If - * false, only return summary content for favorites. - * @param tags Tags that must be present on each favorite returned. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of favorites defined within an Application Insights component on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listAsync( - String resourceGroupName, - String resourceName, - FavoriteType favoriteType, - FavoriteSourceType sourceType, - Boolean canFetchContent, - List tags) { - return listWithResponseAsync(resourceGroupName, resourceName, favoriteType, sourceType, canFetchContent, tags) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - /** * Gets a list of favorites defined within an Application Insights component. * @@ -329,25 +304,6 @@ private Mono> listAsync( .flatMap(res -> Mono.justOrEmpty(res.getValue())); } - /** - * Gets a list of favorites defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of favorites defined within an Application Insights component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public List list(String resourceGroupName, String resourceName) { - final FavoriteType favoriteType = null; - final FavoriteSourceType sourceType = null; - final Boolean canFetchContent = null; - final List tags = null; - return listAsync(resourceGroupName, resourceName, favoriteType, sourceType, canFetchContent, tags).block(); - } - /** * Gets a list of favorites defined within an Application Insights component. * @@ -379,6 +335,27 @@ public Response> listWithRespons .block(); } + /** + * Gets a list of favorites defined within an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of favorites defined within an Application Insights component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List list(String resourceGroupName, String resourceName) { + final FavoriteType favoriteType = null; + final FavoriteSourceType sourceType = null; + final Boolean canFetchContent = null; + final List tags = null; + return listWithResponse( + resourceGroupName, resourceName, favoriteType, sourceType, canFetchContent, tags, Context.NONE) + .getValue(); + } + /** * Get a single favorite by its FavoriteId, defined within an Application Insights component. * @@ -512,15 +489,17 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single favorite by its FavoriteId, defined within an Application Insights component. + * @return a single favorite by its FavoriteId, defined within an Application Insights component along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentFavoriteInner get( - String resourceGroupName, String resourceName, String favoriteId) { - return getAsync(resourceGroupName, resourceName, favoriteId).block(); + public Response getWithResponse( + String resourceGroupName, String resourceName, String favoriteId, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, favoriteId, context).block(); } /** @@ -529,17 +508,15 @@ public ApplicationInsightsComponentFavoriteInner get( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single favorite by its FavoriteId, defined within an Application Insights component along with {@link - * Response}. + * @return a single favorite by its FavoriteId, defined within an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, String favoriteId, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, favoriteId, context).block(); + public ApplicationInsightsComponentFavoriteInner get( + String resourceGroupName, String resourceName, String favoriteId) { + return getWithResponse(resourceGroupName, resourceName, favoriteId, Context.NONE).getValue(); } /** @@ -707,18 +684,21 @@ private Mono addAsync( * @param favoriteId The Id of a specific favorite defined in the Application Insights component. * @param favoriteProperties Properties that need to be specified to create a new favorite and add it to an * Application Insights component. + * @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 properties that define a favorite that is associated to an Application Insights component. + * @return properties that define a favorite that is associated to an Application Insights component along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentFavoriteInner add( + public Response addWithResponse( String resourceGroupName, String resourceName, String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties) { - return addAsync(resourceGroupName, resourceName, favoriteId, favoriteProperties).block(); + ApplicationInsightsComponentFavoriteInner favoriteProperties, + Context context) { + return addWithResponseAsync(resourceGroupName, resourceName, favoriteId, favoriteProperties, context).block(); } /** @@ -729,21 +709,19 @@ public ApplicationInsightsComponentFavoriteInner add( * @param favoriteId The Id of a specific favorite defined in the Application Insights component. * @param favoriteProperties Properties that need to be specified to create a new favorite and add it to an * Application Insights component. - * @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 properties that define a favorite that is associated to an Application Insights component along with - * {@link Response}. + * @return properties that define a favorite that is associated to an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response addWithResponse( + public ApplicationInsightsComponentFavoriteInner add( String resourceGroupName, String resourceName, String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties, - Context context) { - return addWithResponseAsync(resourceGroupName, resourceName, favoriteId, favoriteProperties, context).block(); + ApplicationInsightsComponentFavoriteInner favoriteProperties) { + return addWithResponse(resourceGroupName, resourceName, favoriteId, favoriteProperties, Context.NONE) + .getValue(); } /** @@ -907,18 +885,22 @@ private Mono updateAsync( * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component. * @param favoriteProperties Properties that need to be specified to update the existing favorite. + * @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 properties that define a favorite that is associated to an Application Insights component. + * @return properties that define a favorite that is associated to an Application Insights component along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentFavoriteInner update( + public Response updateWithResponse( String resourceGroupName, String resourceName, String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties) { - return updateAsync(resourceGroupName, resourceName, favoriteId, favoriteProperties).block(); + ApplicationInsightsComponentFavoriteInner favoriteProperties, + Context context) { + return updateWithResponseAsync(resourceGroupName, resourceName, favoriteId, favoriteProperties, context) + .block(); } /** @@ -928,22 +910,19 @@ public ApplicationInsightsComponentFavoriteInner update( * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component. * @param favoriteProperties Properties that need to be specified to update the existing favorite. - * @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 properties that define a favorite that is associated to an Application Insights component along with - * {@link Response}. + * @return properties that define a favorite that is associated to an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( + public ApplicationInsightsComponentFavoriteInner update( String resourceGroupName, String resourceName, String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties, - Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, favoriteId, favoriteProperties, context) - .block(); + ApplicationInsightsComponentFavoriteInner favoriteProperties) { + return updateWithResponse(resourceGroupName, resourceName, favoriteId, favoriteProperties, Context.NONE) + .getValue(); } /** @@ -1070,13 +1049,16 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String favoriteId) { - deleteAsync(resourceGroupName, resourceName, favoriteId).block(); + public Response deleteWithResponse( + String resourceGroupName, String resourceName, String favoriteId, Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, favoriteId, context).block(); } /** @@ -1085,15 +1067,12 @@ public void delete(String resourceGroupName, String resourceName, String favorit * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String favoriteId, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, favoriteId, context).block(); + public void delete(String resourceGroupName, String resourceName, String favoriteId) { + deleteWithResponse(resourceGroupName, resourceName, favoriteId, Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesImpl.java index d2e48b9a0085..5a84099e1e89 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/FavoritesImpl.java @@ -32,21 +32,6 @@ public FavoritesImpl( this.serviceManager = serviceManager; } - public List list(String resourceGroupName, String resourceName) { - List inner = - this.serviceClient().list(resourceGroupName, resourceName); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new ApplicationInsightsComponentFavoriteImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - public Response> listWithResponse( String resourceGroupName, String resourceName, @@ -75,13 +60,18 @@ public Response> listWithResponse( } } - public ApplicationInsightsComponentFavorite get(String resourceGroupName, String resourceName, String favoriteId) { - ApplicationInsightsComponentFavoriteInner inner = - this.serviceClient().get(resourceGroupName, resourceName, favoriteId); + public List list(String resourceGroupName, String resourceName) { + List inner = + this.serviceClient().list(resourceGroupName, resourceName); if (inner != null) { - return new ApplicationInsightsComponentFavoriteImpl(inner, this.manager()); + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new ApplicationInsightsComponentFavoriteImpl(inner1, this.manager())) + .collect(Collectors.toList())); } else { - return null; + return Collections.emptyList(); } } @@ -100,13 +90,9 @@ public Response getWithResponse( } } - public ApplicationInsightsComponentFavorite add( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties) { + public ApplicationInsightsComponentFavorite get(String resourceGroupName, String resourceName, String favoriteId) { ApplicationInsightsComponentFavoriteInner inner = - this.serviceClient().add(resourceGroupName, resourceName, favoriteId, favoriteProperties); + this.serviceClient().get(resourceGroupName, resourceName, favoriteId); if (inner != null) { return new ApplicationInsightsComponentFavoriteImpl(inner, this.manager()); } else { @@ -135,13 +121,13 @@ public Response addWithResponse( } } - public ApplicationInsightsComponentFavorite update( + public ApplicationInsightsComponentFavorite add( String resourceGroupName, String resourceName, String favoriteId, ApplicationInsightsComponentFavoriteInner favoriteProperties) { ApplicationInsightsComponentFavoriteInner inner = - this.serviceClient().update(resourceGroupName, resourceName, favoriteId, favoriteProperties); + this.serviceClient().add(resourceGroupName, resourceName, favoriteId, favoriteProperties); if (inner != null) { return new ApplicationInsightsComponentFavoriteImpl(inner, this.manager()); } else { @@ -170,8 +156,18 @@ public Response updateWithResponse( } } - public void delete(String resourceGroupName, String resourceName, String favoriteId) { - this.serviceClient().delete(resourceGroupName, resourceName, favoriteId); + public ApplicationInsightsComponentFavorite update( + String resourceGroupName, + String resourceName, + String favoriteId, + ApplicationInsightsComponentFavoriteInner favoriteProperties) { + ApplicationInsightsComponentFavoriteInner inner = + this.serviceClient().update(resourceGroupName, resourceName, favoriteId, favoriteProperties); + if (inner != null) { + return new ApplicationInsightsComponentFavoriteImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -179,6 +175,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, favoriteId, context); } + public void delete(String resourceGroupName, String resourceName, String favoriteId) { + this.serviceClient().delete(resourceGroupName, resourceName, favoriteId); + } + private FavoritesClient serviceClient() { return this.innerClient; } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokensClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokensClientImpl.java index 07592501abf7..0c0e5a423e4d 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokensClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokensClientImpl.java @@ -50,7 +50,7 @@ public final class LiveTokensClientImpl implements LiveTokensClient { */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") - private interface LiveTokensService { + public interface LiveTokensService { @Headers({"Content-Type: application/json"}) @Post("/{resourceUri}/providers/Microsoft.Insights/generatelivetoken") @ExpectedResponses({200}) @@ -135,28 +135,28 @@ private Mono getAsync(String resourceUri) { * **Gets an access token for live metrics stream data.**. * * @param resourceUri The identifier of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to a live token query. + * @return the response to a live token query along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LiveTokenResponseInner get(String resourceUri) { - return getAsync(resourceUri).block(); + public Response getWithResponse(String resourceUri, Context context) { + return getWithResponseAsync(resourceUri, context).block(); } /** * **Gets an access token for live metrics stream data.**. * * @param resourceUri The identifier of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to a live token query along with {@link Response}. + * @return the response to a live token query. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceUri, Context context) { - return getWithResponseAsync(resourceUri, context).block(); + public LiveTokenResponseInner get(String resourceUri) { + return getWithResponse(resourceUri, Context.NONE).getValue(); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokensImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokensImpl.java index 741ffacf1910..1b150364bbad 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokensImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/LiveTokensImpl.java @@ -27,15 +27,6 @@ public LiveTokensImpl( this.serviceManager = serviceManager; } - public LiveTokenResponse get(String resourceUri) { - LiveTokenResponseInner inner = this.serviceClient().get(resourceUri); - if (inner != null) { - return new LiveTokenResponseImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String resourceUri, Context context) { Response inner = this.serviceClient().getWithResponse(resourceUri, context); if (inner != null) { @@ -49,6 +40,15 @@ public Response getWithResponse(String resourceUri, Context c } } + public LiveTokenResponse get(String resourceUri) { + LiveTokenResponseInner inner = this.serviceClient().get(resourceUri); + if (inner != null) { + return new LiveTokenResponseImpl(inner, this.manager()); + } else { + return null; + } + } + private LiveTokensClient serviceClient() { return this.innerClient; } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksClientImpl.java index 8018a3743646..23f428bb2695 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksClientImpl.java @@ -28,14 +28,14 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.serializer.CollectionFormat; -import com.azure.core.util.serializer.JacksonAdapter; import com.azure.resourcemanager.applicationinsights.fluent.MyWorkbooksClient; import com.azure.resourcemanager.applicationinsights.fluent.models.MyWorkbookInner; import com.azure.resourcemanager.applicationinsights.models.CategoryType; import com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException; import com.azure.resourcemanager.applicationinsights.models.MyWorkbooksListResult; import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in MyWorkbooksClient. */ @@ -63,7 +63,7 @@ public final class MyWorkbooksClientImpl implements MyWorkbooksClient { */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") - private interface MyWorkbooksService { + public interface MyWorkbooksService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights" @@ -221,7 +221,9 @@ private Mono> listByResourceGroupSinglePageAsync( final String apiVersion = "2021-03-08"; final String accept = "application/json"; String tagsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); + (tags == null) + ? null + : tags.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); return FluxUtil .withContext( context -> @@ -295,7 +297,9 @@ private Mono> listByResourceGroupSinglePageAsync( final String apiVersion = "2021-03-08"; final String accept = "application/json"; String tagsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); + (tags == null) + ? null + : tags.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); context = this.client.mergeContext(context); return service .listByResourceGroup( @@ -477,7 +481,9 @@ private Mono> listSinglePageAsync( final String apiVersion = "2021-03-08"; final String accept = "application/json"; String tagsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); + (tags == null) + ? null + : tags.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); return FluxUtil .withContext( context -> @@ -538,7 +544,9 @@ private Mono> listSinglePageAsync( final String apiVersion = "2021-03-08"; final String accept = "application/json"; String tagsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); + (tags == null) + ? null + : tags.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); context = this.client.mergeContext(context); return service .list( @@ -778,14 +786,16 @@ private Mono getByResourceGroupAsync(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName. + * @return a single private workbook by its resourceName along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MyWorkbookInner getByResourceGroup(String resourceGroupName, String resourceName) { - return getByResourceGroupAsync(resourceGroupName, resourceName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** @@ -793,16 +803,14 @@ public MyWorkbookInner getByResourceGroup(String resourceGroupName, String resou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName along with {@link Response}. + * @return a single private workbook by its resourceName. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); + public MyWorkbookInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } /** @@ -920,13 +928,15 @@ private Mono deleteAsync(String resourceGroupName, String resourceName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName) { - deleteAsync(resourceGroupName, resourceName).block(); + public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** @@ -934,15 +944,13 @@ public void delete(String resourceGroupName, String resourceName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); + public void delete(String resourceGroupName, String resourceName) { + deleteWithResponse(resourceGroupName, resourceName, Context.NONE); } /** @@ -1073,7 +1081,6 @@ private Mono> createOrUpdateWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1081,7 +1088,8 @@ private Mono> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( - String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties, String sourceId) { + String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties) { + final String sourceId = null; return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1092,17 +1100,22 @@ private Mono createOrUpdateAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workbookProperties Properties that need to be specified to create a new private workbook. + * @param sourceId Azure Resource Id that will fetch all linked workbooks. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition on successful completion of {@link Mono}. + * @return an Application Insights private workbook definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties) { - final String sourceId = null; - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String resourceName, + MyWorkbookInner workbookProperties, + String sourceId, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId, context) + .block(); } /** @@ -1120,31 +1133,8 @@ private Mono createOrUpdateAsync( public MyWorkbookInner createOrUpdate( String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties) { final String sourceId = null; - return createOrUpdateAsync(resourceGroupName, resourceName, workbookProperties, sourceId).block(); - } - - /** - * Create a new private workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String resourceName, - MyWorkbookInner workbookProperties, - String sourceId, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId, context) - .block(); + return createOrUpdateWithResponse(resourceGroupName, resourceName, workbookProperties, sourceId, Context.NONE) + .getValue(); } /** @@ -1275,7 +1265,6 @@ private Mono> updateWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1283,7 +1272,8 @@ private Mono> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( - String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties, String sourceId) { + String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties) { + final String sourceId = null; return updateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1294,17 +1284,21 @@ private Mono updateAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workbookProperties Properties that need to be specified to create a new private workbook. + * @param sourceId Azure Resource Id that will fetch all linked workbooks. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition on successful completion of {@link Mono}. + * @return an Application Insights private workbook definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties) { - final String sourceId = null; - return updateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response updateWithResponse( + String resourceGroupName, + String resourceName, + MyWorkbookInner workbookProperties, + String sourceId, + Context context) { + return updateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId, context).block(); } /** @@ -1321,36 +1315,15 @@ private Mono updateAsync( @ServiceMethod(returns = ReturnType.SINGLE) public MyWorkbookInner update(String resourceGroupName, String resourceName, MyWorkbookInner workbookProperties) { final String sourceId = null; - return updateAsync(resourceGroupName, resourceName, workbookProperties, sourceId).block(); - } - - /** - * Updates a private workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookProperties Properties that need to be specified to create a new private workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights private workbook definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String resourceName, - MyWorkbookInner workbookProperties, - String sourceId, - Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId, context).block(); + return updateWithResponse(resourceGroupName, resourceName, workbookProperties, sourceId, Context.NONE) + .getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1386,7 +1359,8 @@ private Mono> listByResourceGroupNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorDefinitionException thrown if the request is rejected by server. @@ -1423,7 +1397,8 @@ private Mono> listByResourceGroupNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1459,7 +1434,8 @@ private Mono> listBySubscriptionNextSinglePageAsy /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ErrorDefinitionException thrown if the request is rejected by server. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksImpl.java index cd7c5517cb29..21f0ed3a7796 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/MyWorkbooksImpl.java @@ -60,15 +60,6 @@ public PagedIterable list( return Utils.mapPage(inner, inner1 -> new MyWorkbookImpl(inner1, this.manager())); } - public MyWorkbook getByResourceGroup(String resourceGroupName, String resourceName) { - MyWorkbookInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); - if (inner != null) { - return new MyWorkbookImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String resourceName, Context context) { Response inner = @@ -84,14 +75,24 @@ public Response getByResourceGroupWithResponse( } } - public void deleteByResourceGroup(String resourceGroupName, String resourceName) { - this.serviceClient().delete(resourceGroupName, resourceName); + public MyWorkbook getByResourceGroup(String resourceGroupName, String resourceName) { + MyWorkbookInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); + if (inner != null) { + return new MyWorkbookImpl(inner, this.manager()); + } else { + return null; + } } - public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { + public Response deleteByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, context); } + public void deleteByResourceGroup(String resourceGroupName, String resourceName) { + this.serviceClient().delete(resourceGroupName, resourceName); + } + public MyWorkbook getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { @@ -146,7 +147,7 @@ public void deleteById(String id) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'myWorkbooks'.", id))); } - this.deleteWithResponse(resourceGroupName, resourceName, Context.NONE); + this.deleteByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { @@ -165,7 +166,7 @@ public Response deleteByIdWithResponse(String id, Context context) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'myWorkbooks'.", id))); } - return this.deleteWithResponse(resourceGroupName, resourceName, context); + return this.deleteByResourceGroupWithResponse(resourceGroupName, resourceName, context); } private MyWorkbooksClient serviceClient() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsClientImpl.java index f966c1406737..d9de6f397a5e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/OperationsClientImpl.java @@ -55,7 +55,7 @@ public final class OperationsClientImpl implements OperationsClient { */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") - private interface OperationsService { + public interface OperationsService { @Headers({"Content-Type: application/json"}) @Get("/providers/Microsoft.Insights/operations") @ExpectedResponses({200}) @@ -82,8 +82,8 @@ Mono> listNext( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list CDN operations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return result of the request to list Azure Workbooks operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -93,7 +93,7 @@ private Mono> listSinglePageAsync() { new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2015-05-01"; + final String apiVersion = "2021-03-08"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) @@ -116,8 +116,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list CDN operations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return result of the request to list Azure Workbooks operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -127,7 +127,7 @@ private Mono> listSinglePageAsync(Context context) new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2015-05-01"; + final String apiVersion = "2021-03-08"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -148,7 +148,7 @@ private Mono> listSinglePageAsync(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 result of the request to list CDN operations as paginated response with {@link PagedFlux}. + * @return result of the request to list Azure Workbooks operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -162,7 +162,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list CDN operations as paginated response with {@link PagedFlux}. + * @return result of the request to list Azure Workbooks operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -175,7 +175,8 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list CDN operations as paginated response with {@link PagedIterable}. + * @return result of the request to list Azure Workbooks operations as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -189,7 +190,8 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list CDN operations as paginated response with {@link PagedIterable}. + * @return result of the request to list Azure Workbooks operations as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -199,12 +201,13 @@ public PagedIterable list(Context context) { /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 the request to list CDN operations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return result of the request to list Azure Workbooks operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -235,13 +238,14 @@ private Mono> listNextSinglePageAsync(String nextL /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 the request to list CDN operations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return result of the request to list Azure Workbooks operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsClientImpl.java index 3265fad36195..1d04def42103 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsClientImpl.java @@ -59,7 +59,7 @@ public final class ProactiveDetectionConfigurationsClientImpl implements Proacti */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") - private interface ProactiveDetectionConfigurationsService { + public interface ProactiveDetectionConfigurationsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" @@ -230,15 +230,17 @@ private Mono list( - String resourceGroupName, String resourceName) { - return listAsync(resourceGroupName, resourceName).block(); + public Response> listWithResponse( + String resourceGroupName, String resourceName, Context context) { + return listWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** @@ -246,17 +248,15 @@ public List li * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of ProactiveDetection configurations of an Application Insights component along with {@link - * Response}. + * @return a list of ProactiveDetection configurations of an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> listWithResponse( - String resourceGroupName, String resourceName, Context context) { - return listWithResponseAsync(resourceGroupName, resourceName, context).block(); + public List list( + String resourceGroupName, String resourceName) { + return listWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } /** @@ -397,15 +397,16 @@ private Mono g * @param resourceName The name of the Application Insights component resource. * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights * component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the ProactiveDetection configuration for this configuration id. + * @return the ProactiveDetection configuration for this configuration id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentProactiveDetectionConfigurationInner get( - String resourceGroupName, String resourceName, String configurationId) { - return getAsync(resourceGroupName, resourceName, configurationId).block(); + public Response getWithResponse( + String resourceGroupName, String resourceName, String configurationId, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, configurationId, context).block(); } /** @@ -415,16 +416,15 @@ public ApplicationInsightsComponentProactiveDetectionConfigurationInner get( * @param resourceName The name of the Application Insights component resource. * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights * component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the ProactiveDetection configuration for this configuration id along with {@link Response}. + * @return the ProactiveDetection configuration for this configuration id. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, String configurationId, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, configurationId, context).block(); + public ApplicationInsightsComponentProactiveDetectionConfigurationInner get( + String resourceGroupName, String resourceName, String configurationId) { + return getWithResponse(resourceGroupName, resourceName, configurationId, Context.NONE).getValue(); } /** @@ -601,18 +601,22 @@ private Mono u * component. * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection * configuration. + * @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 properties that define a ProactiveDetection configuration. + * @return properties that define a ProactiveDetection configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInsightsComponentProactiveDetectionConfigurationInner update( + public Response updateWithResponse( String resourceGroupName, String resourceName, String configurationId, - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties) { - return updateAsync(resourceGroupName, resourceName, configurationId, proactiveDetectionProperties).block(); + ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, + Context context) { + return updateWithResponseAsync( + resourceGroupName, resourceName, configurationId, proactiveDetectionProperties, context) + .block(); } /** @@ -624,21 +628,19 @@ public ApplicationInsightsComponentProactiveDetectionConfigurationInner update( * component. * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection * configuration. - * @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 properties that define a ProactiveDetection configuration along with {@link Response}. + * @return properties that define a ProactiveDetection configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( + public ApplicationInsightsComponentProactiveDetectionConfigurationInner update( String resourceGroupName, String resourceName, String configurationId, - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, - Context context) { - return updateWithResponseAsync( - resourceGroupName, resourceName, configurationId, proactiveDetectionProperties, context) - .block(); + ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties) { + return updateWithResponse( + resourceGroupName, resourceName, configurationId, proactiveDetectionProperties, Context.NONE) + .getValue(); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsImpl.java index ce828f58959d..dcdd4512ed42 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/ProactiveDetectionConfigurationsImpl.java @@ -30,25 +30,6 @@ public ProactiveDetectionConfigurationsImpl( this.serviceManager = serviceManager; } - public List list( - String resourceGroupName, String resourceName) { - List inner = - this.serviceClient().list(resourceGroupName, resourceName); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map( - inner1 -> - new ApplicationInsightsComponentProactiveDetectionConfigurationImpl( - inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - public Response> listWithResponse( String resourceGroupName, String resourceName, Context context) { Response> inner = @@ -70,14 +51,22 @@ public Response list( + String resourceGroupName, String resourceName) { + List inner = + this.serviceClient().list(resourceGroupName, resourceName); if (inner != null) { - return new ApplicationInsightsComponentProactiveDetectionConfigurationImpl(inner, this.manager()); + return Collections + .unmodifiableList( + inner + .stream() + .map( + inner1 -> + new ApplicationInsightsComponentProactiveDetectionConfigurationImpl( + inner1, this.manager())) + .collect(Collectors.toList())); } else { - return null; + return Collections.emptyList(); } } @@ -96,13 +85,10 @@ public Response get } } - public ApplicationInsightsComponentProactiveDetectionConfiguration update( - String resourceGroupName, - String resourceName, - String configurationId, - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties) { + public ApplicationInsightsComponentProactiveDetectionConfiguration get( + String resourceGroupName, String resourceName, String configurationId) { ApplicationInsightsComponentProactiveDetectionConfigurationInner inner = - this.serviceClient().update(resourceGroupName, resourceName, configurationId, proactiveDetectionProperties); + this.serviceClient().get(resourceGroupName, resourceName, configurationId); if (inner != null) { return new ApplicationInsightsComponentProactiveDetectionConfigurationImpl(inner, this.manager()); } else { @@ -132,6 +118,20 @@ public Response upd } } + public ApplicationInsightsComponentProactiveDetectionConfiguration update( + String resourceGroupName, + String resourceName, + String configurationId, + ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties) { + ApplicationInsightsComponentProactiveDetectionConfigurationInner inner = + this.serviceClient().update(resourceGroupName, resourceName, configurationId, proactiveDetectionProperties); + if (inner != null) { + return new ApplicationInsightsComponentProactiveDetectionConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + private ProactiveDetectionConfigurationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestImpl.java index 73aa68849eb9..98b9d33f6327 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestImpl.java @@ -12,6 +12,8 @@ import com.azure.resourcemanager.applicationinsights.models.WebTestGeolocation; import com.azure.resourcemanager.applicationinsights.models.WebTestKind; import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesConfiguration; +import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesRequest; +import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesValidationRules; import java.util.Collections; import java.util.List; import java.util.Map; @@ -99,6 +101,14 @@ public String provisioningState() { return this.innerModel().provisioningState(); } + public WebTestPropertiesRequest request() { + return this.innerModel().request(); + } + + public WebTestPropertiesValidationRules validationRules() { + return this.innerModel().validationRules(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -285,6 +295,16 @@ public WebTestImpl withConfiguration(WebTestPropertiesConfiguration configuratio return this; } + public WebTestImpl withRequest(WebTestPropertiesRequest request) { + this.innerModel().withRequest(request); + return this; + } + + public WebTestImpl withValidationRules(WebTestPropertiesValidationRules validationRules) { + this.innerModel().withValidationRules(validationRules); + return this; + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestLocationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestLocationsClientImpl.java index 1940a8807619..2db40f27ae0d 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestLocationsClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestLocationsClientImpl.java @@ -55,7 +55,7 @@ public final class WebTestLocationsClientImpl implements WebTestLocationsClient */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") - private interface WebTestLocationsService { + public interface WebTestLocationsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsClientImpl.java index faa0d9358d4f..06dcfe69e3a4 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsClientImpl.java @@ -59,7 +59,7 @@ public final class WebTestsClientImpl implements WebTestsClient { */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") - private interface WebTestsService { + public interface WebTestsService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests") @ExpectedResponses({200}) @@ -191,13 +191,13 @@ Mono> listByComponentNext( } /** - * Get all Application Insights web tests defined within a specified resource group. + * Get all Application Insights web tests defined for 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined within a specified resource group along with {@link + * @return all Application Insights web tests defined for the specified resource group along with {@link * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -218,7 +218,7 @@ private Mono> listByResourceGroupSinglePageAsync(Str new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2015-05-01"; + final String apiVersion = "2022-06-15"; final String accept = "application/json"; return FluxUtil .withContext( @@ -244,14 +244,14 @@ private Mono> listByResourceGroupSinglePageAsync(Str } /** - * Get all Application Insights web tests defined within a specified resource group. + * Get all Application Insights web tests defined for 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. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined within a specified resource group along with {@link + * @return all Application Insights web tests defined for the specified resource group along with {@link * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -273,7 +273,7 @@ private Mono> listByResourceGroupSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2015-05-01"; + final String apiVersion = "2022-06-15"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -296,13 +296,13 @@ private Mono> listByResourceGroupSinglePageAsync( } /** - * Get all Application Insights web tests defined within a specified resource group. + * Get all Application Insights web tests defined for 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined within a specified resource group as paginated response with + * @return all Application Insights web tests defined for the specified resource group as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -313,14 +313,14 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNam } /** - * Get all Application Insights web tests defined within a specified resource group. + * Get all Application Insights web tests defined for 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. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined within a specified resource group as paginated response with + * @return all Application Insights web tests defined for the specified resource group as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -331,13 +331,13 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNam } /** - * Get all Application Insights web tests defined within a specified resource group. + * Get all Application Insights web tests defined for 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined within a specified resource group as paginated response with + * @return all Application Insights web tests defined for the specified resource group as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -346,14 +346,14 @@ public PagedIterable listByResourceGroup(String resourceGroupName) } /** - * Get all Application Insights web tests defined within a specified resource group. + * Get all Application Insights web tests defined for 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. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined within a specified resource group as paginated response with + * @return all Application Insights web tests defined for the specified resource group as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -365,7 +365,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName, * Get a specific Application Insights web test definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -394,7 +394,7 @@ private Mono> getByResourceGroupWithResponseAsync( if (webTestName == null) { return Mono.error(new IllegalArgumentException("Parameter webTestName is required and cannot be null.")); } - final String apiVersion = "2015-05-01"; + final String apiVersion = "2022-06-15"; final String accept = "application/json"; return FluxUtil .withContext( @@ -415,7 +415,7 @@ private Mono> getByResourceGroupWithResponseAsync( * Get a specific Application Insights web test definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. * @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. @@ -445,7 +445,7 @@ private Mono> getByResourceGroupWithResponseAsync( if (webTestName == null) { return Mono.error(new IllegalArgumentException("Parameter webTestName is required and cannot be null.")); } - final String apiVersion = "2015-05-01"; + final String apiVersion = "2022-06-15"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -463,7 +463,7 @@ private Mono> getByResourceGroupWithResponseAsync( * Get a specific Application Insights web test definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -479,46 +479,46 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Str * Get a specific Application Insights web test definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Application Insights web test definition. + * @return a specific Application Insights web test definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WebTestInner getByResourceGroup(String resourceGroupName, String webTestName) { - return getByResourceGroupAsync(resourceGroupName, webTestName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String webTestName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, webTestName, context).block(); } /** * Get a specific Application Insights web test definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param context The context to associate with this operation. + * @param webTestName The name of the Application Insights WebTest resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Application Insights web test definition along with {@link Response}. + * @return a specific Application Insights web test definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String webTestName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, webTestName, context).block(); + public WebTestInner getByResourceGroup(String resourceGroupName, String webTestName) { + return getByResourceGroupWithResponse(resourceGroupName, webTestName, Context.NONE).getValue(); } /** * Creates or updates an Application Insights web test definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. * @param webTestDefinition Properties that need to be specified to create or update an Application Insights web * test definition. * @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 an Application Insights web test definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return an Application Insights WebTest definition along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -548,7 +548,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { webTestDefinition.validate(); } - final String apiVersion = "2015-05-01"; + final String apiVersion = "2022-06-15"; final String accept = "application/json"; return FluxUtil .withContext( @@ -570,15 +570,15 @@ private Mono> createOrUpdateWithResponseAsync( * Creates or updates an Application Insights web test definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. * @param webTestDefinition Properties that need to be specified to create or update an Application Insights web * test definition. * @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 an Application Insights web test definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return an Application Insights WebTest definition along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -608,7 +608,7 @@ private Mono> createOrUpdateWithResponseAsync( } else { webTestDefinition.validate(); } - final String apiVersion = "2015-05-01"; + final String apiVersion = "2022-06-15"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -627,13 +627,13 @@ private Mono> createOrUpdateWithResponseAsync( * Creates or updates an Application Insights web test definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. * @param webTestDefinition Properties that need to be specified to create or update an Application Insights web * test definition. * @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 an Application Insights web test definition on successful completion of {@link Mono}. + * @return an Application Insights WebTest definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -646,49 +646,49 @@ private Mono createOrUpdateAsync( * Creates or updates an Application Insights web test definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. * @param webTestDefinition Properties that need to be specified to create or update an Application Insights web * test definition. + * @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 an Application Insights web test definition. + * @return an Application Insights WebTest definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WebTestInner createOrUpdate(String resourceGroupName, String webTestName, WebTestInner webTestDefinition) { - return createOrUpdateAsync(resourceGroupName, webTestName, webTestDefinition).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, String webTestName, WebTestInner webTestDefinition, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, webTestName, webTestDefinition, context).block(); } /** * Creates or updates an Application Insights web test definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. * @param webTestDefinition Properties that need to be specified to create or update an Application Insights web * test definition. - * @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 an Application Insights web test definition along with {@link Response}. + * @return an Application Insights WebTest definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String webTestName, WebTestInner webTestDefinition, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, webTestName, webTestDefinition, context).block(); + public WebTestInner createOrUpdate(String resourceGroupName, String webTestName, WebTestInner webTestDefinition) { + return createOrUpdateWithResponse(resourceGroupName, webTestName, webTestDefinition, Context.NONE).getValue(); } /** - * Creates or updates an Application Insights web test definition. + * Updates the tags associated with an Application Insights web test. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestTags Updated tag information to set into the web test instance. + * @param webTestName The name of the Application Insights WebTest resource. + * @param webTestTags Updated tag information to associate with the web test resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights web test definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return an Application Insights WebTest definition along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateTagsWithResponseAsync( @@ -717,7 +717,7 @@ private Mono> updateTagsWithResponseAsync( } else { webTestTags.validate(); } - final String apiVersion = "2015-05-01"; + final String apiVersion = "2022-06-15"; final String accept = "application/json"; return FluxUtil .withContext( @@ -736,17 +736,17 @@ private Mono> updateTagsWithResponseAsync( } /** - * Creates or updates an Application Insights web test definition. + * Updates the tags associated with an Application Insights web test. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestTags Updated tag information to set into the web test instance. + * @param webTestName The name of the Application Insights WebTest resource. + * @param webTestTags Updated tag information to associate with the web test resource. * @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 an Application Insights web test definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return an Application Insights WebTest definition along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateTagsWithResponseAsync( @@ -775,7 +775,7 @@ private Mono> updateTagsWithResponseAsync( } else { webTestTags.validate(); } - final String apiVersion = "2015-05-01"; + final String apiVersion = "2022-06-15"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -791,15 +791,15 @@ private Mono> updateTagsWithResponseAsync( } /** - * Creates or updates an Application Insights web test definition. + * Updates the tags associated with an Application Insights web test. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestTags Updated tag information to set into the web test instance. + * @param webTestName The name of the Application Insights WebTest resource. + * @param webTestTags Updated tag information to associate with the web test resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights web test definition on successful completion of {@link Mono}. + * @return an Application Insights WebTest definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateTagsAsync(String resourceGroupName, String webTestName, TagsResource webTestTags) { @@ -808,44 +808,44 @@ private Mono updateTagsAsync(String resourceGroupName, String webT } /** - * Creates or updates an Application Insights web test definition. + * Updates the tags associated with an Application Insights web test. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestTags Updated tag information to set into the web test instance. + * @param webTestName The name of the Application Insights WebTest resource. + * @param webTestTags Updated tag information to associate with the web test resource. + * @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 an Application Insights web test definition. + * @return an Application Insights WebTest definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WebTestInner updateTags(String resourceGroupName, String webTestName, TagsResource webTestTags) { - return updateTagsAsync(resourceGroupName, webTestName, webTestTags).block(); + public Response updateTagsWithResponse( + String resourceGroupName, String webTestName, TagsResource webTestTags, Context context) { + return updateTagsWithResponseAsync(resourceGroupName, webTestName, webTestTags, context).block(); } /** - * Creates or updates an Application Insights web test definition. + * Updates the tags associated with an Application Insights web test. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param webTestTags Updated tag information to set into the web test instance. - * @param context The context to associate with this operation. + * @param webTestName The name of the Application Insights WebTest resource. + * @param webTestTags Updated tag information to associate with the web test resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights web test definition along with {@link Response}. + * @return an Application Insights WebTest definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateTagsWithResponse( - String resourceGroupName, String webTestName, TagsResource webTestTags, Context context) { - return updateTagsWithResponseAsync(resourceGroupName, webTestName, webTestTags, context).block(); + public WebTestInner updateTags(String resourceGroupName, String webTestName, TagsResource webTestTags) { + return updateTagsWithResponse(resourceGroupName, webTestName, webTestTags, Context.NONE).getValue(); } /** * Deletes an Application Insights web test. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -872,7 +872,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (webTestName == null) { return Mono.error(new IllegalArgumentException("Parameter webTestName is required and cannot be null.")); } - final String apiVersion = "2015-05-01"; + final String apiVersion = "2022-06-15"; return FluxUtil .withContext( context -> @@ -891,7 +891,7 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * Deletes an Application Insights web test. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. * @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. @@ -920,7 +920,7 @@ private Mono> deleteWithResponseAsync( if (webTestName == null) { return Mono.error(new IllegalArgumentException("Parameter webTestName is required and cannot be null.")); } - final String apiVersion = "2015-05-01"; + final String apiVersion = "2022-06-15"; context = this.client.mergeContext(context); return service .delete( @@ -936,7 +936,7 @@ private Mono> deleteWithResponseAsync( * Deletes an Application Insights web test. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -951,38 +951,38 @@ private Mono deleteAsync(String resourceGroupName, String webTestName) { * Deletes an Application Insights web test. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String webTestName) { - deleteAsync(resourceGroupName, webTestName).block(); + public Response deleteWithResponse(String resourceGroupName, String webTestName, Context context) { + return deleteWithResponseAsync(resourceGroupName, webTestName, context).block(); } /** * Deletes an Application Insights web test. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param context The context to associate with this operation. + * @param webTestName The name of the Application Insights WebTest resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String webTestName, Context context) { - return deleteWithResponseAsync(resourceGroupName, webTestName, context).block(); + public void delete(String resourceGroupName, String webTestName) { + deleteWithResponse(resourceGroupName, webTestName, Context.NONE); } /** - * Get all Application Insights web test alerts definitions within a subscription. + * Get all Application Insights web test definitions for 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 all Application Insights web test alerts definitions within a subscription along with {@link + * @return all Application Insights web test definitions for the specified subscription along with {@link * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -999,7 +999,7 @@ private Mono> listSinglePageAsync() { new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2015-05-01"; + final String apiVersion = "2022-06-15"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1019,13 +1019,13 @@ private Mono> listSinglePageAsync() { } /** - * Get all Application Insights web test alerts definitions within a subscription. + * Get all Application Insights web test definitions for 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web test alerts definitions within a subscription along with {@link + * @return all Application Insights web test definitions for the specified subscription along with {@link * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1042,7 +1042,7 @@ private Mono> listSinglePageAsync(Context context) { new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2015-05-01"; + final String apiVersion = "2022-06-15"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1059,11 +1059,11 @@ private Mono> listSinglePageAsync(Context context) { } /** - * Get all Application Insights web test alerts definitions within a subscription. + * Get all Application Insights web test definitions for 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 all Application Insights web test alerts definitions within a subscription as paginated response with + * @return all Application Insights web test definitions for the specified subscription as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -1072,13 +1072,13 @@ private PagedFlux listAsync() { } /** - * Get all Application Insights web test alerts definitions within a subscription. + * Get all Application Insights web test definitions for 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web test alerts definitions within a subscription as paginated response with + * @return all Application Insights web test definitions for the specified subscription as paginated response with * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -1088,11 +1088,11 @@ private PagedFlux listAsync(Context context) { } /** - * Get all Application Insights web test alerts definitions within a subscription. + * Get all Application Insights web test definitions for 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 all Application Insights web test alerts definitions within a subscription as paginated response with + * @return all Application Insights web test definitions for the specified subscription as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -1101,13 +1101,13 @@ public PagedIterable list() { } /** - * Get all Application Insights web test alerts definitions within a subscription. + * Get all Application Insights web test definitions for 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web test alerts definitions within a subscription as paginated response with + * @return all Application Insights web test definitions for the specified subscription as paginated response with * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) @@ -1148,7 +1148,7 @@ private Mono> listByComponentSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2015-05-01"; + final String apiVersion = "2022-06-15"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1208,7 +1208,7 @@ private Mono> listByComponentSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2015-05-01"; + final String apiVersion = "2022-06-15"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1306,11 +1306,12 @@ public PagedIterable listByComponent( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 a list of 0 or more Application Insights web test definitions along with {@link PagedResponse} on + * @return a list of 0 or more Application Insights WebTest definitions along with {@link PagedResponse} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1343,12 +1344,13 @@ private Mono> listByResourceGroupNextSinglePageAsync /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 a list of 0 or more Application Insights web test definitions along with {@link PagedResponse} on + * @return a list of 0 or more Application Insights WebTest definitions along with {@link PagedResponse} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1380,11 +1382,12 @@ private Mono> listByResourceGroupNextSinglePageAsync /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 a list of 0 or more Application Insights web test definitions along with {@link PagedResponse} on + * @return a list of 0 or more Application Insights WebTest definitions along with {@link PagedResponse} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1416,12 +1419,13 @@ private Mono> listNextSinglePageAsync(String nextLin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 a list of 0 or more Application Insights web test definitions along with {@link PagedResponse} on + * @return a list of 0 or more Application Insights WebTest definitions along with {@link PagedResponse} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1453,11 +1457,12 @@ private Mono> listNextSinglePageAsync(String nextLin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 a list of 0 or more Application Insights web test definitions along with {@link PagedResponse} on + * @return a list of 0 or more Application Insights WebTest definitions along with {@link PagedResponse} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1489,12 +1494,13 @@ private Mono> listByComponentNextSinglePageAsync(Str /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

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 a list of 0 or more Application Insights web test definitions along with {@link PagedResponse} on + * @return a list of 0 or more Application Insights WebTest definitions along with {@link PagedResponse} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsImpl.java index 5ba72b8e5271..d9470ae44761 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WebTestsImpl.java @@ -38,15 +38,6 @@ public PagedIterable listByResourceGroup(String resourceGroupName, Cont return Utils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); } - public WebTest getByResourceGroup(String resourceGroupName, String webTestName) { - WebTestInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, webTestName); - if (inner != null) { - return new WebTestImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String webTestName, Context context) { Response inner = @@ -62,14 +53,24 @@ public Response getByResourceGroupWithResponse( } } - public void deleteByResourceGroup(String resourceGroupName, String webTestName) { - this.serviceClient().delete(resourceGroupName, webTestName); + public WebTest getByResourceGroup(String resourceGroupName, String webTestName) { + WebTestInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, webTestName); + if (inner != null) { + return new WebTestImpl(inner, this.manager()); + } else { + return null; + } } - public Response deleteWithResponse(String resourceGroupName, String webTestName, Context context) { + public Response deleteByResourceGroupWithResponse( + String resourceGroupName, String webTestName, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, webTestName, context); } + public void deleteByResourceGroup(String resourceGroupName, String webTestName) { + this.serviceClient().delete(resourceGroupName, webTestName); + } + public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); return Utils.mapPage(inner, inner1 -> new WebTestImpl(inner1, this.manager())); @@ -145,7 +146,7 @@ public void deleteById(String id) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'webtests'.", id))); } - this.deleteWithResponse(resourceGroupName, webTestName, Context.NONE); + this.deleteByResourceGroupWithResponse(resourceGroupName, webTestName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { @@ -164,7 +165,7 @@ public Response deleteByIdWithResponse(String id, Context context) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'webtests'.", id))); } - return this.deleteWithResponse(resourceGroupName, webTestName, context); + return this.deleteByResourceGroupWithResponse(resourceGroupName, webTestName, context); } private WebTestsClient serviceClient() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsClientImpl.java index 9766e1f2e26d..1164501ca30d 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsClientImpl.java @@ -62,7 +62,7 @@ public final class WorkItemConfigurationsClientImpl implements WorkItemConfigura */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") - private interface WorkItemConfigurationsService { + public interface WorkItemConfigurationsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components" @@ -482,15 +482,20 @@ private Mono createAsync( * @param resourceName The name of the Application Insights component resource. * @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration * of a Application Insights component. + * @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 work item configuration associated with an application insights resource. + * @return work item configuration associated with an application insights resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkItemConfigurationInner create( - String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties) { - return createAsync(resourceGroupName, resourceName, workItemConfigurationProperties).block(); + public Response createWithResponse( + String resourceGroupName, + String resourceName, + WorkItemCreateConfiguration workItemConfigurationProperties, + Context context) { + return createWithResponseAsync(resourceGroupName, resourceName, workItemConfigurationProperties, context) + .block(); } /** @@ -500,20 +505,16 @@ public WorkItemConfigurationInner create( * @param resourceName The name of the Application Insights component resource. * @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration * of a Application Insights component. - * @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 work item configuration associated with an application insights resource along with {@link Response}. + * @return work item configuration associated with an application insights resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String resourceName, - WorkItemCreateConfiguration workItemConfigurationProperties, - Context context) { - return createWithResponseAsync(resourceGroupName, resourceName, workItemConfigurationProperties, context) - .block(); + public WorkItemConfigurationInner create( + String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties) { + return createWithResponse(resourceGroupName, resourceName, workItemConfigurationProperties, Context.NONE) + .getValue(); } /** @@ -635,14 +636,16 @@ private Mono getDefaultAsync(String resourceGroupNam * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @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 default work item configurations that exist for the application. + * @return default work item configurations that exist for the application along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkItemConfigurationInner getDefault(String resourceGroupName, String resourceName) { - return getDefaultAsync(resourceGroupName, resourceName).block(); + public Response getDefaultWithResponse( + String resourceGroupName, String resourceName, Context context) { + return getDefaultWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** @@ -650,16 +653,14 @@ public WorkItemConfigurationInner getDefault(String resourceGroupName, String re * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @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 default work item configurations that exist for the application along with {@link Response}. + * @return default work item configurations that exist for the application. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDefaultWithResponse( - String resourceGroupName, String resourceName, Context context) { - return getDefaultWithResponseAsync(resourceGroupName, resourceName, context).block(); + public WorkItemConfigurationInner getDefault(String resourceGroupName, String resourceName) { + return getDefaultWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } /** @@ -793,13 +794,16 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St * @param resourceName The name of the Application Insights component resource. * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as * defined in connector configuration. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String workItemConfigId) { - deleteAsync(resourceGroupName, resourceName, workItemConfigId).block(); + public Response deleteWithResponse( + String resourceGroupName, String resourceName, String workItemConfigId, Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, workItemConfigId, context).block(); } /** @@ -809,16 +813,13 @@ public void delete(String resourceGroupName, String resourceName, String workIte * @param resourceName The name of the Application Insights component resource. * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as * defined in connector configuration. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String resourceName, String workItemConfigId, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, workItemConfigId, context).block(); + public void delete(String resourceGroupName, String resourceName, String workItemConfigId) { + deleteWithResponse(resourceGroupName, resourceName, workItemConfigId, Context.NONE); } /** @@ -960,14 +961,16 @@ private Mono getItemAsync( * @param resourceName The name of the Application Insights component resource. * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as * defined in connector configuration. + * @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 specified work item configuration for an Application Insights component. + * @return specified work item configuration for an Application Insights component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkItemConfigurationInner getItem(String resourceGroupName, String resourceName, String workItemConfigId) { - return getItemAsync(resourceGroupName, resourceName, workItemConfigId).block(); + public Response getItemWithResponse( + String resourceGroupName, String resourceName, String workItemConfigId, Context context) { + return getItemWithResponseAsync(resourceGroupName, resourceName, workItemConfigId, context).block(); } /** @@ -977,16 +980,14 @@ public WorkItemConfigurationInner getItem(String resourceGroupName, String resou * @param resourceName The name of the Application Insights component resource. * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as * defined in connector configuration. - * @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 specified work item configuration for an Application Insights component along with {@link Response}. + * @return specified work item configuration for an Application Insights component. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getItemWithResponse( - String resourceGroupName, String resourceName, String workItemConfigId, Context context) { - return getItemWithResponseAsync(resourceGroupName, resourceName, workItemConfigId, context).block(); + public WorkItemConfigurationInner getItem(String resourceGroupName, String resourceName, String workItemConfigId) { + return getItemWithResponse(resourceGroupName, resourceName, workItemConfigId, Context.NONE).getValue(); } /** @@ -1165,18 +1166,21 @@ private Mono updateItemAsync( * defined in connector configuration. * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration * for this Application Insights component. + * @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 work item configuration associated with an application insights resource. + * @return work item configuration associated with an application insights resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkItemConfigurationInner updateItem( + public Response updateItemWithResponse( String resourceGroupName, String resourceName, String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties) { - return updateItemAsync(resourceGroupName, resourceName, workItemConfigId, workItemConfigurationProperties) + WorkItemCreateConfiguration workItemConfigurationProperties, + Context context) { + return updateItemWithResponseAsync( + resourceGroupName, resourceName, workItemConfigId, workItemConfigurationProperties, context) .block(); } @@ -1189,21 +1193,19 @@ public WorkItemConfigurationInner updateItem( * defined in connector configuration. * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration * for this Application Insights component. - * @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 work item configuration associated with an application insights resource along with {@link Response}. + * @return work item configuration associated with an application insights resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateItemWithResponse( + public WorkItemConfigurationInner updateItem( String resourceGroupName, String resourceName, String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties, - Context context) { - return updateItemWithResponseAsync( - resourceGroupName, resourceName, workItemConfigId, workItemConfigurationProperties, context) - .block(); + WorkItemCreateConfiguration workItemConfigurationProperties) { + return updateItemWithResponse( + resourceGroupName, resourceName, workItemConfigId, workItemConfigurationProperties, Context.NONE) + .getValue(); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsImpl.java index 456b0180f62f..e3d43c883456 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkItemConfigurationsImpl.java @@ -40,17 +40,6 @@ public PagedIterable list(String resourceGroupName, Strin return Utils.mapPage(inner, inner1 -> new WorkItemConfigurationImpl(inner1, this.manager())); } - public WorkItemConfiguration create( - String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties) { - WorkItemConfigurationInner inner = - this.serviceClient().create(resourceGroupName, resourceName, workItemConfigurationProperties); - if (inner != null) { - return new WorkItemConfigurationImpl(inner, this.manager()); - } else { - return null; - } - } - public Response createWithResponse( String resourceGroupName, String resourceName, @@ -71,8 +60,10 @@ public Response createWithResponse( } } - public WorkItemConfiguration getDefault(String resourceGroupName, String resourceName) { - WorkItemConfigurationInner inner = this.serviceClient().getDefault(resourceGroupName, resourceName); + public WorkItemConfiguration create( + String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties) { + WorkItemConfigurationInner inner = + this.serviceClient().create(resourceGroupName, resourceName, workItemConfigurationProperties); if (inner != null) { return new WorkItemConfigurationImpl(inner, this.manager()); } else { @@ -95,8 +86,13 @@ public Response getDefaultWithResponse( } } - public void delete(String resourceGroupName, String resourceName, String workItemConfigId) { - this.serviceClient().delete(resourceGroupName, resourceName, workItemConfigId); + public WorkItemConfiguration getDefault(String resourceGroupName, String resourceName) { + WorkItemConfigurationInner inner = this.serviceClient().getDefault(resourceGroupName, resourceName); + if (inner != null) { + return new WorkItemConfigurationImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -104,14 +100,8 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, workItemConfigId, context); } - public WorkItemConfiguration getItem(String resourceGroupName, String resourceName, String workItemConfigId) { - WorkItemConfigurationInner inner = - this.serviceClient().getItem(resourceGroupName, resourceName, workItemConfigId); - if (inner != null) { - return new WorkItemConfigurationImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String resourceName, String workItemConfigId) { + this.serviceClient().delete(resourceGroupName, resourceName, workItemConfigId); } public Response getItemWithResponse( @@ -129,15 +119,9 @@ public Response getItemWithResponse( } } - public WorkItemConfiguration updateItem( - String resourceGroupName, - String resourceName, - String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties) { + public WorkItemConfiguration getItem(String resourceGroupName, String resourceName, String workItemConfigId) { WorkItemConfigurationInner inner = - this - .serviceClient() - .updateItem(resourceGroupName, resourceName, workItemConfigId, workItemConfigurationProperties); + this.serviceClient().getItem(resourceGroupName, resourceName, workItemConfigId); if (inner != null) { return new WorkItemConfigurationImpl(inner, this.manager()); } else { @@ -167,6 +151,22 @@ public Response updateItemWithResponse( } } + public WorkItemConfiguration updateItem( + String resourceGroupName, + String resourceName, + String workItemConfigId, + WorkItemCreateConfiguration workItemConfigurationProperties) { + WorkItemConfigurationInner inner = + this + .serviceClient() + .updateItem(resourceGroupName, resourceName, workItemConfigId, workItemConfigurationProperties); + if (inner != null) { + return new WorkItemConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + private WorkItemConfigurationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesClientImpl.java index 98c605b35ddb..7e15071f793a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesClientImpl.java @@ -60,7 +60,7 @@ public final class WorkbookTemplatesClientImpl implements WorkbookTemplatesClien */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") - private interface WorkbookTemplatesService { + public interface WorkbookTemplatesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights" @@ -414,14 +414,16 @@ private Mono getByResourceGroupAsync(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook template by its resourceName. + * @return a single workbook template by its resourceName along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkbookTemplateInner getByResourceGroup(String resourceGroupName, String resourceName) { - return getByResourceGroupAsync(resourceGroupName, resourceName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** @@ -429,16 +431,14 @@ public WorkbookTemplateInner getByResourceGroup(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook template by its resourceName along with {@link Response}. + * @return a single workbook template by its resourceName. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); + public WorkbookTemplateInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); } /** @@ -556,13 +556,15 @@ private Mono deleteAsync(String resourceGroupName, String resourceName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName) { - deleteAsync(resourceGroupName, resourceName).block(); + public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** @@ -570,15 +572,13 @@ public void delete(String resourceGroupName, String resourceName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); + public void delete(String resourceGroupName, String resourceName) { + deleteWithResponse(resourceGroupName, resourceName, Context.NONE); } /** @@ -726,15 +726,20 @@ private Mono createOrUpdateAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workbookTemplateProperties Properties that need to be specified to create a new workbook. + * @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 an Application Insights workbook template definition. + * @return an Application Insights workbook template definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkbookTemplateInner createOrUpdate( - String resourceGroupName, String resourceName, WorkbookTemplateInner workbookTemplateProperties) { - return createOrUpdateAsync(resourceGroupName, resourceName, workbookTemplateProperties).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String resourceName, + WorkbookTemplateInner workbookTemplateProperties, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateProperties, context) + .block(); } /** @@ -743,20 +748,16 @@ public WorkbookTemplateInner createOrUpdate( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param workbookTemplateProperties Properties that need to be specified to create a new workbook. - * @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 an Application Insights workbook template definition along with {@link Response}. + * @return an Application Insights workbook template definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String resourceName, - WorkbookTemplateInner workbookTemplateProperties, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateProperties, context) - .block(); + public WorkbookTemplateInner createOrUpdate( + String resourceGroupName, String resourceName, WorkbookTemplateInner workbookTemplateProperties) { + return createOrUpdateWithResponse(resourceGroupName, resourceName, workbookTemplateProperties, Context.NONE) + .getValue(); } /** @@ -877,17 +878,14 @@ private Mono> updateWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param workbookTemplateUpdateParameters Properties that need to be specified to patch a workbook template. * @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 an Application Insights workbook template definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String resourceName, - WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters) { + private Mono updateAsync(String resourceGroupName, String resourceName) { + final WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters = null; return updateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateUpdateParameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -897,16 +895,21 @@ private Mono updateAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param workbookTemplateUpdateParameters Properties that need to be specified to patch a workbook template. + * @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 an Application Insights workbook template definition on successful completion of {@link Mono}. + * @return an Application Insights workbook template definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String resourceName) { - final WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters = null; - return updateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateUpdateParameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response updateWithResponse( + String resourceGroupName, + String resourceName, + WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters, + Context context) { + return updateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateUpdateParameters, context) + .block(); } /** @@ -922,28 +925,7 @@ private Mono updateAsync(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) public WorkbookTemplateInner update(String resourceGroupName, String resourceName) { final WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters = null; - return updateAsync(resourceGroupName, resourceName, workbookTemplateUpdateParameters).block(); - } - - /** - * Updates a workbook template that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workbookTemplateUpdateParameters Properties that need to be specified to patch a workbook template. - * @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 an Application Insights workbook template definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String resourceName, - WorkbookTemplateUpdateParameters workbookTemplateUpdateParameters, - Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, workbookTemplateUpdateParameters, context) - .block(); + return updateWithResponse(resourceGroupName, resourceName, workbookTemplateUpdateParameters, Context.NONE) + .getValue(); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesImpl.java index 54d822c3be75..0027da823a57 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbookTemplatesImpl.java @@ -39,15 +39,6 @@ public PagedIterable listByResourceGroup(String resourceGroupN return Utils.mapPage(inner, inner1 -> new WorkbookTemplateImpl(inner1, this.manager())); } - public WorkbookTemplate getByResourceGroup(String resourceGroupName, String resourceName) { - WorkbookTemplateInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); - if (inner != null) { - return new WorkbookTemplateImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String resourceName, Context context) { Response inner = @@ -63,14 +54,24 @@ public Response getByResourceGroupWithResponse( } } - public void deleteByResourceGroup(String resourceGroupName, String resourceName) { - this.serviceClient().delete(resourceGroupName, resourceName); + public WorkbookTemplate getByResourceGroup(String resourceGroupName, String resourceName) { + WorkbookTemplateInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); + if (inner != null) { + return new WorkbookTemplateImpl(inner, this.manager()); + } else { + return null; + } } - public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { + public Response deleteByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, context); } + public void deleteByResourceGroup(String resourceGroupName, String resourceName) { + this.serviceClient().delete(resourceGroupName, resourceName); + } + public WorkbookTemplate getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { @@ -131,7 +132,7 @@ public void deleteById(String id) { .format( "The resource ID '%s' is not valid. Missing path segment 'workbooktemplates'.", id))); } - this.deleteWithResponse(resourceGroupName, resourceName, Context.NONE); + this.deleteByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { @@ -152,7 +153,7 @@ public Response deleteByIdWithResponse(String id, Context context) { .format( "The resource ID '%s' is not valid. Missing path segment 'workbooktemplates'.", id))); } - return this.deleteWithResponse(resourceGroupName, resourceName, context); + return this.deleteByResourceGroupWithResponse(resourceGroupName, resourceName, context); } private WorkbookTemplatesClient serviceClient() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksClientImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksClientImpl.java index 6c82ea7811d1..7d2ffa8c302c 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksClientImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksClientImpl.java @@ -28,8 +28,6 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.serializer.CollectionFormat; -import com.azure.core.util.serializer.JacksonAdapter; import com.azure.resourcemanager.applicationinsights.fluent.WorkbooksClient; import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookInner; import com.azure.resourcemanager.applicationinsights.models.CategoryType; @@ -37,6 +35,8 @@ import com.azure.resourcemanager.applicationinsights.models.WorkbookUpdateParameters; import com.azure.resourcemanager.applicationinsights.models.WorkbooksListResult; import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in WorkbooksClient. */ @@ -64,7 +64,7 @@ public final class WorkbooksClientImpl implements WorkbooksClient { */ @Host("{$host}") @ServiceInterface(name = "ApplicationInsightsM") - private interface WorkbooksService { + public interface WorkbooksService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Insights/workbooks") @ExpectedResponses({200}) @@ -148,7 +148,7 @@ Mono> createOrUpdate( @Patch( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks" + "/{resourceName}") - @ExpectedResponses({201}) + @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(WorkbookErrorDefinitionException.class) Mono> update( @HostParam("$host") String endpoint, @@ -257,7 +257,9 @@ private Mono> listSinglePageAsync( final String apiVersion = "2022-04-01"; final String accept = "application/json"; String tagsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); + (tags == null) + ? null + : tags.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); return FluxUtil .withContext( context -> @@ -318,7 +320,9 @@ private Mono> listSinglePageAsync( final String apiVersion = "2022-04-01"; final String accept = "application/json"; String tagsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); + (tags == null) + ? null + : tags.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); context = this.client.mergeContext(context); return service .list( @@ -479,7 +483,9 @@ private Mono> listByResourceGroupSinglePageAsync( final String apiVersion = "2022-04-01"; final String accept = "application/json"; String tagsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); + (tags == null) + ? null + : tags.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); return FluxUtil .withContext( context -> @@ -553,7 +559,9 @@ private Mono> listByResourceGroupSinglePageAsync( final String apiVersion = "2022-04-01"; final String accept = "application/json"; String tagsConverted = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(tags, CollectionFormat.CSV); + (tags == null) + ? null + : tags.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); context = this.client.mergeContext(context); return service .listByResourceGroup( @@ -810,16 +818,14 @@ private Mono> getByResourceGroupWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a single workbook by its resourceName on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync( - String resourceGroupName, String resourceName, Boolean canFetchContent) { + private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { + final Boolean canFetchContent = null; return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, canFetchContent) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -829,16 +835,18 @@ private Mono getByResourceGroupAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. + * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If + * false, only return summary content for workbooks. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook by its resourceName on successful completion of {@link Mono}. + * @return a single workbook by its resourceName along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { - final Boolean canFetchContent = null; - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, canFetchContent) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Boolean canFetchContent, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, canFetchContent, context).block(); } /** @@ -854,26 +862,8 @@ private Mono getByResourceGroupAsync(String resourceGroupName, St @ServiceMethod(returns = ReturnType.SINGLE) public WorkbookInner getByResourceGroup(String resourceGroupName, String resourceName) { final Boolean canFetchContent = null; - return getByResourceGroupAsync(resourceGroupName, resourceName, canFetchContent).block(); - } - - /** - * Get a single workbook by its resourceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook by its resourceName along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Boolean canFetchContent, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, canFetchContent, context).block(); + return getByResourceGroupWithResponse(resourceGroupName, resourceName, canFetchContent, Context.NONE) + .getValue(); } /** @@ -991,13 +981,15 @@ private Mono deleteAsync(String resourceGroupName, String resourceName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName) { - deleteAsync(resourceGroupName, resourceName).block(); + public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); } /** @@ -1005,15 +997,13 @@ public void delete(String resourceGroupName, String resourceName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); + public void delete(String resourceGroupName, String resourceName) { + deleteWithResponse(resourceGroupName, resourceName, Context.NONE); } /** @@ -1142,7 +1132,6 @@ private Mono> createOrUpdateWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param workbookProperties Properties that need to be specified to create a new workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1150,7 +1139,8 @@ private Mono> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( - String resourceGroupName, String resourceName, WorkbookInner workbookProperties, String sourceId) { + String resourceGroupName, String resourceName, WorkbookInner workbookProperties) { + final String sourceId = null; return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1161,17 +1151,22 @@ private Mono createOrUpdateAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param workbookProperties Properties that need to be specified to create a new workbook. + * @param sourceId Azure Resource Id that will fetch all linked workbooks. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workbook definition on successful completion of {@link Mono}. + * @return a workbook definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String resourceName, WorkbookInner workbookProperties) { - final String sourceId = null; - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String resourceName, + WorkbookInner workbookProperties, + String sourceId, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId, context) + .block(); } /** @@ -1189,31 +1184,8 @@ private Mono createOrUpdateAsync( public WorkbookInner createOrUpdate( String resourceGroupName, String resourceName, WorkbookInner workbookProperties) { final String sourceId = null; - return createOrUpdateAsync(resourceGroupName, resourceName, workbookProperties, sourceId).block(); - } - - /** - * Create a new workbook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. - * @param workbookProperties Properties that need to be specified to create a new workbook. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workbook definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String resourceName, - WorkbookInner workbookProperties, - String sourceId, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, workbookProperties, sourceId, context) - .block(); + return createOrUpdateWithResponse(resourceGroupName, resourceName, workbookProperties, sourceId, Context.NONE) + .getValue(); } /** @@ -1338,19 +1310,15 @@ private Mono> updateWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param workbookUpdateParameters Properties that need to be specified to create a new workbook. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a workbook definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String resourceName, - String sourceId, - WorkbookUpdateParameters workbookUpdateParameters) { + private Mono updateAsync(String resourceGroupName, String resourceName) { + final String sourceId = null; + final WorkbookUpdateParameters workbookUpdateParameters = null; return updateWithResponseAsync(resourceGroupName, resourceName, sourceId, workbookUpdateParameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1360,17 +1328,23 @@ private Mono updateAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. + * @param sourceId Azure Resource Id that will fetch all linked workbooks. + * @param workbookUpdateParameters Properties that need to be specified to create a new workbook. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workbook definition on successful completion of {@link Mono}. + * @return a workbook definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String resourceName) { - final String sourceId = null; - final WorkbookUpdateParameters workbookUpdateParameters = null; - return updateWithResponseAsync(resourceGroupName, resourceName, sourceId, workbookUpdateParameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response updateWithResponse( + String resourceGroupName, + String resourceName, + String sourceId, + WorkbookUpdateParameters workbookUpdateParameters, + Context context) { + return updateWithResponseAsync(resourceGroupName, resourceName, sourceId, workbookUpdateParameters, context) + .block(); } /** @@ -1387,31 +1361,8 @@ private Mono updateAsync(String resourceGroupName, String resourc public WorkbookInner update(String resourceGroupName, String resourceName) { final String sourceId = null; final WorkbookUpdateParameters workbookUpdateParameters = null; - return updateAsync(resourceGroupName, resourceName, sourceId, workbookUpdateParameters).block(); - } - - /** - * Updates a workbook that has already been added. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the resource. - * @param sourceId Azure Resource Id that will fetch all linked workbooks. - * @param workbookUpdateParameters Properties that need to be specified to create a new workbook. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workbook definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String resourceName, - String sourceId, - WorkbookUpdateParameters workbookUpdateParameters, - Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, sourceId, workbookUpdateParameters, context) - .block(); + return updateWithResponse(resourceGroupName, resourceName, sourceId, workbookUpdateParameters, Context.NONE) + .getValue(); } /** @@ -1730,14 +1681,16 @@ private Mono revisionGetAsync(String resourceGroupName, String re * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param revisionId The id of the workbook's revision. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook revision defined by its revisionId. + * @return a single workbook revision defined by its revisionId along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkbookInner revisionGet(String resourceGroupName, String resourceName, String revisionId) { - return revisionGetAsync(resourceGroupName, resourceName, revisionId).block(); + public Response revisionGetWithResponse( + String resourceGroupName, String resourceName, String revisionId, Context context) { + return revisionGetWithResponseAsync(resourceGroupName, resourceName, revisionId, context).block(); } /** @@ -1746,22 +1699,21 @@ public WorkbookInner revisionGet(String resourceGroupName, String resourceName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param revisionId The id of the workbook's revision. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook revision defined by its revisionId along with {@link Response}. + * @return a single workbook revision defined by its revisionId. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response revisionGetWithResponse( - String resourceGroupName, String resourceName, String revisionId, Context context) { - return revisionGetWithResponseAsync(resourceGroupName, resourceName, revisionId, context).block(); + public WorkbookInner revisionGet(String resourceGroupName, String resourceName, String revisionId) { + return revisionGetWithResponse(resourceGroupName, resourceName, revisionId, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1797,7 +1749,8 @@ private Mono> listBySubscriptionNextSinglePageAsync /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. @@ -1833,7 +1786,8 @@ private Mono> listBySubscriptionNextSinglePageAsync /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1869,7 +1823,8 @@ private Mono> listByResourceGroupNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. @@ -1906,7 +1861,8 @@ private Mono> listByResourceGroupNextSinglePageAsyn /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1941,7 +1897,8 @@ private Mono> revisionsListNextSinglePageAsync(Stri /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by server. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksImpl.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksImpl.java index 2aeb3baf2482..7ebc90d7c47a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksImpl.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksImpl.java @@ -60,15 +60,6 @@ public PagedIterable listByResourceGroup( return Utils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); } - public Workbook getByResourceGroup(String resourceGroupName, String resourceName) { - WorkbookInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); - if (inner != null) { - return new WorkbookImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String resourceName, Boolean canFetchContent, Context context) { Response inner = @@ -86,14 +77,24 @@ public Response getByResourceGroupWithResponse( } } - public void deleteByResourceGroup(String resourceGroupName, String resourceName) { - this.serviceClient().delete(resourceGroupName, resourceName); + public Workbook getByResourceGroup(String resourceGroupName, String resourceName) { + WorkbookInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); + if (inner != null) { + return new WorkbookImpl(inner, this.manager()); + } else { + return null; + } } - public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { + public Response deleteByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, context); } + public void deleteByResourceGroup(String resourceGroupName, String resourceName) { + this.serviceClient().delete(resourceGroupName, resourceName); + } + public PagedIterable revisionsList(String resourceGroupName, String resourceName) { PagedIterable inner = this.serviceClient().revisionsList(resourceGroupName, resourceName); return Utils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); @@ -105,15 +106,6 @@ public PagedIterable revisionsList(String resourceGroupName, String re return Utils.mapPage(inner, inner1 -> new WorkbookImpl(inner1, this.manager())); } - public Workbook revisionGet(String resourceGroupName, String resourceName, String revisionId) { - WorkbookInner inner = this.serviceClient().revisionGet(resourceGroupName, resourceName, revisionId); - if (inner != null) { - return new WorkbookImpl(inner, this.manager()); - } else { - return null; - } - } - public Response revisionGetWithResponse( String resourceGroupName, String resourceName, String revisionId, Context context) { Response inner = @@ -129,6 +121,15 @@ public Response revisionGetWithResponse( } } + public Workbook revisionGet(String resourceGroupName, String resourceName, String revisionId) { + WorkbookInner inner = this.serviceClient().revisionGet(resourceGroupName, resourceName, revisionId); + if (inner != null) { + return new WorkbookImpl(inner, this.manager()); + } else { + return null; + } + } + public Workbook getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { @@ -186,7 +187,7 @@ public void deleteById(String id) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workbooks'.", id))); } - this.deleteWithResponse(resourceGroupName, resourceName, Context.NONE); + this.deleteByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { @@ -205,7 +206,7 @@ public Response deleteByIdWithResponse(String id, Context context) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workbooks'.", id))); } - return this.deleteWithResponse(resourceGroupName, resourceName, context); + return this.deleteByResourceGroupWithResponse(resourceGroupName, resourceName, context); } private WorkbooksClient serviceClient() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnalyticsItems.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnalyticsItems.java index a581fdb4e90f..df2f53c9320b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnalyticsItems.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnalyticsItems.java @@ -11,21 +11,6 @@ /** Resource collection API of AnalyticsItems. */ public interface AnalyticsItems { - /** - * Gets a list of Analytics Items defined within an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all - * users with access to the Application Insights component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Analytics Items defined within an Application Insights component. - */ - List list( - String resourceGroupName, String resourceName, ItemScopePath scopePath); - /** * Gets a list of Analytics Items defined within an Application Insights component. * @@ -54,7 +39,7 @@ Response> listWithResponse( Context context); /** - * Gets a specific Analytics Items defined within an Application Insights component. + * Gets a list of Analytics Items defined within an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. @@ -63,9 +48,9 @@ Response> listWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Analytics Items defined within an Application Insights component. + * @return a list of Analytics Items defined within an Application Insights component. */ - ApplicationInsightsComponentAnalyticsItem get( + List list( String resourceGroupName, String resourceName, ItemScopePath scopePath); /** @@ -92,24 +77,19 @@ Response getWithResponse( Context context); /** - * Adds or Updates a specific Analytics Item within an Application Insights component. + * Gets a specific Analytics Items defined within an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all * users with access to the Application Insights component. - * @param itemProperties Properties that need to be specified to create a new item and add it to an Application - * Insights component. * @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 properties that define an Analytics item that is associated to an Application Insights component. + * @return a specific Analytics Items defined within an Application Insights component. */ - ApplicationInsightsComponentAnalyticsItem put( - String resourceGroupName, - String resourceName, - ItemScopePath scopePath, - ApplicationInsightsComponentAnalyticsItemInner itemProperties); + ApplicationInsightsComponentAnalyticsItem get( + String resourceGroupName, String resourceName, ItemScopePath scopePath); /** * Adds or Updates a specific Analytics Item within an Application Insights component. @@ -138,17 +118,24 @@ Response putWithResponse( Context context); /** - * Deletes a specific Analytics Items defined within an Application Insights component. + * Adds or Updates a specific Analytics Item within an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all * users with access to the Application Insights component. + * @param itemProperties Properties that need to be specified to create a new item and add it to an Application + * Insights component. * @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 properties that define an Analytics item that is associated to an Application Insights component. */ - void delete(String resourceGroupName, String resourceName, ItemScopePath scopePath); + ApplicationInsightsComponentAnalyticsItem put( + String resourceGroupName, + String resourceName, + ItemScopePath scopePath, + ApplicationInsightsComponentAnalyticsItemInner itemProperties); /** * Deletes a specific Analytics Items defined within an Application Insights component. @@ -172,4 +159,17 @@ Response deleteWithResponse( String id, String name, Context context); + + /** + * Deletes a specific Analytics Items defined within an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param scopePath Enum indicating if this item definition is owned by a specific user or is shared between all + * users with access to the Application Insights component. + * @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. + */ + void delete(String resourceGroupName, String resourceName, ItemScopePath scopePath); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationError.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationError.java index c6adf61afa0b..fb7744a800cf 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationError.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationError.java @@ -17,6 +17,10 @@ public final class AnnotationError extends ManagementError { @JsonProperty(value = "innererror", access = JsonProperty.Access.WRITE_ONLY) private InnerError innererror; + /** Creates an instance of AnnotationError class. */ + public AnnotationError() { + } + /** * Get the innererror property: Inner error. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationErrorException.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationErrorException.java index 6294f56bbc16..f7d6955fb5d9 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationErrorException.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationErrorException.java @@ -30,6 +30,7 @@ public AnnotationErrorException(String message, HttpResponse response, Annotatio super(message, response, value); } + /** {@inheritDoc} */ @Override public AnnotationError getValue() { return (AnnotationError) super.getValue(); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Annotations.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Annotations.java index 1eaa420e53dd..3839d79da3c5 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Annotations.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Annotations.java @@ -53,13 +53,15 @@ PagedIterable list( * @param resourceName The name of the Application Insights component resource. * @param annotationProperties Properties that need to be specified to create an annotation of a Application * Insights component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is * rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of Annotation. + * @return array of Annotation along with {@link Response}. */ - List create(String resourceGroupName, String resourceName, AnnotationInner annotationProperties); + Response> createWithResponse( + String resourceGroupName, String resourceName, AnnotationInner annotationProperties, Context context); /** * Create an Annotation of an Application Insights component. @@ -68,15 +70,13 @@ PagedIterable list( * @param resourceName The name of the Application Insights component resource. * @param annotationProperties Properties that need to be specified to create an annotation of a Application * Insights component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is * rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of Annotation along with {@link Response}. + * @return array of Annotation. */ - Response> createWithResponse( - String resourceGroupName, String resourceName, AnnotationInner annotationProperties, Context context); + List create(String resourceGroupName, String resourceName, AnnotationInner annotationProperties); /** * Delete an Annotation of an Application Insights component. @@ -84,11 +84,14 @@ Response> createWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationId The unique annotation ID. This is unique within a Application Insights component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String resourceName, String annotationId); + Response deleteWithResponse( + String resourceGroupName, String resourceName, String annotationId, Context context); /** * Delete an Annotation of an Application Insights component. @@ -96,14 +99,11 @@ Response> createWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context); + void delete(String resourceGroupName, String resourceName, String annotationId); /** * Get the annotation for given id. @@ -111,13 +111,15 @@ Response deleteWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationId The unique annotation ID. This is unique within a Application Insights component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is * rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the annotation for given id. + * @return the annotation for given id along with {@link Response}. */ - List get(String resourceGroupName, String resourceName, String annotationId); + Response> getWithResponse( + String resourceGroupName, String resourceName, String annotationId, Context context); /** * Get the annotation for given id. @@ -125,13 +127,11 @@ Response deleteWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param annotationId The unique annotation ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.AnnotationErrorException thrown if the request is * rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the annotation for given id along with {@link Response}. + * @return the annotation for given id. */ - Response> getWithResponse( - String resourceGroupName, String resourceName, String annotationId, Context context); + List get(String resourceGroupName, String resourceName, String annotationId); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationsListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationsListResult.java index f622a2351d24..4eb564cf0251 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationsListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/AnnotationsListResult.java @@ -18,6 +18,10 @@ public final class AnnotationsListResult { @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; + /** Creates an instance of AnnotationsListResult class. */ + public AnnotationsListResult() { + } + /** * Get the value property: An array of annotations. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeyRequest.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeyRequest.java index f312700317fb..a0fd901bc296 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeyRequest.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeyRequest.java @@ -29,6 +29,10 @@ public final class ApiKeyRequest { @JsonProperty(value = "linkedWriteProperties") private List linkedWriteProperties; + /** Creates an instance of ApiKeyRequest class. */ + public ApiKeyRequest() { + } + /** * Get the name property: The name of the API Key. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeys.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeys.java index 521cb053cd1d..8fe814cc6369 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeys.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApiKeys.java @@ -43,13 +43,14 @@ PagedIterable list( * @param resourceName The name of the Application Insights component resource. * @param apiKeyProperties Properties that need to be specified to create an API key of a Application Insights * component. + * @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 properties that define an API key of an Application Insights Component. + * @return properties that define an API key of an Application Insights Component along with {@link Response}. */ - ApplicationInsightsComponentApiKey create( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties); + Response createWithResponse( + String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties, Context context); /** * Create an API Key of an Application Insights component. @@ -58,14 +59,13 @@ ApplicationInsightsComponentApiKey create( * @param resourceName The name of the Application Insights component resource. * @param apiKeyProperties Properties that need to be specified to create an API key of a Application Insights * component. - * @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 properties that define an API key of an Application Insights Component along with {@link Response}. + * @return properties that define an API key of an Application Insights Component. */ - Response createWithResponse( - String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties, Context context); + ApplicationInsightsComponentApiKey create( + String resourceGroupName, String resourceName, ApiKeyRequest apiKeyProperties); /** * Delete an API Key of an Application Insights component. @@ -73,12 +73,14 @@ Response createWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param keyId The API Key ID. This is unique within a Application Insights component. + * @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 properties that define an API key of an Application Insights Component. + * @return properties that define an API key of an Application Insights Component along with {@link Response}. */ - ApplicationInsightsComponentApiKey delete(String resourceGroupName, String resourceName, String keyId); + Response deleteWithResponse( + String resourceGroupName, String resourceName, String keyId, Context context); /** * Delete an API Key of an Application Insights component. @@ -86,14 +88,12 @@ Response createWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param keyId The API Key ID. This is unique within a Application Insights component. - * @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 properties that define an API key of an Application Insights Component along with {@link Response}. + * @return properties that define an API key of an Application Insights Component. */ - Response deleteWithResponse( - String resourceGroupName, String resourceName, String keyId, Context context); + ApplicationInsightsComponentApiKey delete(String resourceGroupName, String resourceName, String keyId); /** * Get the API Key for this key id. @@ -101,12 +101,14 @@ Response deleteWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param keyId The API Key ID. This is unique within a Application Insights component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the API Key for this key id. + * @return the API Key for this key id along with {@link Response}. */ - ApplicationInsightsComponentApiKey get(String resourceGroupName, String resourceName, String keyId); + Response getWithResponse( + String resourceGroupName, String resourceName, String keyId, Context context); /** * Get the API Key for this key id. @@ -114,12 +116,10 @@ Response deleteWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param keyId The API Key ID. This is unique within a Application Insights component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the API Key for this key id along with {@link Response}. + * @return the API Key for this key id. */ - Response getWithResponse( - String resourceGroupName, String resourceName, String keyId, Context context); + ApplicationInsightsComponentApiKey get(String resourceGroupName, String resourceName, String keyId); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponent.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponent.java index d913f9869dfd..2676321d4ef9 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponent.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponent.java @@ -614,15 +614,19 @@ interface WithTags { *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch * the execution of purge requests by sending a single command whose predicate includes all user identities that * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. + * a purge request to verify that the results are expected. Note: this operation is intended for Classic resources, + * for workspace-based Application Insights resource please run purge operation (directly on the + * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific + * resource id. * * @param body Describes the body of a request to purge data in a single table of an Application Insights component. + * @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 response containing operationId for a specific purge action. + * @return response containing operationId for a specific purge action along with {@link Response}. */ - ComponentPurgeResponse purge(ComponentPurgeBody body); + Response purgeWithResponse(ComponentPurgeBody body, Context context); /** * Purges data in an Application Insights component by a set of user-defined filters. @@ -630,14 +634,16 @@ interface WithTags { *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch * the execution of purge requests by sending a single command whose predicate includes all user identities that * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. + * a purge request to verify that the results are expected. Note: this operation is intended for Classic resources, + * for workspace-based Application Insights resource please run purge operation (directly on the + * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific + * resource id. * * @param body Describes the body of a request to purge data in a single table of an Application Insights component. - * @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 response containing operationId for a specific purge action along with {@link Response}. + * @return response containing operationId for a specific purge action. */ - Response purgeWithResponse(ComponentPurgeBody body, Context context); + ComponentPurgeResponse purge(ComponentPurgeBody body); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAnalyticsItemProperties.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAnalyticsItemProperties.java index 5ebb3c4f7f19..981a09340d66 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAnalyticsItemProperties.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentAnalyticsItemProperties.java @@ -19,6 +19,10 @@ public final class ApplicationInsightsComponentAnalyticsItemProperties { @JsonProperty(value = "functionAlias") private String functionAlias; + /** Creates an instance of ApplicationInsightsComponentAnalyticsItemProperties class. */ + public ApplicationInsightsComponentAnalyticsItemProperties() { + } + /** * Get the functionAlias property: A function alias, used when the type of the item is Function. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKeyListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKeyListResult.java index 979f48869229..61791eed17e0 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKeyListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentApiKeyListResult.java @@ -19,6 +19,10 @@ public final class ApplicationInsightsComponentApiKeyListResult { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of ApplicationInsightsComponentApiKeyListResult class. */ + public ApplicationInsightsComponentApiKeyListResult() { + } + /** * Get the value property: List of API Key definitions. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentDataVolumeCap.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentDataVolumeCap.java index 0cf787ff0b65..e14a6fd6175b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentDataVolumeCap.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentDataVolumeCap.java @@ -46,6 +46,10 @@ public final class ApplicationInsightsComponentDataVolumeCap { @JsonProperty(value = "MaxHistoryCap", access = JsonProperty.Access.WRITE_ONLY) private Float maxHistoryCap; + /** Creates an instance of ApplicationInsightsComponentDataVolumeCap class. */ + public ApplicationInsightsComponentDataVolumeCap() { + } + /** * Get the cap property: Daily data volume cap in GB. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentExportRequest.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentExportRequest.java index f810eceb1d56..22f454328cbe 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentExportRequest.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentExportRequest.java @@ -11,10 +11,9 @@ @Fluent public final class ApplicationInsightsComponentExportRequest { /* - * The document types to be exported, as comma separated values. Allowed - * values include 'Requests', 'Event', 'Exceptions', 'Metrics', - * 'PageViews', 'PageViewPerformance', 'Rdd', 'PerformanceCounters', - * 'Availability', 'Messages'. + * The document types to be exported, as comma separated values. Allowed values include 'Requests', 'Event', + * 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', 'PerformanceCounters', 'Availability', + * 'Messages'. */ @JsonProperty(value = "RecordTypes") private String recordTypes; @@ -26,15 +25,13 @@ public final class ApplicationInsightsComponentExportRequest { private String destinationType; /* - * The SAS URL for the destination storage container. It must grant write - * permission. + * The SAS URL for the destination storage container. It must grant write permission. */ @JsonProperty(value = "DestinationAddress") private String destinationAddress; /* - * Set to 'true' to create a Continuous Export configuration as enabled, - * otherwise set it to 'false'. + * Set to 'true' to create a Continuous Export configuration as enabled, otherwise set it to 'false'. */ @JsonProperty(value = "IsEnabled") private String isEnabled; @@ -69,6 +66,10 @@ public final class ApplicationInsightsComponentExportRequest { @JsonProperty(value = "DestinationAccountId") private String destinationAccountId; + /** Creates an instance of ApplicationInsightsComponentExportRequest class. */ + public ApplicationInsightsComponentExportRequest() { + } + /** * Get the recordTypes property: The document types to be exported, as comma separated values. Allowed values * include 'Requests', 'Event', 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeature.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeature.java index 69d1d9157176..06c38538b286 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeature.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeature.java @@ -65,6 +65,10 @@ public final class ApplicationInsightsComponentFeature { @JsonProperty(value = "SupportedAddonFeatures", access = JsonProperty.Access.WRITE_ONLY) private String supportedAddonFeatures; + /** Creates an instance of ApplicationInsightsComponentFeature class. */ + public ApplicationInsightsComponentFeature() { + } + /** * Get the featureName property: The pricing feature name. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeatureCapability.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeatureCapability.java index 56c48131f3af..627622a7f6e7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeatureCapability.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentFeatureCapability.java @@ -46,6 +46,10 @@ public final class ApplicationInsightsComponentFeatureCapability { @JsonProperty(value = "MeterRateFrequency", access = JsonProperty.Access.WRITE_ONLY) private String meterRateFrequency; + /** Creates an instance of ApplicationInsightsComponentFeatureCapability class. */ + public ApplicationInsightsComponentFeatureCapability() { + } + /** * Get the name property: The name of the capability. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentListResult.java index 97c6007ffdc5..e9941b6ae0d2 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentListResult.java @@ -20,12 +20,16 @@ public final class ApplicationInsightsComponentListResult { private List value; /* - * The URI to get the next set of Application Insights component - * definitions if too many components where returned in the result set. + * The URI to get the next set of Application Insights component definitions if too many components where returned + * in the result set. */ @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of ApplicationInsightsComponentListResult class. */ + public ApplicationInsightsComponentListResult() { + } + /** * Get the value property: List of Application Insights component definitions. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions.java index 0259ed222419..983c5a1029ab 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions.java @@ -53,12 +53,15 @@ public final class ApplicationInsightsComponentProactiveDetectionConfigurationRu private Boolean isInPreview; /* - * A flag indicating whether email notifications are supported for - * detections for this rule + * A flag indicating whether email notifications are supported for detections for this rule */ @JsonProperty(value = "SupportsEmailNotifications") private Boolean supportsEmailNotifications; + /** Creates an instance of ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions class. */ + public ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions() { + } + /** * Get the name property: The rule name. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsWebTestLocationsListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsWebTestLocationsListResult.java index 9ba090c530fd..d881f45eaccd 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsWebTestLocationsListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationInsightsWebTestLocationsListResult.java @@ -19,6 +19,10 @@ public final class ApplicationInsightsWebTestLocationsListResult { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of ApplicationInsightsWebTestLocationsListResult class. */ + public ApplicationInsightsWebTestLocationsListResult() { + } + /** * Get the value property: List of web test locations. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationType.java index 9a5454d142ac..0ee37c9b743f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationType.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ApplicationType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ApplicationType. */ +/** Type of application being monitored. */ public final class ApplicationType extends ExpandableStringEnum { /** Static value web for ApplicationType. */ public static final ApplicationType WEB = fromString("web"); @@ -16,6 +16,15 @@ public final class ApplicationType extends ExpandableStringEnum /** Static value other for ApplicationType. */ public static final ApplicationType OTHER = fromString("other"); + /** + * Creates a new instance of ApplicationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ApplicationType() { + } + /** * Creates or finds a ApplicationType from its string representation. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/CategoryType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/CategoryType.java index 4cb5c809355d..1d939b648f1d 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/CategoryType.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/CategoryType.java @@ -22,6 +22,15 @@ public final class CategoryType extends ExpandableStringEnum { /** Static value retention for CategoryType. */ public static final CategoryType RETENTION = fromString("retention"); + /** + * Creates a new instance of CategoryType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CategoryType() { + } + /** * Creates or finds a CategoryType from its string representation. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentAvailableFeatures.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentAvailableFeatures.java index d72db4d0be3f..923355674c3b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentAvailableFeatures.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentAvailableFeatures.java @@ -14,24 +14,24 @@ public interface ComponentAvailableFeatures { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component available features. + * @return an Application Insights component available features along with {@link Response}. */ - ApplicationInsightsComponentAvailableFeatures get(String resourceGroupName, String resourceName); + Response getWithResponse( + String resourceGroupName, String resourceName, Context context); /** * Returns all available features of the application insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component available features along with {@link Response}. + * @return an Application Insights component available features. */ - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); + ApplicationInsightsComponentAvailableFeatures get(String resourceGroupName, String resourceName); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentCurrentBillingFeatures.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentCurrentBillingFeatures.java index 0ed4ab492a4d..ab3fb8e7d371 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentCurrentBillingFeatures.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentCurrentBillingFeatures.java @@ -15,26 +15,26 @@ public interface ComponentCurrentBillingFeatures { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component billing features. + * @return an Application Insights component billing features along with {@link Response}. */ - ApplicationInsightsComponentBillingFeatures get(String resourceGroupName, String resourceName); + Response getWithResponse( + String resourceGroupName, String resourceName, Context context); /** * Returns current billing features for an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component billing features along with {@link Response}. + * @return an Application Insights component billing features. */ - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); + ApplicationInsightsComponentBillingFeatures get(String resourceGroupName, String resourceName); /** * Update current billing features for an Application Insights component. @@ -43,15 +43,17 @@ Response getWithResponse( * @param resourceName The name of the Application Insights component resource. * @param billingFeaturesProperties Properties that need to be specified to update billing features for an * Application Insights component. + * @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 an Application Insights component billing features. + * @return an Application Insights component billing features along with {@link Response}. */ - ApplicationInsightsComponentBillingFeatures update( + Response updateWithResponse( String resourceGroupName, String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties); + ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, + Context context); /** * Update current billing features for an Application Insights component. @@ -60,15 +62,13 @@ ApplicationInsightsComponentBillingFeatures update( * @param resourceName The name of the Application Insights component resource. * @param billingFeaturesProperties Properties that need to be specified to update billing features for an * Application Insights component. - * @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 an Application Insights component billing features along with {@link Response}. + * @return an Application Insights component billing features. */ - Response updateWithResponse( + ApplicationInsightsComponentBillingFeatures update( String resourceGroupName, String resourceName, - ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties, - Context context); + ApplicationInsightsComponentBillingFeaturesInner billingFeaturesProperties); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentFeatureCapabilities.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentFeatureCapabilities.java index 0475adb98581..decfdd68feac 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentFeatureCapabilities.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentFeatureCapabilities.java @@ -14,24 +14,24 @@ public interface ComponentFeatureCapabilities { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component feature capabilities. + * @return an Application Insights component feature capabilities along with {@link Response}. */ - ApplicationInsightsComponentFeatureCapabilities get(String resourceGroupName, String resourceName); + Response getWithResponse( + String resourceGroupName, String resourceName, Context context); /** * Returns feature capabilities of the application insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component feature capabilities along with {@link Response}. + * @return an Application Insights component feature capabilities. */ - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); + ApplicationInsightsComponentFeatureCapabilities get(String resourceGroupName, String resourceName); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccountsOperations.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccountsOperations.java index 02817fa5654e..2266d8183fdf 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccountsOperations.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccountsOperations.java @@ -15,12 +15,14 @@ public interface ComponentLinkedStorageAccountsOperations { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param storageType The type of the Application Insights component data source for the linked storage account. + * @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 an Application Insights component linked storage accounts. + * @return an Application Insights component linked storage accounts along with {@link Response}. */ - ComponentLinkedStorageAccounts get(String resourceGroupName, String resourceName, StorageType storageType); + Response getWithResponse( + String resourceGroupName, String resourceName, StorageType storageType, Context context); /** * Returns the current linked storage settings for an Application Insights component. @@ -28,14 +30,12 @@ public interface ComponentLinkedStorageAccountsOperations { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param storageType The type of the Application Insights component data source for the linked storage account. - * @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 an Application Insights component linked storage accounts along with {@link Response}. + * @return an Application Insights component linked storage accounts. */ - Response getWithResponse( - String resourceGroupName, String resourceName, StorageType storageType, Context context); + ComponentLinkedStorageAccounts get(String resourceGroupName, String resourceName, StorageType storageType); /** * Delete linked storage accounts for an Application Insights component. @@ -43,11 +43,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param storageType The type of the Application Insights component data source for the linked storage account. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String resourceName, StorageType storageType); + Response deleteWithResponse( + String resourceGroupName, String resourceName, StorageType storageType, Context context); /** * Delete linked storage accounts for an Application Insights component. @@ -55,14 +58,11 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param storageType The type of the Application Insights component data source for the linked storage account. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String resourceName, StorageType storageType, Context context); + void delete(String resourceGroupName, String resourceName, StorageType storageType); /** * Returns the current linked storage settings for an Application Insights component. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccountsPatch.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccountsPatch.java index 02f1c7fea877..002fd89b73de 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccountsPatch.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentLinkedStorageAccountsPatch.java @@ -17,6 +17,10 @@ public final class ComponentLinkedStorageAccountsPatch { @JsonProperty(value = "properties") private LinkedStorageAccountsProperties innerProperties; + /** Creates an instance of ComponentLinkedStorageAccountsPatch class. */ + public ComponentLinkedStorageAccountsPatch() { + } + /** * Get the innerProperties property: The properties of the linked storage accounts. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBody.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBody.java index 4158822aa285..1cb1cc8f07b2 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBody.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBody.java @@ -19,12 +19,15 @@ public final class ComponentPurgeBody { private String table; /* - * The set of columns and filters (queries) to run over them to purge the - * resulting data. + * The set of columns and filters (queries) to run over them to purge the resulting data. */ @JsonProperty(value = "filters", required = true) private List filters; + /** Creates an instance of ComponentPurgeBody class. */ + public ComponentPurgeBody() { + } + /** * Get the table property: Table from which to purge data. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBodyFilters.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBodyFilters.java index 4e26e313d0a9..f552ba493704 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBodyFilters.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentPurgeBodyFilters.java @@ -17,27 +17,29 @@ public final class ComponentPurgeBodyFilters { private String column; /* - * A query operator to evaluate over the provided column and value(s). - * Supported operators are ==, =~, in, in~, >, >=, <, <=, between, and have - * the same behavior as they would in a KQL query. + * A query operator to evaluate over the provided column and value(s). Supported operators are ==, =~, in, in~, >, + * >=, <, <=, between, and have the same behavior as they would in a KQL query. */ @JsonProperty(value = "operator") private String operator; /* - * the value for the operator to function over. This can be a number (e.g., - * > 100), a string (timestamp >= '2017-09-01') or array of values. + * the value for the operator to function over. This can be a number (e.g., > 100), a string (timestamp >= + * '2017-09-01') or array of values. */ @JsonProperty(value = "value") private Object value; /* - * When filtering over custom dimensions, this key will be used as the name - * of the custom dimension. + * When filtering over custom dimensions, this key will be used as the name of the custom dimension. */ @JsonProperty(value = "key") private String key; + /** Creates an instance of ComponentPurgeBodyFilters class. */ + public ComponentPurgeBodyFilters() { + } + /** * Get the column property: The column of the table over which the given query should run. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentQuotaStatus.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentQuotaStatus.java index 34dae34c03de..492cd38b4410 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentQuotaStatus.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentQuotaStatus.java @@ -14,24 +14,24 @@ public interface ComponentQuotaStatus { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component daily data volume cap status. + * @return an Application Insights component daily data volume cap status along with {@link Response}. */ - ApplicationInsightsComponentQuotaStatus get(String resourceGroupName, String resourceName); + Response getWithResponse( + String resourceGroupName, String resourceName, Context context); /** * Returns daily data volume cap (quota) status for an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component daily data volume cap status along with {@link Response}. + * @return an Application Insights component daily data volume cap status. */ - Response getWithResponse( - String resourceGroupName, String resourceName, Context context); + ApplicationInsightsComponentQuotaStatus get(String resourceGroupName, String resourceName); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Components.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Components.java index 92f9aa97eb31..00074570260b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Components.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Components.java @@ -62,50 +62,50 @@ public interface Components { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void deleteByResourceGroup(String resourceGroupName, String resourceName); + Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); /** * Deletes an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); + void deleteByResourceGroup(String resourceGroupName, String resourceName); /** * Returns an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component definition. + * @return an Application Insights component definition along with {@link Response}. */ - ApplicationInsightsComponent getByResourceGroup(String resourceGroupName, String resourceName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context); /** * Returns an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Application Insights component definition along with {@link Response}. + * @return an Application Insights component definition. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context); + ApplicationInsightsComponent getByResourceGroup(String resourceGroupName, String resourceName); /** * Purges data in an Application Insights component by a set of user-defined filters. @@ -113,17 +113,22 @@ Response getByResourceGroupWithResponse( *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch * the execution of purge requests by sending a single command whose predicate includes all user identities that * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. + * a purge request to verify that the results are expected. Note: this operation is intended for Classic resources, + * for workspace-based Application Insights resource please run purge operation (directly on the + * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific + * resource id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param body Describes the body of a request to purge data in a single table of an Application Insights component. + * @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 response containing operationId for a specific purge action. + * @return response containing operationId for a specific purge action along with {@link Response}. */ - ComponentPurgeResponse purge(String resourceGroupName, String resourceName, ComponentPurgeBody body); + Response purgeWithResponse( + String resourceGroupName, String resourceName, ComponentPurgeBody body, Context context); /** * Purges data in an Application Insights component by a set of user-defined filters. @@ -131,19 +136,20 @@ Response getByResourceGroupWithResponse( *

In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch * the execution of purge requests by sending a single command whose predicate includes all user identities that * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for - * a purge request to verify that the results are expected. + * a purge request to verify that the results are expected. Note: this operation is intended for Classic resources, + * for workspace-based Application Insights resource please run purge operation (directly on the + * workspace)(https://docs.microsoft.com/en-us/rest/api/loganalytics/workspace-purge/purge) , scoped to specific + * resource id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param body Describes the body of a request to purge data in a single table of an Application Insights component. - * @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 response containing operationId for a specific purge action along with {@link Response}. + * @return response containing operationId for a specific purge action. */ - Response purgeWithResponse( - String resourceGroupName, String resourceName, ComponentPurgeBody body, Context context); + ComponentPurgeResponse purge(String resourceGroupName, String resourceName, ComponentPurgeBody body); /** * Get status for an ongoing purge operation. @@ -151,12 +157,14 @@ Response purgeWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. + * @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 status for an ongoing purge operation. + * @return status for an ongoing purge operation along with {@link Response}. */ - ComponentPurgeStatusResponse getPurgeStatus(String resourceGroupName, String resourceName, String purgeId); + Response getPurgeStatusWithResponse( + String resourceGroupName, String resourceName, String purgeId, Context context); /** * Get status for an ongoing purge operation. @@ -164,14 +172,12 @@ Response purgeWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. - * @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 status for an ongoing purge operation along with {@link Response}. + * @return status for an ongoing purge operation. */ - Response getPurgeStatusWithResponse( - String resourceGroupName, String resourceName, String purgeId, Context context); + ComponentPurgeStatusResponse getPurgeStatus(String resourceGroupName, String resourceName, String purgeId); /** * Returns an Application Insights component. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentsResource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentsResource.java index 2cd2312fa258..2a1eb0934589 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentsResource.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ComponentsResource.java @@ -11,6 +11,10 @@ /** An azure resource object. */ @Fluent public class ComponentsResource extends Resource { + /** Creates an instance of ComponentsResource class. */ + public ComponentsResource() { + } + /** {@inheritDoc} */ @Override public ComponentsResource withLocation(String location) { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ErrorDefinition.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ErrorDefinition.java index aa68ccfb429e..876faca170f7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ErrorDefinition.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ErrorDefinition.java @@ -17,6 +17,10 @@ public final class ErrorDefinition extends ManagementError { @JsonProperty(value = "innererror", access = JsonProperty.Access.WRITE_ONLY) private Object innererror; + /** Creates an instance of ErrorDefinition class. */ + public ErrorDefinition() { + } + /** * Get the innererror property: Internal error details. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ErrorDefinitionException.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ErrorDefinitionException.java index c60c13cb3f70..77f8d4938bcd 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ErrorDefinitionException.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ErrorDefinitionException.java @@ -30,6 +30,7 @@ public ErrorDefinitionException(String message, HttpResponse response, ErrorDefi super(message, response, value); } + /** {@inheritDoc} */ @Override public ErrorDefinition getValue() { return (ErrorDefinition) super.getValue(); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ExportConfigurations.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ExportConfigurations.java index ff890c1079f5..efff7599cf3d 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ExportConfigurations.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ExportConfigurations.java @@ -10,18 +10,6 @@ /** Resource collection API of ExportConfigurations. */ public interface ExportConfigurations { - /** - * Gets a list of Continuous Export configuration of an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Continuous Export configuration of an Application Insights component. - */ - List list(String resourceGroupName, String resourceName); - /** * Gets a list of Continuous Export configuration of an Application Insights component. * @@ -38,19 +26,16 @@ Response> listWithResponse String resourceGroupName, String resourceName, Context context); /** - * Create a Continuous Export configuration of an Application Insights component. + * Gets a list of Continuous Export configuration of an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportProperties Properties that need to be specified to create a Continuous Export configuration of a - * Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Continuous Export configurations. + * @return a list of Continuous Export configuration of an Application Insights component. */ - List create( - String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties); + List list(String resourceGroupName, String resourceName); /** * Create a Continuous Export configuration of an Application Insights component. @@ -72,18 +57,19 @@ Response> createWithRespon Context context); /** - * Delete a Continuous Export configuration of an Application Insights component. + * Create a Continuous Export configuration of an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. + * @param exportProperties Properties that need to be specified to create a Continuous Export configuration of a + * Application Insights component. * @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 properties that define a Continuous Export configuration. + * @return a list of Continuous Export configurations. */ - ApplicationInsightsComponentExportConfiguration delete( - String resourceGroupName, String resourceName, String exportId); + List create( + String resourceGroupName, String resourceName, ApplicationInsightsComponentExportRequest exportProperties); /** * Delete a Continuous Export configuration of an Application Insights component. @@ -101,7 +87,7 @@ Response deleteWithResponse( String resourceGroupName, String resourceName, String exportId, Context context); /** - * Get the Continuous Export configuration for this export id. + * Delete a Continuous Export configuration of an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. @@ -109,9 +95,10 @@ Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Continuous Export configuration for this export id. + * @return properties that define a Continuous Export configuration. */ - ApplicationInsightsComponentExportConfiguration get(String resourceGroupName, String resourceName, String exportId); + ApplicationInsightsComponentExportConfiguration delete( + String resourceGroupName, String resourceName, String exportId); /** * Get the Continuous Export configuration for this export id. @@ -129,22 +116,17 @@ Response getWithResponse( String resourceGroupName, String resourceName, String exportId, Context context); /** - * Update the Continuous Export configuration for this export id. + * Get the Continuous Export configuration for this export id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. - * @param exportProperties Properties that need to be specified to update the Continuous Export configuration. * @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 properties that define a Continuous Export configuration. + * @return the Continuous Export configuration for this export id. */ - ApplicationInsightsComponentExportConfiguration update( - String resourceGroupName, - String resourceName, - String exportId, - ApplicationInsightsComponentExportRequest exportProperties); + ApplicationInsightsComponentExportConfiguration get(String resourceGroupName, String resourceName, String exportId); /** * Update the Continuous Export configuration for this export id. @@ -165,4 +147,22 @@ Response updateWithResponse( String exportId, ApplicationInsightsComponentExportRequest exportProperties, Context context); + + /** + * Update the Continuous Export configuration for this export id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param exportId The Continuous Export configuration ID. This is unique within a Application Insights component. + * @param exportProperties Properties that need to be specified to update the Continuous Export configuration. + * @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 properties that define a Continuous Export configuration. + */ + ApplicationInsightsComponentExportConfiguration update( + String resourceGroupName, + String resourceName, + String exportId, + ApplicationInsightsComponentExportRequest exportProperties); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FavoriteSourceType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FavoriteSourceType.java index 429f6f6a064b..aeb60eaa59d7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FavoriteSourceType.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FavoriteSourceType.java @@ -34,6 +34,15 @@ public final class FavoriteSourceType extends ExpandableStringEnum list(String resourceGroupName, String resourceName); - /** * Gets a list of favorites defined within an Application Insights component. * @@ -50,17 +38,16 @@ Response> listWithResponse( Context context); /** - * Get a single favorite by its FavoriteId, defined within an Application Insights component. + * Gets a list of favorites defined within an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param favoriteId The Id of a specific favorite defined in the Application Insights component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single favorite by its FavoriteId, defined within an Application Insights component. + * @return a list of favorites defined within an Application Insights component. */ - ApplicationInsightsComponentFavorite get(String resourceGroupName, String resourceName, String favoriteId); + List list(String resourceGroupName, String resourceName); /** * Get a single favorite by its FavoriteId, defined within an Application Insights component. @@ -79,23 +66,17 @@ Response getWithResponse( String resourceGroupName, String resourceName, String favoriteId, Context context); /** - * Adds a new favorites to an Application Insights component. + * Get a single favorite by its FavoriteId, defined within an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to create a new favorite and add it to an - * Application Insights component. * @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 properties that define a favorite that is associated to an Application Insights component. + * @return a single favorite by its FavoriteId, defined within an Application Insights component. */ - ApplicationInsightsComponentFavorite add( - String resourceGroupName, - String resourceName, - String favoriteId, - ApplicationInsightsComponentFavoriteInner favoriteProperties); + ApplicationInsightsComponentFavorite get(String resourceGroupName, String resourceName, String favoriteId); /** * Adds a new favorites to an Application Insights component. @@ -120,18 +101,19 @@ Response addWithResponse( Context context); /** - * Updates a favorite that has already been added to an Application Insights component. + * Adds a new favorites to an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component. - * @param favoriteProperties Properties that need to be specified to update the existing favorite. + * @param favoriteProperties Properties that need to be specified to create a new favorite and add it to an + * Application Insights component. * @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 properties that define a favorite that is associated to an Application Insights component. */ - ApplicationInsightsComponentFavorite update( + ApplicationInsightsComponentFavorite add( String resourceGroupName, String resourceName, String favoriteId, @@ -159,16 +141,22 @@ Response updateWithResponse( Context context); /** - * Remove a favorite that is associated to an Application Insights component. + * Updates a favorite that has already been added to an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. * @param favoriteId The Id of a specific favorite defined in the Application Insights component. + * @param favoriteProperties Properties that need to be specified to update the existing favorite. * @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 properties that define a favorite that is associated to an Application Insights component. */ - void delete(String resourceGroupName, String resourceName, String favoriteId); + ApplicationInsightsComponentFavorite update( + String resourceGroupName, + String resourceName, + String favoriteId, + ApplicationInsightsComponentFavoriteInner favoriteProperties); /** * Remove a favorite that is associated to an Application Insights component. @@ -184,4 +172,16 @@ Response updateWithResponse( */ Response deleteWithResponse( String resourceGroupName, String resourceName, String favoriteId, Context context); + + /** + * Remove a favorite that is associated to an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param favoriteId The Id of a specific favorite defined in the Application Insights component. + * @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. + */ + void delete(String resourceGroupName, String resourceName, String favoriteId); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FlowType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FlowType.java index 1a6bac2ec7ef..30142e79e5f3 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FlowType.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/FlowType.java @@ -8,11 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for FlowType. */ +/** + * Used by the Application Insights system to determine what kind of flow this component was created by. This is to be + * set to 'Bluefield' when creating/updating a component via the REST API. + */ public final class FlowType extends ExpandableStringEnum { /** Static value Bluefield for FlowType. */ public static final FlowType BLUEFIELD = fromString("Bluefield"); + /** + * Creates a new instance of FlowType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FlowType() { + } + /** * Creates or finds a FlowType from its string representation. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/HeaderField.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/HeaderField.java new file mode 100644 index 000000000000..178c3a1b0c5f --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/HeaderField.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.applicationinsights.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A header to add to the WebTest. */ +@Fluent +public final class HeaderField { + /* + * The name of the header. + */ + @JsonProperty(value = "key") + private String headerFieldName; + + /* + * The value of the header. + */ + @JsonProperty(value = "value") + private String headerFieldValue; + + /** Creates an instance of HeaderField class. */ + public HeaderField() { + } + + /** + * Get the headerFieldName property: The name of the header. + * + * @return the headerFieldName value. + */ + public String headerFieldName() { + return this.headerFieldName; + } + + /** + * Set the headerFieldName property: The name of the header. + * + * @param headerFieldName the headerFieldName value to set. + * @return the HeaderField object itself. + */ + public HeaderField withHeaderFieldName(String headerFieldName) { + this.headerFieldName = headerFieldName; + return this; + } + + /** + * Get the headerFieldValue property: The value of the header. + * + * @return the headerFieldValue value. + */ + public String headerFieldValue() { + return this.headerFieldValue; + } + + /** + * Set the headerFieldValue property: The value of the header. + * + * @param headerFieldValue the headerFieldValue value to set. + * @return the HeaderField object itself. + */ + public HeaderField withHeaderFieldValue(String headerFieldValue) { + this.headerFieldValue = headerFieldValue; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/IngestionMode.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/IngestionMode.java index 45d4dc595bcc..c95dd0553a53 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/IngestionMode.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/IngestionMode.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for IngestionMode. */ +/** Indicates the flow of the ingestion. */ public final class IngestionMode extends ExpandableStringEnum { /** Static value ApplicationInsights for IngestionMode. */ public static final IngestionMode APPLICATION_INSIGHTS = fromString("ApplicationInsights"); @@ -20,6 +20,15 @@ public final class IngestionMode extends ExpandableStringEnum { /** Static value LogAnalytics for IngestionMode. */ public static final IngestionMode LOG_ANALYTICS = fromString("LogAnalytics"); + /** + * Creates a new instance of IngestionMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IngestionMode() { + } + /** * Creates or finds a IngestionMode from its string representation. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/InnerError.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/InnerError.java index fd98e49d004a..0e5f9d1af1c7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/InnerError.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/InnerError.java @@ -23,6 +23,10 @@ public final class InnerError { @JsonProperty(value = "time") private OffsetDateTime time; + /** Creates an instance of InnerError class. */ + public InnerError() { + } + /** * Get the diagnosticcontext property: Provides correlation for request. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScope.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScope.java index b91e99b16cde..6f9d97c83fa0 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScope.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScope.java @@ -8,7 +8,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ItemScope. */ +/** + * Enum indicating if this item definition is owned by a specific user or is shared between all users with access to the + * Application Insights component. + */ public final class ItemScope extends ExpandableStringEnum { /** Static value shared for ItemScope. */ public static final ItemScope SHARED = fromString("shared"); @@ -16,6 +19,15 @@ public final class ItemScope extends ExpandableStringEnum { /** Static value user for ItemScope. */ public static final ItemScope USER = fromString("user"); + /** + * Creates a new instance of ItemScope value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ItemScope() { + } + /** * Creates or finds a ItemScope from its string representation. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScopePath.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScopePath.java index f65af78b041a..21941afe3861 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScopePath.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemScopePath.java @@ -16,6 +16,15 @@ public final class ItemScopePath extends ExpandableStringEnum { /** Static value myanalyticsItems for ItemScopePath. */ public static final ItemScopePath MYANALYTICS_ITEMS = fromString("myanalyticsItems"); + /** + * Creates a new instance of ItemScopePath value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ItemScopePath() { + } + /** * Creates or finds a ItemScopePath from its string representation. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemType.java index 6783be557805..8dad599e1f68 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemType.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ItemType. */ +/** Enum indicating the type of the Analytics item. */ public final class ItemType extends ExpandableStringEnum { /** Static value none for ItemType. */ public static final ItemType NONE = fromString("none"); @@ -22,6 +22,15 @@ public final class ItemType extends ExpandableStringEnum { /** Static value function for ItemType. */ public static final ItemType FUNCTION = fromString("function"); + /** + * Creates a new instance of ItemType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ItemType() { + } + /** * Creates or finds a ItemType from its string representation. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemTypeParameter.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemTypeParameter.java index ed38ca20bb5c..9a3fa45ed506 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemTypeParameter.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ItemTypeParameter.java @@ -25,6 +25,15 @@ public final class ItemTypeParameter extends ExpandableStringEnum { /** Static value user for Kind. */ public static final Kind USER = fromString("user"); @@ -16,6 +16,15 @@ public final class Kind extends ExpandableStringEnum { /** Static value shared for Kind. */ public static final Kind SHARED = fromString("shared"); + /** + * Creates a new instance of Kind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Kind() { + } + /** * Creates or finds a Kind from its string representation. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/LiveTokens.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/LiveTokens.java index b5f0c9b7083e..98c4524b030d 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/LiveTokens.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/LiveTokens.java @@ -13,22 +13,22 @@ public interface LiveTokens { * **Gets an access token for live metrics stream data.**. * * @param resourceUri The identifier of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to a live token query. + * @return the response to a live token query along with {@link Response}. */ - LiveTokenResponse get(String resourceUri); + Response getWithResponse(String resourceUri, Context context); /** * **Gets an access token for live metrics stream data.**. * * @param resourceUri The identifier of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response to a live token query along with {@link Response}. + * @return the response to a live token query. */ - Response getWithResponse(String resourceUri, Context context); + LiveTokenResponse get(String resourceUri); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedServiceIdentity.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedServiceIdentity.java index 0e2356f6d3b1..a56d9ae62b41 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedServiceIdentity.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedServiceIdentity.java @@ -15,30 +15,28 @@ @Fluent public class ManagedServiceIdentity { /* - * The service principal ID of the system assigned identity. This property - * will only be provided for a system assigned identity. + * The service principal ID of the system assigned identity. This property will only be provided for a system + * assigned identity. */ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) private UUID principalId; /* - * The tenant ID of the system assigned identity. This property will only - * be provided for a system assigned identity. + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned + * identity. */ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private UUID tenantId; /* - * Type of managed service identity (where both SystemAssigned and - * UserAssigned types are allowed). + * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ @JsonProperty(value = "type", required = true) private ManagedServiceIdentityType type; /* - * The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the - * form: + * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys + * will be ARM resource ids in the form: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. * The dictionary values can be empty objects ({}) in requests. */ @@ -46,6 +44,10 @@ public class ManagedServiceIdentity { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; + /** Creates an instance of ManagedServiceIdentity class. */ + public ManagedServiceIdentity() { + } + /** * Get the principalId property: The service principal ID of the system assigned identity. This property will only * be provided for a system assigned identity. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedServiceIdentityType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedServiceIdentityType.java index da584f880cba..777682e979bb 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedServiceIdentityType.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ManagedServiceIdentityType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ManagedServiceIdentityType. */ +/** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ public final class ManagedServiceIdentityType extends ExpandableStringEnum { /** Static value None for ManagedServiceIdentityType. */ public static final ManagedServiceIdentityType NONE = fromString("None"); @@ -23,6 +23,15 @@ public final class ManagedServiceIdentityType extends ExpandableStringEnum { /** Static value UserAssigned for MyWorkbookManagedIdentityType. */ public static final MyWorkbookManagedIdentityType USER_ASSIGNED = fromString("UserAssigned"); @@ -16,6 +16,15 @@ public final class MyWorkbookManagedIdentityType extends ExpandableStringEnum etag; + /** Creates an instance of MyWorkbookResource class. */ + public MyWorkbookResource() { + } + /** * Get the identity property: Identity used for BYOS. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbookUserAssignedIdentities.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbookUserAssignedIdentities.java index bf49b8e11f44..60c809d285ed 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbookUserAssignedIdentities.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbookUserAssignedIdentities.java @@ -22,6 +22,10 @@ public final class MyWorkbookUserAssignedIdentities { @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private String tenantId; + /** Creates an instance of MyWorkbookUserAssignedIdentities class. */ + public MyWorkbookUserAssignedIdentities() { + } + /** * Get the principalId property: The principal ID of resource identity. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbooks.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbooks.java index 7bbdf30ed77c..16ee6a531fbe 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbooks.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbooks.java @@ -85,53 +85,53 @@ PagedIterable listByResourceGroup( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is * rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName. + * @return a single private workbook by its resourceName along with {@link Response}. */ - MyWorkbook getByResourceGroup(String resourceGroupName, String resourceName); + Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); /** * Get a single private workbook by its resourceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is * rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single private workbook by its resourceName along with {@link Response}. + * @return a single private workbook by its resourceName. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); + MyWorkbook getByResourceGroup(String resourceGroupName, String resourceName); /** * Delete a private workbook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is * rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void deleteByResourceGroup(String resourceGroupName, String resourceName); + Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); /** * Delete a private workbook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.ErrorDefinitionException thrown if the request is * rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); + void deleteByResourceGroup(String resourceGroupName, String resourceName); /** * Get a single private workbook by its resourceName. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbooksListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbooksListResult.java index a75173b97cf0..aaf2279cb0ca 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbooksListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/MyWorkbooksListResult.java @@ -24,6 +24,10 @@ public final class MyWorkbooksListResult { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of MyWorkbooksListResult class. */ + public MyWorkbooksListResult() { + } + /** * Get the value property: An array of private workbooks. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationDisplay.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationDisplay.java index aaa8ee337798..4e5513bbcdb0 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationDisplay.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationDisplay.java @@ -11,7 +11,7 @@ @Fluent public final class OperationDisplay { /* - * Service provider: Microsoft.Cdn + * Service provider: Microsoft.Insights */ @JsonProperty(value = "provider") private String provider; @@ -28,8 +28,12 @@ public final class OperationDisplay { @JsonProperty(value = "operation") private String operation; + /** Creates an instance of OperationDisplay class. */ + public OperationDisplay() { + } + /** - * Get the provider property: Service provider: Microsoft.Cdn. + * Get the provider property: Service provider: Microsoft.Insights. * * @return the provider value. */ @@ -38,7 +42,7 @@ public String provider() { } /** - * Set the provider property: Service provider: Microsoft.Cdn. + * Set the provider property: Service provider: Microsoft.Insights. * * @param provider the provider value to set. * @return the OperationDisplay object itself. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationListResult.java index bf32cff840e1..9f1f0669e402 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/OperationListResult.java @@ -10,13 +10,13 @@ import java.util.List; /** - * Result of the request to list CDN operations. It contains a list of operations and a URL link to get the next set of - * results. + * Result of the request to list Azure Workbooks operations. It contains a list of operations and a URL link to get the + * next set of results. */ @Fluent public final class OperationListResult { /* - * List of CDN operations supported by the CDN resource provider. + * List of Workbook operations supported by the Microsoft.Insights resource provider. */ @JsonProperty(value = "value") private List value; @@ -27,8 +27,12 @@ public final class OperationListResult { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of OperationListResult class. */ + public OperationListResult() { + } + /** - * Get the value property: List of CDN operations supported by the CDN resource provider. + * Get the value property: List of Workbook operations supported by the Microsoft.Insights resource provider. * * @return the value value. */ @@ -37,7 +41,7 @@ public List value() { } /** - * Set the value property: List of CDN operations supported by the CDN resource provider. + * Set the value property: List of Workbook operations supported by the Microsoft.Insights resource provider. * * @param value the value value to set. * @return the OperationListResult object itself. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Operations.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Operations.java index 1688fc056d41..f9de153a4a05 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Operations.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Operations.java @@ -14,7 +14,8 @@ public interface Operations { * * @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 the request to list CDN operations as paginated response with {@link PagedIterable}. + * @return result of the request to list Azure Workbooks operations as paginated response with {@link + * PagedIterable}. */ PagedIterable list(); @@ -25,7 +26,8 @@ public interface Operations { * @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 the request to list CDN operations as paginated response with {@link PagedIterable}. + * @return result of the request to list Azure Workbooks operations as paginated response with {@link + * PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PrivateLinkScopedResource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PrivateLinkScopedResource.java index a67ad328907c..c1323664a3f1 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PrivateLinkScopedResource.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PrivateLinkScopedResource.java @@ -22,6 +22,10 @@ public final class PrivateLinkScopedResource { @JsonProperty(value = "ScopeId") private String scopeId; + /** Creates an instance of PrivateLinkScopedResource class. */ + public PrivateLinkScopedResource() { + } + /** * Get the resourceId property: The full resource Id of the private link scope resource. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ProactiveDetectionConfigurations.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ProactiveDetectionConfigurations.java index 42f89aea35b8..32c32468d7cc 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ProactiveDetectionConfigurations.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/ProactiveDetectionConfigurations.java @@ -16,28 +16,28 @@ public interface ProactiveDetectionConfigurations { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of ProactiveDetection configurations of an Application Insights component. + * @return a list of ProactiveDetection configurations of an Application Insights component along with {@link + * Response}. */ - List list( - String resourceGroupName, String resourceName); + Response> listWithResponse( + String resourceGroupName, String resourceName, Context context); /** * Gets a list of ProactiveDetection configurations of an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of ProactiveDetection configurations of an Application Insights component along with {@link - * Response}. + * @return a list of ProactiveDetection configurations of an Application Insights component. */ - Response> listWithResponse( - String resourceGroupName, String resourceName, Context context); + List list( + String resourceGroupName, String resourceName); /** * Get the ProactiveDetection configuration for this configuration id. @@ -46,13 +46,14 @@ Response> list * @param resourceName The name of the Application Insights component resource. * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights * component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the ProactiveDetection configuration for this configuration id. + * @return the ProactiveDetection configuration for this configuration id along with {@link Response}. */ - ApplicationInsightsComponentProactiveDetectionConfiguration get( - String resourceGroupName, String resourceName, String configurationId); + Response getWithResponse( + String resourceGroupName, String resourceName, String configurationId, Context context); /** * Get the ProactiveDetection configuration for this configuration id. @@ -61,14 +62,13 @@ ApplicationInsightsComponentProactiveDetectionConfiguration get( * @param resourceName The name of the Application Insights component resource. * @param configurationId The ProactiveDetection configuration ID. This is unique within a Application Insights * component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the ProactiveDetection configuration for this configuration id along with {@link Response}. + * @return the ProactiveDetection configuration for this configuration id. */ - Response getWithResponse( - String resourceGroupName, String resourceName, String configurationId, Context context); + ApplicationInsightsComponentProactiveDetectionConfiguration get( + String resourceGroupName, String resourceName, String configurationId); /** * Update the ProactiveDetection configuration for this configuration id. @@ -79,16 +79,18 @@ Response getWithRes * component. * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection * configuration. + * @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 properties that define a ProactiveDetection configuration. + * @return properties that define a ProactiveDetection configuration along with {@link Response}. */ - ApplicationInsightsComponentProactiveDetectionConfiguration update( + Response updateWithResponse( String resourceGroupName, String resourceName, String configurationId, - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties); + ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, + Context context); /** * Update the ProactiveDetection configuration for this configuration id. @@ -99,16 +101,14 @@ ApplicationInsightsComponentProactiveDetectionConfiguration update( * component. * @param proactiveDetectionProperties Properties that need to be specified to update the ProactiveDetection * configuration. - * @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 properties that define a ProactiveDetection configuration along with {@link Response}. + * @return properties that define a ProactiveDetection configuration. */ - Response updateWithResponse( + ApplicationInsightsComponentProactiveDetectionConfiguration update( String resourceGroupName, String resourceName, String configurationId, - ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties, - Context context); + ApplicationInsightsComponentProactiveDetectionConfigurationInner proactiveDetectionProperties); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PublicNetworkAccessType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PublicNetworkAccessType.java index 7f1d9cdb8188..2ab0528d9db4 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PublicNetworkAccessType.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/PublicNetworkAccessType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PublicNetworkAccessType. */ +/** The network access type for operating on the Application Insights Component. By default it is Enabled. */ public final class PublicNetworkAccessType extends ExpandableStringEnum { /** Static value Enabled for PublicNetworkAccessType. */ public static final PublicNetworkAccessType ENABLED = fromString("Enabled"); @@ -16,6 +16,15 @@ public final class PublicNetworkAccessType extends ExpandableStringEnum { /** Static value pending for PurgeState. */ public static final PurgeState PENDING = fromString("pending"); @@ -16,6 +16,15 @@ public final class PurgeState extends ExpandableStringEnum { /** Static value completed for PurgeState. */ public static final PurgeState COMPLETED = fromString("completed"); + /** + * Creates a new instance of PurgeState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PurgeState() { + } + /** * Creates or finds a PurgeState from its string representation. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/RequestSource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/RequestSource.java index 76ee3c4e54a8..bca68ff30e18 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/RequestSource.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/RequestSource.java @@ -8,11 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for RequestSource. */ +/** + * Describes what tool created this Application Insights component. Customers using this API should set this to the + * default 'rest'. + */ public final class RequestSource extends ExpandableStringEnum { /** Static value rest for RequestSource. */ public static final RequestSource REST = fromString("rest"); + /** + * Creates a new instance of RequestSource value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RequestSource() { + } + /** * Creates or finds a RequestSource from its string representation. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/StorageType.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/StorageType.java index 6e109e0335ea..c37732a0f1c2 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/StorageType.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/StorageType.java @@ -13,6 +13,15 @@ public final class StorageType extends ExpandableStringEnum { /** Static value ServiceProfiler for StorageType. */ public static final StorageType SERVICE_PROFILER = fromString("ServiceProfiler"); + /** + * Creates a new instance of StorageType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StorageType() { + } + /** * Creates or finds a StorageType from its string representation. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/TagsResource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/TagsResource.java index c4e637c9f644..4c9b189f27b8 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/TagsResource.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/TagsResource.java @@ -19,6 +19,10 @@ public final class TagsResource { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /** Creates an instance of TagsResource class. */ + public TagsResource() { + } + /** * Get the tags property: Resource tags. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/UserAssignedIdentity.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/UserAssignedIdentity.java index 98d60aa8828b..21f721a81ff7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/UserAssignedIdentity.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/UserAssignedIdentity.java @@ -23,6 +23,10 @@ public class UserAssignedIdentity { @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) private UUID clientId; + /** Creates an instance of UserAssignedIdentity class. */ + public UserAssignedIdentity() { + } + /** * Get the principalId property: The principal ID of the assigned identity. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTest.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTest.java index 4a02d8d12ea0..3565c9ab1f21 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTest.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTest.java @@ -48,7 +48,7 @@ public interface WebTest { Map tags(); /** - * Gets the kind property: The kind of web test that this web test watches. Choices are ping and multistep. + * Gets the kind property: The kind of WebTest that this web test watches. Choices are ping, multistep and standard. * * @return the kind value. */ @@ -70,7 +70,7 @@ public interface WebTest { String webTestName(); /** - * Gets the description property: Purpose/user defined descriptive test for this WebTest. + * Gets the description property: User defined description for this WebTest. * * @return the description value. */ @@ -98,7 +98,7 @@ public interface WebTest { Integer timeout(); /** - * Gets the webTestKind property: The kind of web test this is, valid choices are ping and multistep. + * Gets the webTestKind property: The kind of web test this is, valid choices are ping, multistep and standard. * * @return the webTestKind value. */ @@ -135,6 +135,20 @@ public interface WebTest { */ String provisioningState(); + /** + * Gets the request property: The collection of request properties. + * + * @return the request value. + */ + WebTestPropertiesRequest request(); + + /** + * Gets the validationRules property: The collection of validation rule properties. + * + * @return the validationRules value. + */ + WebTestPropertiesValidationRules validationRules(); + /** * Gets the region of the resource. * @@ -219,7 +233,9 @@ interface WithCreate DefinitionStages.WithWebTestKind, DefinitionStages.WithRetryEnabled, DefinitionStages.WithLocations, - DefinitionStages.WithConfiguration { + DefinitionStages.WithConfiguration, + DefinitionStages.WithRequest, + DefinitionStages.WithValidationRules { /** * Executes the create request. * @@ -248,10 +264,10 @@ interface WithTags { /** The stage of the WebTest definition allowing to specify kind. */ interface WithKind { /** - * Specifies the kind property: The kind of web test that this web test watches. Choices are ping and - * multistep.. + * Specifies the kind property: The kind of WebTest that this web test watches. Choices are ping, multistep + * and standard.. * - * @param kind The kind of web test that this web test watches. Choices are ping and multistep. + * @param kind The kind of WebTest that this web test watches. Choices are ping, multistep and standard. * @return the next definition stage. */ WithCreate withKind(WebTestKind kind); @@ -280,9 +296,9 @@ interface WithWebTestName { /** The stage of the WebTest definition allowing to specify description. */ interface WithDescription { /** - * Specifies the description property: Purpose/user defined descriptive test for this WebTest.. + * Specifies the description property: User defined description for this WebTest.. * - * @param description Purpose/user defined descriptive test for this WebTest. + * @param description User defined description for this WebTest. * @return the next definition stage. */ WithCreate withDescription(String description); @@ -321,9 +337,10 @@ interface WithTimeout { /** The stage of the WebTest definition allowing to specify webTestKind. */ interface WithWebTestKind { /** - * Specifies the webTestKind property: The kind of web test this is, valid choices are ping and multistep.. + * Specifies the webTestKind property: The kind of web test this is, valid choices are ping, multistep and + * standard.. * - * @param webTestKind The kind of web test this is, valid choices are ping and multistep. + * @param webTestKind The kind of web test this is, valid choices are ping, multistep and standard. * @return the next definition stage. */ WithCreate withWebTestKind(WebTestKind webTestKind); @@ -360,6 +377,26 @@ interface WithConfiguration { */ WithCreate withConfiguration(WebTestPropertiesConfiguration configuration); } + /** The stage of the WebTest definition allowing to specify request. */ + interface WithRequest { + /** + * Specifies the request property: The collection of request properties. + * + * @param request The collection of request properties. + * @return the next definition stage. + */ + WithCreate withRequest(WebTestPropertiesRequest request); + } + /** The stage of the WebTest definition allowing to specify validationRules. */ + interface WithValidationRules { + /** + * Specifies the validationRules property: The collection of validation rule properties. + * + * @param validationRules The collection of validation rule properties. + * @return the next definition stage. + */ + WithCreate withValidationRules(WebTestPropertiesValidationRules validationRules); + } } /** * Begins update for the WebTest resource. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestGeolocation.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestGeolocation.java index a64604c501e0..a84c1125a708 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestGeolocation.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestGeolocation.java @@ -7,17 +7,21 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Geo-physical location to run a web test from. You must specify one or more locations for the test to run from. */ +/** Geo-physical location to run a WebTest from. You must specify one or more locations for the test to run from. */ @Fluent public final class WebTestGeolocation { /* - * Location ID for the webtest to run from. + * Location ID for the WebTest to run from. */ @JsonProperty(value = "Id") private String location; + /** Creates an instance of WebTestGeolocation class. */ + public WebTestGeolocation() { + } + /** - * Get the location property: Location ID for the webtest to run from. + * Get the location property: Location ID for the WebTest to run from. * * @return the location value. */ @@ -26,7 +30,7 @@ public String location() { } /** - * Set the location property: Location ID for the webtest to run from. + * Set the location property: Location ID for the WebTest to run from. * * @param location the location value to set. * @return the WebTestGeolocation object itself. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestKind.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestKind.java index 863583cd95cf..473a3a5db9d7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestKind.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestKind.java @@ -7,13 +7,16 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for WebTestKind. */ +/** The kind of WebTest that this web test watches. Choices are ping, multistep and standard. */ public enum WebTestKind { /** Enum value ping. */ PING("ping"), /** Enum value multistep. */ - MULTISTEP("multistep"); + MULTISTEP("multistep"), + + /** Enum value standard. */ + STANDARD("standard"); /** The actual serialized value for a WebTestKind instance. */ private final String value; @@ -30,6 +33,9 @@ public enum WebTestKind { */ @JsonCreator public static WebTestKind fromString(String value) { + if (value == null) { + return null; + } WebTestKind[] items = WebTestKind.values(); for (WebTestKind item : items) { if (item.toString().equalsIgnoreCase(value)) { @@ -39,6 +45,7 @@ public static WebTestKind fromString(String value) { return null; } + /** {@inheritDoc} */ @JsonValue @Override public String toString() { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestListResult.java index f4f8db891c0e..a6df02b0d18d 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestListResult.java @@ -10,24 +10,28 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A list of 0 or more Application Insights web test definitions. */ +/** A list of 0 or more Application Insights WebTest definitions. */ @Fluent public final class WebTestListResult { /* - * Set of Application Insights web test definitions. + * Set of Application Insights WebTest definitions. */ @JsonProperty(value = "value", required = true) private List value; /* - * The link to get the next part of the returned list of web tests, should - * the return set be too large for a single request. May be null. + * The link to get the next part of the returned list of WebTest, should the return set be too large for a single + * request. May be null. */ @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of WebTestListResult class. */ + public WebTestListResult() { + } + /** - * Get the value property: Set of Application Insights web test definitions. + * Get the value property: Set of Application Insights WebTest definitions. * * @return the value value. */ @@ -36,7 +40,7 @@ public List value() { } /** - * Set the value property: Set of Application Insights web test definitions. + * Set the value property: Set of Application Insights WebTest definitions. * * @param value the value value to set. * @return the WebTestListResult object itself. @@ -47,7 +51,7 @@ public WebTestListResult withValue(List value) { } /** - * Get the nextLink property: The link to get the next part of the returned list of web tests, should the return set + * Get the nextLink property: The link to get the next part of the returned list of WebTest, should the return set * be too large for a single request. May be null. * * @return the nextLink value. @@ -57,7 +61,7 @@ public String nextLink() { } /** - * Set the nextLink property: The link to get the next part of the returned list of web tests, should the return set + * Set the nextLink property: The link to get the next part of the returned list of WebTest, should the return set * be too large for a single request. May be null. * * @param nextLink the nextLink value to set. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesConfiguration.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesConfiguration.java index 792f9519c577..3b963ae9b592 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesConfiguration.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesConfiguration.java @@ -16,6 +16,10 @@ public final class WebTestPropertiesConfiguration { @JsonProperty(value = "WebTest") private String webTest; + /** Creates an instance of WebTestPropertiesConfiguration class. */ + public WebTestPropertiesConfiguration() { + } + /** * Get the webTest property: The XML specification of a WebTest to run against an application. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesRequest.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesRequest.java new file mode 100644 index 000000000000..8d66792503d9 --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesRequest.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.applicationinsights.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The collection of request properties. */ +@Fluent +public final class WebTestPropertiesRequest { + /* + * Url location to test. + */ + @JsonProperty(value = "RequestUrl") + private String requestUrl; + + /* + * List of headers and their values to add to the WebTest call. + */ + @JsonProperty(value = "Headers") + private List headers; + + /* + * Http verb to use for this web test. + */ + @JsonProperty(value = "HttpVerb") + private String httpVerb; + + /* + * Base64 encoded string body to send with this web test. + */ + @JsonProperty(value = "RequestBody") + private String requestBody; + + /* + * Parse Dependent request for this WebTest. + */ + @JsonProperty(value = "ParseDependentRequests") + private Boolean parseDependentRequests; + + /* + * Follow redirects for this web test. + */ + @JsonProperty(value = "FollowRedirects") + private Boolean followRedirects; + + /** Creates an instance of WebTestPropertiesRequest class. */ + public WebTestPropertiesRequest() { + } + + /** + * Get the requestUrl property: Url location to test. + * + * @return the requestUrl value. + */ + public String requestUrl() { + return this.requestUrl; + } + + /** + * Set the requestUrl property: Url location to test. + * + * @param requestUrl the requestUrl value to set. + * @return the WebTestPropertiesRequest object itself. + */ + public WebTestPropertiesRequest withRequestUrl(String requestUrl) { + this.requestUrl = requestUrl; + return this; + } + + /** + * Get the headers property: List of headers and their values to add to the WebTest call. + * + * @return the headers value. + */ + public List headers() { + return this.headers; + } + + /** + * Set the headers property: List of headers and their values to add to the WebTest call. + * + * @param headers the headers value to set. + * @return the WebTestPropertiesRequest object itself. + */ + public WebTestPropertiesRequest withHeaders(List headers) { + this.headers = headers; + return this; + } + + /** + * Get the httpVerb property: Http verb to use for this web test. + * + * @return the httpVerb value. + */ + public String httpVerb() { + return this.httpVerb; + } + + /** + * Set the httpVerb property: Http verb to use for this web test. + * + * @param httpVerb the httpVerb value to set. + * @return the WebTestPropertiesRequest object itself. + */ + public WebTestPropertiesRequest withHttpVerb(String httpVerb) { + this.httpVerb = httpVerb; + return this; + } + + /** + * Get the requestBody property: Base64 encoded string body to send with this web test. + * + * @return the requestBody value. + */ + public String requestBody() { + return this.requestBody; + } + + /** + * Set the requestBody property: Base64 encoded string body to send with this web test. + * + * @param requestBody the requestBody value to set. + * @return the WebTestPropertiesRequest object itself. + */ + public WebTestPropertiesRequest withRequestBody(String requestBody) { + this.requestBody = requestBody; + return this; + } + + /** + * Get the parseDependentRequests property: Parse Dependent request for this WebTest. + * + * @return the parseDependentRequests value. + */ + public Boolean parseDependentRequests() { + return this.parseDependentRequests; + } + + /** + * Set the parseDependentRequests property: Parse Dependent request for this WebTest. + * + * @param parseDependentRequests the parseDependentRequests value to set. + * @return the WebTestPropertiesRequest object itself. + */ + public WebTestPropertiesRequest withParseDependentRequests(Boolean parseDependentRequests) { + this.parseDependentRequests = parseDependentRequests; + return this; + } + + /** + * Get the followRedirects property: Follow redirects for this web test. + * + * @return the followRedirects value. + */ + public Boolean followRedirects() { + return this.followRedirects; + } + + /** + * Set the followRedirects property: Follow redirects for this web test. + * + * @param followRedirects the followRedirects value to set. + * @return the WebTestPropertiesRequest object itself. + */ + public WebTestPropertiesRequest withFollowRedirects(Boolean followRedirects) { + this.followRedirects = followRedirects; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (headers() != null) { + headers().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesValidationRules.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesValidationRules.java new file mode 100644 index 000000000000..7125cd08397a --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesValidationRules.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.applicationinsights.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The collection of validation rule properties. */ +@Fluent +public final class WebTestPropertiesValidationRules { + /* + * The collection of content validation properties + */ + @JsonProperty(value = "ContentValidation") + private WebTestPropertiesValidationRulesContentValidation contentValidation; + + /* + * Checks to see if the SSL cert is still valid. + */ + @JsonProperty(value = "SSLCheck") + private Boolean sslCheck; + + /* + * A number of days to check still remain before the the existing SSL cert expires. Value must be positive and the + * SSLCheck must be set to true. + */ + @JsonProperty(value = "SSLCertRemainingLifetimeCheck") + private Integer sslCertRemainingLifetimeCheck; + + /* + * Validate that the WebTest returns the http status code provided. + */ + @JsonProperty(value = "ExpectedHttpStatusCode") + private Integer expectedHttpStatusCode; + + /* + * When set, validation will ignore the status code. + */ + @JsonProperty(value = "IgnoreHttpStatusCode") + private Boolean ignoreHttpStatusCode; + + /** Creates an instance of WebTestPropertiesValidationRules class. */ + public WebTestPropertiesValidationRules() { + } + + /** + * Get the contentValidation property: The collection of content validation properties. + * + * @return the contentValidation value. + */ + public WebTestPropertiesValidationRulesContentValidation contentValidation() { + return this.contentValidation; + } + + /** + * Set the contentValidation property: The collection of content validation properties. + * + * @param contentValidation the contentValidation value to set. + * @return the WebTestPropertiesValidationRules object itself. + */ + public WebTestPropertiesValidationRules withContentValidation( + WebTestPropertiesValidationRulesContentValidation contentValidation) { + this.contentValidation = contentValidation; + return this; + } + + /** + * Get the sslCheck property: Checks to see if the SSL cert is still valid. + * + * @return the sslCheck value. + */ + public Boolean sslCheck() { + return this.sslCheck; + } + + /** + * Set the sslCheck property: Checks to see if the SSL cert is still valid. + * + * @param sslCheck the sslCheck value to set. + * @return the WebTestPropertiesValidationRules object itself. + */ + public WebTestPropertiesValidationRules withSslCheck(Boolean sslCheck) { + this.sslCheck = sslCheck; + return this; + } + + /** + * Get the sslCertRemainingLifetimeCheck property: A number of days to check still remain before the the existing + * SSL cert expires. Value must be positive and the SSLCheck must be set to true. + * + * @return the sslCertRemainingLifetimeCheck value. + */ + public Integer sslCertRemainingLifetimeCheck() { + return this.sslCertRemainingLifetimeCheck; + } + + /** + * Set the sslCertRemainingLifetimeCheck property: A number of days to check still remain before the the existing + * SSL cert expires. Value must be positive and the SSLCheck must be set to true. + * + * @param sslCertRemainingLifetimeCheck the sslCertRemainingLifetimeCheck value to set. + * @return the WebTestPropertiesValidationRules object itself. + */ + public WebTestPropertiesValidationRules withSslCertRemainingLifetimeCheck(Integer sslCertRemainingLifetimeCheck) { + this.sslCertRemainingLifetimeCheck = sslCertRemainingLifetimeCheck; + return this; + } + + /** + * Get the expectedHttpStatusCode property: Validate that the WebTest returns the http status code provided. + * + * @return the expectedHttpStatusCode value. + */ + public Integer expectedHttpStatusCode() { + return this.expectedHttpStatusCode; + } + + /** + * Set the expectedHttpStatusCode property: Validate that the WebTest returns the http status code provided. + * + * @param expectedHttpStatusCode the expectedHttpStatusCode value to set. + * @return the WebTestPropertiesValidationRules object itself. + */ + public WebTestPropertiesValidationRules withExpectedHttpStatusCode(Integer expectedHttpStatusCode) { + this.expectedHttpStatusCode = expectedHttpStatusCode; + return this; + } + + /** + * Get the ignoreHttpStatusCode property: When set, validation will ignore the status code. + * + * @return the ignoreHttpStatusCode value. + */ + public Boolean ignoreHttpStatusCode() { + return this.ignoreHttpStatusCode; + } + + /** + * Set the ignoreHttpStatusCode property: When set, validation will ignore the status code. + * + * @param ignoreHttpStatusCode the ignoreHttpStatusCode value to set. + * @return the WebTestPropertiesValidationRules object itself. + */ + public WebTestPropertiesValidationRules withIgnoreHttpStatusCode(Boolean ignoreHttpStatusCode) { + this.ignoreHttpStatusCode = ignoreHttpStatusCode; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (contentValidation() != null) { + contentValidation().validate(); + } + } +} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesValidationRulesContentValidation.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesValidationRulesContentValidation.java new file mode 100644 index 000000000000..fddc35e6d022 --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTestPropertiesValidationRulesContentValidation.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.applicationinsights.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The collection of content validation properties. */ +@Fluent +public final class WebTestPropertiesValidationRulesContentValidation { + /* + * Content to look for in the return of the WebTest. Must not be null or empty. + */ + @JsonProperty(value = "ContentMatch") + private String contentMatch; + + /* + * When set, this value makes the ContentMatch validation case insensitive. + */ + @JsonProperty(value = "IgnoreCase") + private Boolean ignoreCase; + + /* + * When true, validation will pass if there is a match for the ContentMatch string. If false, validation will fail + * if there is a match + */ + @JsonProperty(value = "PassIfTextFound") + private Boolean passIfTextFound; + + /** Creates an instance of WebTestPropertiesValidationRulesContentValidation class. */ + public WebTestPropertiesValidationRulesContentValidation() { + } + + /** + * Get the contentMatch property: Content to look for in the return of the WebTest. Must not be null or empty. + * + * @return the contentMatch value. + */ + public String contentMatch() { + return this.contentMatch; + } + + /** + * Set the contentMatch property: Content to look for in the return of the WebTest. Must not be null or empty. + * + * @param contentMatch the contentMatch value to set. + * @return the WebTestPropertiesValidationRulesContentValidation object itself. + */ + public WebTestPropertiesValidationRulesContentValidation withContentMatch(String contentMatch) { + this.contentMatch = contentMatch; + return this; + } + + /** + * Get the ignoreCase property: When set, this value makes the ContentMatch validation case insensitive. + * + * @return the ignoreCase value. + */ + public Boolean ignoreCase() { + return this.ignoreCase; + } + + /** + * Set the ignoreCase property: When set, this value makes the ContentMatch validation case insensitive. + * + * @param ignoreCase the ignoreCase value to set. + * @return the WebTestPropertiesValidationRulesContentValidation object itself. + */ + public WebTestPropertiesValidationRulesContentValidation withIgnoreCase(Boolean ignoreCase) { + this.ignoreCase = ignoreCase; + return this; + } + + /** + * Get the passIfTextFound property: When true, validation will pass if there is a match for the ContentMatch + * string. If false, validation will fail if there is a match. + * + * @return the passIfTextFound value. + */ + public Boolean passIfTextFound() { + return this.passIfTextFound; + } + + /** + * Set the passIfTextFound property: When true, validation will pass if there is a match for the ContentMatch + * string. If false, validation will fail if there is a match. + * + * @param passIfTextFound the passIfTextFound value to set. + * @return the WebTestPropertiesValidationRulesContentValidation object itself. + */ + public WebTestPropertiesValidationRulesContentValidation withPassIfTextFound(Boolean passIfTextFound) { + this.passIfTextFound = passIfTextFound; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTests.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTests.java index 3e6ffddca129..03c92aa7cd23 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTests.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebTests.java @@ -11,26 +11,26 @@ /** Resource collection API of WebTests. */ public interface WebTests { /** - * Get all Application Insights web tests defined within a specified resource group. + * Get all Application Insights web tests defined for 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined within a specified resource group as paginated response with + * @return all Application Insights web tests defined for the specified resource group as paginated response with * {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** - * Get all Application Insights web tests defined within a specified resource group. + * Get all Application Insights web tests defined for 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. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web tests defined within a specified resource group as paginated response with + * @return all Application Insights web tests defined for the specified resource group as paginated response with * {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -39,69 +39,69 @@ public interface WebTests { * Get a specific Application Insights web test definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Application Insights web test definition. + * @return a specific Application Insights web test definition along with {@link Response}. */ - WebTest getByResourceGroup(String resourceGroupName, String webTestName); + Response getByResourceGroupWithResponse(String resourceGroupName, String webTestName, Context context); /** * Get a specific Application Insights web test definition. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param context The context to associate with this operation. + * @param webTestName The name of the Application Insights WebTest resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Application Insights web test definition along with {@link Response}. + * @return a specific Application Insights web test definition. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String webTestName, Context context); + WebTest getByResourceGroup(String resourceGroupName, String webTestName); /** * Deletes an Application Insights web test. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. + * @param webTestName The name of the Application Insights WebTest resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void deleteByResourceGroup(String resourceGroupName, String webTestName); + Response deleteByResourceGroupWithResponse(String resourceGroupName, String webTestName, Context context); /** * Deletes an Application Insights web test. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param webTestName The name of the Application Insights webtest resource. - * @param context The context to associate with this operation. + * @param webTestName The name of the Application Insights WebTest resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse(String resourceGroupName, String webTestName, Context context); + void deleteByResourceGroup(String resourceGroupName, String webTestName); /** - * Get all Application Insights web test alerts definitions within a subscription. + * Get all Application Insights web test definitions for 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 all Application Insights web test alerts definitions within a subscription as paginated response with + * @return all Application Insights web test definitions for the specified subscription as paginated response with * {@link PagedIterable}. */ PagedIterable list(); /** - * Get all Application Insights web test alerts definitions within a subscription. + * Get all Application Insights web test definitions for 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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Application Insights web test alerts definitions within a subscription as paginated response with + * @return all Application Insights web test definitions for the specified subscription as paginated response with * {@link PagedIterable}. */ PagedIterable list(Context context); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebtestsResource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebtestsResource.java index 1ea2947c45b8..b7b0cf43cf68 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebtestsResource.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WebtestsResource.java @@ -11,6 +11,10 @@ /** An azure resource object. */ @Fluent public class WebtestsResource extends Resource { + /** Creates an instance of WebtestsResource class. */ + public WebtestsResource() { + } + /** {@inheritDoc} */ @Override public WebtestsResource withLocation(String location) { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationError.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationError.java index b22b72e94809..b016b4d37a39 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationError.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationError.java @@ -17,6 +17,10 @@ public final class WorkItemConfigurationError extends ManagementError { @JsonProperty(value = "innererror", access = JsonProperty.Access.WRITE_ONLY) private InnerError innererror; + /** Creates an instance of WorkItemConfigurationError class. */ + public WorkItemConfigurationError() { + } + /** * Get the innererror property: Inner error. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationErrorException.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationErrorException.java index 1c2921df0c7f..ea35ad5c581d 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationErrorException.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationErrorException.java @@ -31,6 +31,7 @@ public WorkItemConfigurationErrorException( super(message, response, value); } + /** {@inheritDoc} */ @Override public WorkItemConfigurationError getValue() { return (WorkItemConfigurationError) super.getValue(); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurations.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurations.java index 2cffbe63de8d..11a754eadbff 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurations.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurations.java @@ -39,21 +39,6 @@ public interface WorkItemConfigurations { */ PagedIterable list(String resourceGroupName, String resourceName, Context context); - /** - * Create a work item configuration for an Application Insights component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration - * of a Application Insights component. - * @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 work item configuration associated with an application insights resource. - */ - WorkItemConfiguration create( - String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties); - /** * Create a work item configuration for an Application Insights component. * @@ -74,16 +59,19 @@ Response createWithResponse( Context context); /** - * Gets default work item configurations that exist for the application. + * Create a work item configuration for an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param workItemConfigurationProperties Properties that need to be specified to create a work item configuration + * of a Application Insights component. * @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 default work item configurations that exist for the application. + * @return work item configuration associated with an application insights resource. */ - WorkItemConfiguration getDefault(String resourceGroupName, String resourceName); + WorkItemConfiguration create( + String resourceGroupName, String resourceName, WorkItemCreateConfiguration workItemConfigurationProperties); /** * Gets default work item configurations that exist for the application. @@ -100,17 +88,16 @@ Response getDefaultWithResponse( String resourceGroupName, String resourceName, Context context); /** - * Delete a work item configuration of an Application Insights component. + * Gets default work item configurations that exist for the application. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as - * defined in connector configuration. * @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 default work item configurations that exist for the application. */ - void delete(String resourceGroupName, String resourceName, String workItemConfigId); + WorkItemConfiguration getDefault(String resourceGroupName, String resourceName); /** * Delete a work item configuration of an Application Insights component. @@ -129,7 +116,7 @@ Response deleteWithResponse( String resourceGroupName, String resourceName, String workItemConfigId, Context context); /** - * Gets specified work item configuration for an Application Insights component. + * Delete a work item configuration of an Application Insights component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. @@ -138,9 +125,8 @@ Response deleteWithResponse( * @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 specified work item configuration for an Application Insights component. */ - WorkItemConfiguration getItem(String resourceGroupName, String resourceName, String workItemConfigId); + void delete(String resourceGroupName, String resourceName, String workItemConfigId); /** * Gets specified work item configuration for an Application Insights component. @@ -158,6 +144,20 @@ Response deleteWithResponse( Response getItemWithResponse( String resourceGroupName, String resourceName, String workItemConfigId, Context context); + /** + * Gets specified work item configuration for an Application Insights component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Application Insights component resource. + * @param workItemConfigId The unique work item configuration Id. This can be either friendly name of connector as + * defined in connector configuration. + * @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 specified work item configuration for an Application Insights component. + */ + WorkItemConfiguration getItem(String resourceGroupName, String resourceName, String workItemConfigId); + /** * Update a work item configuration for an Application Insights component. * @@ -167,16 +167,18 @@ Response getItemWithResponse( * defined in connector configuration. * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration * for this Application Insights component. + * @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 work item configuration associated with an application insights resource. + * @return work item configuration associated with an application insights resource along with {@link Response}. */ - WorkItemConfiguration updateItem( + Response updateItemWithResponse( String resourceGroupName, String resourceName, String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties); + WorkItemCreateConfiguration workItemConfigurationProperties, + Context context); /** * Update a work item configuration for an Application Insights component. @@ -187,16 +189,14 @@ WorkItemConfiguration updateItem( * defined in connector configuration. * @param workItemConfigurationProperties Properties that need to be specified to update a work item configuration * for this Application Insights component. - * @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 work item configuration associated with an application insights resource along with {@link Response}. + * @return work item configuration associated with an application insights resource. */ - Response updateItemWithResponse( + WorkItemConfiguration updateItem( String resourceGroupName, String resourceName, String workItemConfigId, - WorkItemCreateConfiguration workItemConfigurationProperties, - Context context); + WorkItemCreateConfiguration workItemConfigurationProperties); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationsListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationsListResult.java index c933ee3ce316..0e06f311c6c1 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationsListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemConfigurationsListResult.java @@ -18,6 +18,10 @@ public final class WorkItemConfigurationsListResult { @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; + /** Creates an instance of WorkItemConfigurationsListResult class. */ + public WorkItemConfigurationsListResult() { + } + /** * Get the value property: An array of work item configurations. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemCreateConfiguration.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemCreateConfiguration.java index 627da98ba3f9..4f5648cb81b7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemCreateConfiguration.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkItemCreateConfiguration.java @@ -37,6 +37,10 @@ public final class WorkItemCreateConfiguration { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map workItemProperties; + /** Creates an instance of WorkItemCreateConfiguration class. */ + public WorkItemCreateConfiguration() { + } + /** * Get the connectorId property: Unique connector id. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorDefinition.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorDefinition.java index ce490703a494..ba01a8ea17fe 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorDefinition.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorDefinition.java @@ -14,16 +14,20 @@ public final class WorkbookErrorDefinition extends ManagementError { /* * Internal error details. */ - @JsonProperty(value = "innerError", access = JsonProperty.Access.WRITE_ONLY) - private Object innerError; + @JsonProperty(value = "innererror", access = JsonProperty.Access.WRITE_ONLY) + private WorkbookInnerErrorTrace innererror; + + /** Creates an instance of WorkbookErrorDefinition class. */ + public WorkbookErrorDefinition() { + } /** - * Get the innerError property: Internal error details. + * Get the innererror property: Internal error details. * - * @return the innerError value. + * @return the innererror value. */ - public Object getInnerError() { - return this.innerError; + public WorkbookInnerErrorTrace getInnererror() { + return this.innererror; } /** @@ -32,5 +36,8 @@ public Object getInnerError() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (getInnererror() != null) { + getInnererror().validate(); + } } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorDefinitionException.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorDefinitionException.java index 0cdaaa4fcda7..447ab30e3cfe 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorDefinitionException.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookErrorDefinitionException.java @@ -30,6 +30,7 @@ public WorkbookErrorDefinitionException(String message, HttpResponse response, W super(message, response, value); } + /** {@inheritDoc} */ @Override public WorkbookErrorDefinition getValue() { return (WorkbookErrorDefinition) super.getValue(); diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookInnerErrorTrace.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookInnerErrorTrace.java new file mode 100644 index 000000000000..322818b41e7b --- /dev/null +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookInnerErrorTrace.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.applicationinsights.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Error details. */ +@Immutable +public final class WorkbookInnerErrorTrace { + /* + * detailed error trace + */ + @JsonProperty(value = "trace", access = JsonProperty.Access.WRITE_ONLY) + private List trace; + + /** Creates an instance of WorkbookInnerErrorTrace class. */ + public WorkbookInnerErrorTrace() { + } + + /** + * Get the trace property: detailed error trace. + * + * @return the trace value. + */ + public List trace() { + return this.trace; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookResource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookResource.java index 21517efa6d21..24ff8a2dee98 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookResource.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookResource.java @@ -30,6 +30,10 @@ public class WorkbookResource extends Resource { @JsonProperty(value = "etag") private String etag; + /** Creates an instance of WorkbookResource class. */ + public WorkbookResource() { + } + /** * Get the identity property: Identity used for BYOS. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookResourceIdentity.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookResourceIdentity.java index 174b7532574c..e55147979d77 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookResourceIdentity.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookResourceIdentity.java @@ -10,6 +10,10 @@ /** Identity used for BYOS. */ @Fluent public class WorkbookResourceIdentity extends ManagedServiceIdentity { + /** Creates an instance of WorkbookResourceIdentity class. */ + public WorkbookResourceIdentity() { + } + /** {@inheritDoc} */ @Override public WorkbookResourceIdentity withType(ManagedServiceIdentityType type) { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookSharedTypeKind.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookSharedTypeKind.java index fcf96bbaa0c2..cd277a9556b8 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookSharedTypeKind.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookSharedTypeKind.java @@ -8,11 +8,20 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for WorkbookSharedTypeKind. */ +/** The kind of workbook. Only valid value is shared. */ public final class WorkbookSharedTypeKind extends ExpandableStringEnum { /** Static value shared for WorkbookSharedTypeKind. */ public static final WorkbookSharedTypeKind SHARED = fromString("shared"); + /** + * Creates a new instance of WorkbookSharedTypeKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public WorkbookSharedTypeKind() { + } + /** * Creates or finds a WorkbookSharedTypeKind from its string representation. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateGallery.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateGallery.java index 6b4e116451ff..5d066687b658 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateGallery.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateGallery.java @@ -40,6 +40,10 @@ public final class WorkbookTemplateGallery { @JsonProperty(value = "resourceType") private String resourceType; + /** Creates an instance of WorkbookTemplateGallery class. */ + public WorkbookTemplateGallery() { + } + /** * Get the name property: Name of the workbook template in the gallery. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateLocalizedGallery.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateLocalizedGallery.java index 6e182190f3f3..bcefd076e298 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateLocalizedGallery.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateLocalizedGallery.java @@ -23,6 +23,10 @@ public final class WorkbookTemplateLocalizedGallery { @JsonProperty(value = "galleries") private List galleries; + /** Creates an instance of WorkbookTemplateLocalizedGallery class. */ + public WorkbookTemplateLocalizedGallery() { + } + /** * Get the templateData property: Valid JSON object containing workbook template payload. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateResource.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateResource.java index 6b3e020becae..03e8e984da18 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateResource.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateResource.java @@ -11,6 +11,10 @@ /** An azure resource object. */ @Fluent public class WorkbookTemplateResource extends Resource { + /** Creates an instance of WorkbookTemplateResource class. */ + public WorkbookTemplateResource() { + } + /** {@inheritDoc} */ @Override public WorkbookTemplateResource withLocation(String location) { diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateUpdateParameters.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateUpdateParameters.java index 52069e44c498..7b398730b35b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateUpdateParameters.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplateUpdateParameters.java @@ -27,6 +27,10 @@ public final class WorkbookTemplateUpdateParameters { @JsonProperty(value = "properties") private WorkbookTemplateProperties innerProperties; + /** Creates an instance of WorkbookTemplateUpdateParameters class. */ + public WorkbookTemplateUpdateParameters() { + } + /** * Get the tags property: Resource tags. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplates.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplates.java index ecf19aee2433..e98c951b8715 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplates.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplates.java @@ -40,50 +40,50 @@ public interface WorkbookTemplates { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook template by its resourceName. + * @return a single workbook template by its resourceName along with {@link Response}. */ - WorkbookTemplate getByResourceGroup(String resourceGroupName, String resourceName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Context context); /** * Get a single workbook template by its resourceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook template by its resourceName along with {@link Response}. + * @return a single workbook template by its resourceName. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context); + WorkbookTemplate getByResourceGroup(String resourceGroupName, String resourceName); /** * Delete a workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void deleteByResourceGroup(String resourceGroupName, String resourceName); + Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); /** * Delete a workbook template. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Application Insights component resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); + void deleteByResourceGroup(String resourceGroupName, String resourceName); /** * Get a single workbook template by its resourceName. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplatesListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplatesListResult.java index 0e8cd4821e8d..cca91031d722 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplatesListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookTemplatesListResult.java @@ -18,6 +18,10 @@ public final class WorkbookTemplatesListResult { @JsonProperty(value = "value") private List value; + /** Creates an instance of WorkbookTemplatesListResult class. */ + public WorkbookTemplatesListResult() { + } + /** * Get the value property: An array of workbook templates. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateParameters.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateParameters.java index 642f3b18d407..81957068d40d 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateParameters.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateParameters.java @@ -33,6 +33,10 @@ public final class WorkbookUpdateParameters { @JsonProperty(value = "properties") private WorkbookPropertiesUpdateParameters innerProperties; + /** Creates an instance of WorkbookUpdateParameters class. */ + public WorkbookUpdateParameters() { + } + /** * Get the kind property: The kind of workbook. Only valid value is shared. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateSharedTypeKind.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateSharedTypeKind.java index 0fb72a872b48..f790b970c9ac 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateSharedTypeKind.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbookUpdateSharedTypeKind.java @@ -8,11 +8,20 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for WorkbookUpdateSharedTypeKind. */ +/** The kind of workbook. Only valid value is shared. */ public final class WorkbookUpdateSharedTypeKind extends ExpandableStringEnum { /** Static value shared for WorkbookUpdateSharedTypeKind. */ public static final WorkbookUpdateSharedTypeKind SHARED = fromString("shared"); + /** + * Creates a new instance of WorkbookUpdateSharedTypeKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public WorkbookUpdateSharedTypeKind() { + } + /** * Creates or finds a WorkbookUpdateSharedTypeKind from its string representation. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Workbooks.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Workbooks.java index 5a94bfc09af7..057fcdf7f88a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Workbooks.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/Workbooks.java @@ -85,56 +85,56 @@ PagedIterable listByResourceGroup( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. + * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If + * false, only return summary content for workbooks. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook by its resourceName. + * @return a single workbook by its resourceName along with {@link Response}. */ - Workbook getByResourceGroup(String resourceGroupName, String resourceName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String resourceName, Boolean canFetchContent, Context context); /** * Get a single workbook by its resourceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. - * @param canFetchContent Flag indicating whether or not to return the full content for each applicable workbook. If - * false, only return summary content for workbooks. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook by its resourceName along with {@link Response}. + * @return a single workbook by its resourceName. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Boolean canFetchContent, Context context); + Workbook getByResourceGroup(String resourceGroupName, String resourceName); /** * Delete a workbook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void deleteByResourceGroup(String resourceGroupName, String resourceName); + Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); /** * Delete a workbook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); + void deleteByResourceGroup(String resourceGroupName, String resourceName); /** * Get the revisions for the workbook defined by its resourceName. @@ -171,13 +171,15 @@ Response getByResourceGroupWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param revisionId The id of the workbook's revision. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook revision defined by its revisionId. + * @return a single workbook revision defined by its revisionId along with {@link Response}. */ - Workbook revisionGet(String resourceGroupName, String resourceName, String revisionId); + Response revisionGetWithResponse( + String resourceGroupName, String resourceName, String revisionId, Context context); /** * Get a single workbook revision defined by its revisionId. @@ -185,15 +187,13 @@ Response getByResourceGroupWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the resource. * @param revisionId The id of the workbook's revision. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.applicationinsights.models.WorkbookErrorDefinitionException thrown if the * request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a single workbook revision defined by its revisionId along with {@link Response}. + * @return a single workbook revision defined by its revisionId. */ - Response revisionGetWithResponse( - String resourceGroupName, String resourceName, String revisionId, Context context); + Workbook revisionGet(String resourceGroupName, String resourceName, String revisionId); /** * Get a single workbook by its resourceName. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbooksListResult.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbooksListResult.java index 282af93ec29f..2d501816c425 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbooksListResult.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/models/WorkbooksListResult.java @@ -24,6 +24,10 @@ public final class WorkbooksListResult { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of WorkbooksListResult class. */ + public WorkbooksListResult() { + } + /** * Get the value property: An array of workbooks. * diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsDeleteSamples.java index 9475cd699533..ffff8ba4c737 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsDeleteSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; /** Samples for AnalyticsItems Delete. */ @@ -27,6 +26,6 @@ public static void analyticsItemDelete( ItemScopePath.ANALYTICS_ITEMS, "3466c160-4a10-4df8-afdf-0007f3f6dee5", null, - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsGetSamples.java index b51f4f3b36a6..5050c7e419fa 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsGetSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; /** Samples for AnalyticsItems Get. */ @@ -27,6 +26,6 @@ public static void analyticsItemGet( ItemScopePath.ANALYTICS_ITEMS, "3466c160-4a10-4df8-afdf-0007f3f6dee5", null, - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsListSamples.java index 1e60d39e3ca6..4677486c6617 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsListSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; /** Samples for AnalyticsItems List. */ @@ -22,6 +21,12 @@ public static void analyticsItemList( manager .analyticsItems() .listWithResponse( - "my-resource-group", "my-component", ItemScopePath.ANALYTICS_ITEMS, null, null, null, Context.NONE); + "my-resource-group", + "my-component", + ItemScopePath.ANALYTICS_ITEMS, + null, + null, + null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsPutSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsPutSamples.java index 8c43a1317d74..47903aa2d0c2 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsPutSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnalyticsItemsPutSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentAnalyticsItemInner; import com.azure.resourcemanager.applicationinsights.models.ItemScope; import com.azure.resourcemanager.applicationinsights.models.ItemScopePath; @@ -47,6 +46,6 @@ public static void analyticsItemPut( .withScope(ItemScope.SHARED) .withType(ItemType.QUERY), null, - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsCreateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsCreateSamples.java index bbb6e92110f2..03f61878e1b8 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsCreateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsCreateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.AnnotationInner; import java.time.OffsetDateTime; @@ -31,6 +30,6 @@ public static void annotationsCreate( .withEventTime(OffsetDateTime.parse("2018-01-31T13:41:38.657Z")) .withId("444e2c08-274a-4bbb-a89e-d77bb720f44a") .withProperties("{\"Comments\":\"Testing\",\"Label\":\"Success\"}"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsDeleteSamples.java index c10eee1deae0..fa2297441a4e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for Annotations Delete. */ public final class AnnotationsDeleteSamples { /* @@ -21,6 +19,9 @@ public static void annotationsDelete( manager .annotations() .deleteWithResponse( - "my-resource-group", "my-component", "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", Context.NONE); + "my-resource-group", + "my-component", + "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsGetSamples.java index 1f3c2d1fa11a..49126a65dfc3 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for Annotations Get. */ public final class AnnotationsGetSamples { /* @@ -20,6 +18,10 @@ public static void annotationsGet( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .annotations() - .getWithResponse("my-resource-group", "my-component", "444e2c08-274a-4bbb-a89e-d77bb720f44a", Context.NONE); + .getWithResponse( + "my-resource-group", + "my-component", + "444e2c08-274a-4bbb-a89e-d77bb720f44a", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsListSamples.java index 4d9ec4a42396..98c3ef669d3f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/AnnotationsListSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for Annotations List. */ public final class AnnotationsListSamples { /* @@ -25,6 +23,6 @@ public static void annotationsList( "my-component", "2018-02-05T00%3A30%3A00.000Z", "2018-02-06T00%3A33A00.000Z", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysCreateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysCreateSamples.java index 21241b5f0f67..c33dff012dd8 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysCreateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysCreateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.ApiKeyRequest; import java.util.Arrays; @@ -35,6 +34,6 @@ public static void aPIKeyCreate(com.azure.resourcemanager.applicationinsights.Ap Arrays .asList( "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component/annotations")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysDeleteSamples.java index bac181592b52..24abac5023cd 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for ApiKeys Delete. */ public final class ApiKeysDeleteSamples { /* @@ -20,6 +18,9 @@ public static void aPIKeyDelete(com.azure.resourcemanager.applicationinsights.Ap manager .apiKeys() .deleteWithResponse( - "my-resource-group", "my-component", "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", Context.NONE); + "my-resource-group", + "my-component", + "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysGetSamples.java index 79fa85033a01..cdf5c8f118a2 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for ApiKeys Get. */ public final class ApiKeysGetSamples { /* @@ -19,6 +17,10 @@ public final class ApiKeysGetSamples { public static void aPIKeysGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .apiKeys() - .getWithResponse("my-resource-group", "my-component", "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", Context.NONE); + .getWithResponse( + "my-resource-group", + "my-component", + "bb820f1b-3110-4a8b-ba2c-8c1129d7eb6a", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysListSamples.java index 4c2518386d08..768da4f94b5f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ApiKeysListSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for ApiKeys List. */ public final class ApiKeysListSamples { /* @@ -17,6 +15,6 @@ public final class ApiKeysListSamples { * @param manager Entry point to ApplicationInsightsManager. */ public static void aPIKeysList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.apiKeys().list("my-resource-group", "my-component", Context.NONE); + manager.apiKeys().list("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentAvailableFeaturesGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentAvailableFeaturesGetSamples.java index 8387c5eac223..8c30de3767fd 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentAvailableFeaturesGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentAvailableFeaturesGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for ComponentAvailableFeatures Get. */ public final class ComponentAvailableFeaturesGetSamples { /* @@ -18,6 +16,8 @@ public final class ComponentAvailableFeaturesGetSamples { */ public static void componentCurrentBillingFeaturesGet( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.componentAvailableFeatures().getWithResponse("my-resource-group", "my-component", Context.NONE); + manager + .componentAvailableFeatures() + .getWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesGetSamples.java index 17a243961b7e..b7835705b02f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for ComponentCurrentBillingFeatures Get. */ public final class ComponentCurrentBillingFeaturesGetSamples { /* @@ -18,6 +16,8 @@ public final class ComponentCurrentBillingFeaturesGetSamples { */ public static void componentCurrentBillingFeaturesGet( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.componentCurrentBillingFeatures().getWithResponse("my-resource-group", "my-component", Context.NONE); + manager + .componentCurrentBillingFeatures() + .getWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesUpdateSamples.java index 7228e5ce803b..05d2731be99b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesUpdateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentCurrentBillingFeaturesUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentBillingFeaturesInner; import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentDataVolumeCap; import java.util.Arrays; @@ -29,9 +28,9 @@ public static void componentCurrentBillingFeaturesUpdate( new ApplicationInsightsComponentBillingFeaturesInner() .withDataVolumeCap( new ApplicationInsightsComponentDataVolumeCap() - .withCap(100.0f) + .withCap(100.0F) .withStopSendNotificationWhenHitCap(true)) .withCurrentBillingFeatures(Arrays.asList("Basic", "Application Insights Enterprise")), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentFeatureCapabilitiesGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentFeatureCapabilitiesGetSamples.java index 4ca5872e0e8f..11969016c11c 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentFeatureCapabilitiesGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentFeatureCapabilitiesGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for ComponentFeatureCapabilities Get. */ public final class ComponentFeatureCapabilitiesGetSamples { /* @@ -18,6 +16,8 @@ public final class ComponentFeatureCapabilitiesGetSamples { */ public static void componentCurrentBillingFeaturesGet( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.componentFeatureCapabilities().getWithResponse("my-resource-group", "my-component", Context.NONE); + manager + .componentFeatureCapabilities() + .getWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationDeleteSamples.java index 08db666a1878..d3d7ac95c87e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationDeleteSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.StorageType; /** Samples for ComponentLinkedStorageAccountsOperation Delete. */ @@ -21,6 +20,7 @@ public static void componentLinkedStorageAccountsDelete( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .componentLinkedStorageAccountsOperations() - .deleteWithResponse("someResourceGroupName", "myComponent", StorageType.SERVICE_PROFILER, Context.NONE); + .deleteWithResponse( + "someResourceGroupName", "myComponent", StorageType.SERVICE_PROFILER, com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationGetSamples.java index b75fe1c548ef..e329bf76a699 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationGetSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.StorageType; /** Samples for ComponentLinkedStorageAccountsOperation Get. */ @@ -21,6 +20,7 @@ public static void componentLinkedStorageAccountsGet( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .componentLinkedStorageAccountsOperations() - .getWithResponse("someResourceGroupName", "myComponent", StorageType.SERVICE_PROFILER, Context.NONE); + .getWithResponse( + "someResourceGroupName", "myComponent", StorageType.SERVICE_PROFILER, com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationUpdateSamples.java index 41ed81c453dc..75e252c7dd75 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationUpdateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentLinkedStorageAccountsOperationUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.ComponentLinkedStorageAccounts; import com.azure.resourcemanager.applicationinsights.models.StorageType; @@ -23,7 +22,11 @@ public static void componentLinkedStorageAccountsUpdate( ComponentLinkedStorageAccounts resource = manager .componentLinkedStorageAccountsOperations() - .getWithResponse("someResourceGroupName", "myComponent", StorageType.SERVICE_PROFILER, Context.NONE) + .getWithResponse( + "someResourceGroupName", + "myComponent", + StorageType.SERVICE_PROFILER, + com.azure.core.util.Context.NONE) .getValue(); resource .update() diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentQuotaStatusGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentQuotaStatusGetSamples.java index 2f90d13253c5..596c86c093ca 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentQuotaStatusGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentQuotaStatusGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for ComponentQuotaStatus Get. */ public final class ComponentQuotaStatusGetSamples { /* @@ -18,6 +16,8 @@ public final class ComponentQuotaStatusGetSamples { */ public static void componentCurrentBillingFeaturesGet( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.componentQuotaStatus().getWithResponse("my-resource-group", "my-component", Context.NONE); + manager + .componentQuotaStatus() + .getWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsDeleteSamples.java index 99ba92a5429c..ff2ff05e95a7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for Components Delete. */ public final class ComponentsDeleteSamples { /* @@ -18,6 +16,8 @@ public final class ComponentsDeleteSamples { */ public static void componentsDelete( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.components().deleteWithResponse("my-resource-group", "my-component", Context.NONE); + manager + .components() + .deleteByResourceGroupWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetByResourceGroupSamples.java index 9c6ac8880edf..a57f071711fd 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetByResourceGroupSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetByResourceGroupSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for Components GetByResourceGroup. */ public final class ComponentsGetByResourceGroupSamples { /* @@ -17,6 +15,8 @@ public final class ComponentsGetByResourceGroupSamples { * @param manager Entry point to ApplicationInsightsManager. */ public static void componentGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.components().getByResourceGroupWithResponse("my-resource-group", "my-component", Context.NONE); + manager + .components() + .getByResourceGroupWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetPurgeStatusSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetPurgeStatusSamples.java index 8eb057c00ebe..1673b10dac44 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetPurgeStatusSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsGetPurgeStatusSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for Components GetPurgeStatus. */ public final class ComponentsGetPurgeStatusSamples { /* @@ -21,6 +19,9 @@ public static void componentPurge( manager .components() .getPurgeStatusWithResponse( - "OIAutoRest5123", "aztest5048", "purge-970318e7-b859-4edb-8903-83b1b54d0b74", Context.NONE); + "OIAutoRest5123", + "aztest5048", + "purge-970318e7-b859-4edb-8903-83b1b54d0b74", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListByResourceGroupSamples.java index 952524931d9d..686dc234abf5 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListByResourceGroupSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListByResourceGroupSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for Components ListByResourceGroup. */ public final class ComponentsListByResourceGroupSamples { /* @@ -18,6 +16,6 @@ public final class ComponentsListByResourceGroupSamples { */ public static void componentListByResourceGroup( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.components().listByResourceGroup("my-resource-group", Context.NONE); + manager.components().listByResourceGroup("my-resource-group", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListSamples.java index 3bd26e38d253..f415c01352f6 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsListSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for Components List. */ public final class ComponentsListSamples { /* @@ -18,6 +16,6 @@ public final class ComponentsListSamples { */ public static void componentsListJson( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.components().list(Context.NONE); + manager.components().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsPurgeSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsPurgeSamples.java index fc48388a179d..aad9539bc733 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsPurgeSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsPurgeSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.ComponentPurgeBody; import com.azure.resourcemanager.applicationinsights.models.ComponentPurgeBodyFilters; import java.util.Arrays; @@ -35,6 +34,6 @@ public static void componentPurge( .withColumn("TimeGenerated") .withOperator(">") .withValue("2017-09-01T00:00:00"))), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsUpdateTagsSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsUpdateTagsSamples.java index d25e567287f2..95312a4b8506 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsUpdateTagsSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ComponentsUpdateTagsSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponent; import java.util.HashMap; import java.util.Map; @@ -24,7 +23,7 @@ public static void componentUpdateTagsOnly( ApplicationInsightsComponent resource = manager .components() - .getByResourceGroupWithResponse("my-resource-group", "my-component", Context.NONE) + .getByResourceGroupWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE) .getValue(); resource .update() diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsCreateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsCreateSamples.java index 160d6afa030e..4be758a3277d 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsCreateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsCreateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentExportRequest; /** Samples for ExportConfigurations Create. */ @@ -38,6 +37,6 @@ public static void exportConfigurationPost( .withDestinationStorageLocationId("eastus") .withDestinationAccountId( "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.ClassicStorage/storageAccounts/mystorageblob"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsDeleteSamples.java index 1c8f16641a95..743e136d59e6 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for ExportConfigurations Delete. */ public final class ExportConfigurationsDeleteSamples { /* @@ -20,6 +18,7 @@ public static void exportConfigurationDelete( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .exportConfigurations() - .deleteWithResponse("my-resource-group", "my-component", "uGOoki0jQsyEs3IdQ83Q4QsNr4=", Context.NONE); + .deleteWithResponse( + "my-resource-group", "my-component", "uGOoki0jQsyEs3IdQ83Q4QsNr4=", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsGetSamples.java index d8d28cab4e0e..f3c369d14da7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for ExportConfigurations Get. */ public final class ExportConfigurationsGetSamples { /* @@ -20,6 +18,7 @@ public static void exportConfigurationGet( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .exportConfigurations() - .getWithResponse("my-resource-group", "my-component", "uGOoki0jQsyEs3IdQ83Q4QsNr4=", Context.NONE); + .getWithResponse( + "my-resource-group", "my-component", "uGOoki0jQsyEs3IdQ83Q4QsNr4=", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsListSamples.java index 6760b658773b..607232b8740b 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsListSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for ExportConfigurations List. */ public final class ExportConfigurationsListSamples { /* @@ -18,6 +16,8 @@ public final class ExportConfigurationsListSamples { */ public static void exportConfigurationsList( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.exportConfigurations().listWithResponse("my-resource-group", "my-component", Context.NONE); + manager + .exportConfigurations() + .listWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsUpdateSamples.java index 81e9d4702c2d..e90fc6b6c30a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsUpdateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ExportConfigurationsUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentExportRequest; /** Samples for ExportConfigurations Update. */ @@ -39,6 +38,6 @@ public static void exportConfigurationUpdate( .withDestinationStorageLocationId("eastus") .withDestinationAccountId( "/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.ClassicStorage/storageAccounts/mystorageblob"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesAddSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesAddSamples.java index 4bac930220a2..e61549948262 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesAddSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesAddSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFavoriteInner; import com.azure.resourcemanager.applicationinsights.models.FavoriteType; import java.util.Arrays; @@ -157,6 +156,6 @@ public static void favoriteAdd(com.azure.resourcemanager.applicationinsights.App .withFavoriteType(FavoriteType.SHARED) .withTags(Arrays.asList("TagSample01", "TagSample02")) .withIsGeneratedFromTemplate(false), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesDeleteSamples.java index 365376ea60a9..a98970f9a054 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for Favorites Delete. */ public final class FavoritesDeleteSamples { /* @@ -20,6 +18,9 @@ public static void favoriteList(com.azure.resourcemanager.applicationinsights.Ap manager .favorites() .deleteWithResponse( - "my-resource-group", "my-ai-component", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE); + "my-resource-group", + "my-ai-component", + "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesGetSamples.java index e109d5eaf070..1e9d8bd4bf01 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for Favorites Get. */ public final class FavoritesGetSamples { /* @@ -20,6 +18,9 @@ public static void favoriteGet(com.azure.resourcemanager.applicationinsights.App manager .favorites() .getWithResponse( - "my-resource-group", "my-ai-component", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE); + "my-resource-group", + "my-ai-component", + "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesListSamples.java index 203d8a93d732..1d79b3e98172 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesListSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for Favorites List. */ public final class FavoritesListSamples { /* @@ -19,6 +17,7 @@ public final class FavoritesListSamples { public static void favoritesList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .favorites() - .listWithResponse("my-resource-group", "my-ai-component", null, null, null, null, Context.NONE); + .listWithResponse( + "my-resource-group", "my-ai-component", null, null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesUpdateSamples.java index 547253408fc1..b1c933bffa2f 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesUpdateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/FavoritesUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentFavoriteInner; import com.azure.resourcemanager.applicationinsights.models.FavoriteType; import java.util.Arrays; @@ -73,6 +72,6 @@ public static void favoriteList(com.azure.resourcemanager.applicationinsights.Ap .withFavoriteType(FavoriteType.SHARED) .withTags(Arrays.asList("TagSample01", "TagSample02", "TagSample03")) .withIsGeneratedFromTemplate(false), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/LiveTokenGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/LiveTokenGetSamples.java index 284dc2755b35..6260628e05b9 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/LiveTokenGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/LiveTokenGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for LiveToken Get. */ public final class LiveTokenGetSamples { /* @@ -22,6 +20,6 @@ public static void getLiveTokenForResource( .liveTokens() .getWithResponse( "subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/FabrikamFiberApp/providers/microsoft.insights/components/CustomAvailabilityTest/providers/microsoft.insights/generatelivetoken", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksDeleteSamples.java index d6f5cf696107..d73a857b3099 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for MyWorkbooks Delete. */ public final class MyWorkbooksDeleteSamples { /* @@ -20,6 +18,7 @@ public static void workbookDelete( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .myWorkbooks() - .deleteWithResponse("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE); + .deleteByResourceGroupWithResponse( + "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksGetByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksGetByResourceGroupSamples.java index 1518d0feb161..47b7cbc46499 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksGetByResourceGroupSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksGetByResourceGroupSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for MyWorkbooks GetByResourceGroup. */ public final class MyWorkbooksGetByResourceGroupSamples { /* @@ -19,6 +17,7 @@ public final class MyWorkbooksGetByResourceGroupSamples { public static void workbookGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .myWorkbooks() - .getByResourceGroupWithResponse("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE); + .getByResourceGroupWithResponse( + "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListByResourceGroupSamples.java index ab7a76f4971d..4958c600356e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListByResourceGroupSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListByResourceGroupSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.CategoryType; /** Samples for MyWorkbooks ListByResourceGroup. */ @@ -20,7 +19,8 @@ public final class MyWorkbooksListByResourceGroupSamples { public static void workbooksList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .myWorkbooks() - .listByResourceGroup("my-resource-group", CategoryType.WORKBOOK, null, null, null, Context.NONE); + .listByResourceGroup( + "my-resource-group", CategoryType.WORKBOOK, null, null, null, com.azure.core.util.Context.NONE); } /* @@ -35,6 +35,7 @@ public static void workbooksList2( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .myWorkbooks() - .listByResourceGroup("my-resource-group", CategoryType.WORKBOOK, null, null, null, Context.NONE); + .listByResourceGroup( + "my-resource-group", CategoryType.WORKBOOK, null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListSamples.java index c41b38873472..0b4feb7a7e25 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksListSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.CategoryType; /** Samples for MyWorkbooks List. */ @@ -18,7 +17,7 @@ public final class MyWorkbooksListSamples { * @param manager Entry point to ApplicationInsightsManager. */ public static void workbooksList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.myWorkbooks().list(CategoryType.WORKBOOK, null, null, Context.NONE); + manager.myWorkbooks().list(CategoryType.WORKBOOK, null, null, com.azure.core.util.Context.NONE); } /* @@ -31,6 +30,6 @@ public static void workbooksList(com.azure.resourcemanager.applicationinsights.A */ public static void workbooksList2( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.myWorkbooks().list(CategoryType.WORKBOOK, null, null, Context.NONE); + manager.myWorkbooks().list(CategoryType.WORKBOOK, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksUpdateSamples.java index d6adf0df9e37..e05e79d7723a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksUpdateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/MyWorkbooksUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.Kind; import com.azure.resourcemanager.applicationinsights.models.MyWorkbook; @@ -24,7 +23,7 @@ public static void workbookUpdate( manager .myWorkbooks() .getByResourceGroupWithResponse( - "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE) + "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", com.azure.core.util.Context.NONE) .getValue(); resource .update() diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsGetSamples.java index 88f252ff84a1..44ca345153ad 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for ProactiveDetectionConfigurations Get. */ public final class ProactiveDetectionConfigurationsGetSamples { /* @@ -20,6 +18,6 @@ public static void proactiveDetectionConfigurationGet( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .proactiveDetectionConfigurations() - .getWithResponse("my-resource-group", "my-component", "slowpageloadtime", Context.NONE); + .getWithResponse("my-resource-group", "my-component", "slowpageloadtime", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsListSamples.java index 84d96d20a045..3910dce18da5 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsListSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for ProactiveDetectionConfigurations List. */ public final class ProactiveDetectionConfigurationsListSamples { /* @@ -18,6 +16,8 @@ public final class ProactiveDetectionConfigurationsListSamples { */ public static void proactiveDetectionConfigurationsList( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.proactiveDetectionConfigurations().listWithResponse("my-resource-group", "my-component", Context.NONE); + manager + .proactiveDetectionConfigurations() + .listWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsUpdateSamples.java index eac67d26981c..aa1f9407dcb6 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsUpdateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/ProactiveDetectionConfigurationsUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.fluent.models.ApplicationInsightsComponentProactiveDetectionConfigurationInner; import com.azure.resourcemanager.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions; import java.util.Arrays; @@ -43,6 +42,6 @@ public static void proactiveDetectionConfigurationUpdate( .withIsEnabledByDefault(true) .withIsInPreview(false) .withSupportsEmailNotifications(true)), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestLocationsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestLocationsListSamples.java index b91319f89e3c..4490a45943ac 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestLocationsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestLocationsListSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for WebTestLocations List. */ public final class WebTestLocationsListSamples { /* @@ -18,6 +16,6 @@ public final class WebTestLocationsListSamples { */ public static void webTestLocationsList( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.webTestLocations().list("my-resource-group", "my-component", Context.NONE); + manager.webTestLocations().list("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsCreateOrUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsCreateOrUpdateSamples.java index cbc0a8680266..e425dab14912 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsCreateOrUpdateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsCreateOrUpdateSamples.java @@ -4,15 +4,18 @@ package com.azure.resourcemanager.applicationinsights.generated; +import com.azure.resourcemanager.applicationinsights.models.HeaderField; import com.azure.resourcemanager.applicationinsights.models.WebTestGeolocation; import com.azure.resourcemanager.applicationinsights.models.WebTestKind; import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesConfiguration; +import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesRequest; +import com.azure.resourcemanager.applicationinsights.models.WebTestPropertiesValidationRules; import java.util.Arrays; /** Samples for WebTests CreateOrUpdate. */ public final class WebTestsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestCreate.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestCreate.json */ /** * Sample code: webTestCreate. @@ -53,7 +56,50 @@ public static void webTestCreate(com.azure.resourcemanager.applicationinsights.A } /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestUpdate.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestCreateStandard.json + */ + /** + * Sample code: webTestCreateStandard. + * + * @param manager Entry point to ApplicationInsightsManager. + */ + public static void webTestCreateStandard( + com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { + manager + .webTests() + .define("my-webtest-my-component") + .withRegion("South Central US") + .withExistingResourceGroup("my-resource-group") + .withSyntheticMonitorId("my-webtest-my-component") + .withWebTestName("my-webtest-my-component") + .withDescription("Ping web test alert for mytestwebapp") + .withEnabled(true) + .withFrequency(900) + .withTimeout(120) + .withWebTestKind(WebTestKind.STANDARD) + .withRetryEnabled(true) + .withLocations(Arrays.asList(new WebTestGeolocation().withLocation("us-fl-mia-edge"))) + .withRequest( + new WebTestPropertiesRequest() + .withRequestUrl("https://bing.com") + .withHeaders( + Arrays + .asList( + new HeaderField() + .withHeaderFieldName("fakeTokenPlaceholder") + .withHeaderFieldValue("de-DE"), + new HeaderField() + .withHeaderFieldName("fakeTokenPlaceholder") + .withHeaderFieldValue("de-DE"))) + .withHttpVerb("POST") + .withRequestBody("SGVsbG8gd29ybGQ=")) + .withValidationRules( + new WebTestPropertiesValidationRules().withSslCheck(true).withSslCertRemainingLifetimeCheck(100)) + .create(); + } + + /* + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestUpdate.json */ /** * Sample code: webTestUpdate. diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsDeleteSamples.java index dd155f43ccc2..4edf6d7ddbc7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for WebTests Delete. */ public final class WebTestsDeleteSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestDelete.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestDelete.json */ /** * Sample code: webTestDelete. @@ -17,6 +15,9 @@ public final class WebTestsDeleteSamples { * @param manager Entry point to ApplicationInsightsManager. */ public static void webTestDelete(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.webTests().deleteWithResponse("my-resource-group", "my-webtest-01-mywebservice", Context.NONE); + manager + .webTests() + .deleteByResourceGroupWithResponse( + "my-resource-group", "my-webtest-01-mywebservice", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsGetByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsGetByResourceGroupSamples.java index 122f03a6a80c..1104001e69eb 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsGetByResourceGroupSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsGetByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for WebTests GetByResourceGroup. */ public final class WebTestsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestGet.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestGet.json */ /** * Sample code: webTestGet. @@ -19,6 +17,7 @@ public final class WebTestsGetByResourceGroupSamples { public static void webTestGet(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .webTests() - .getByResourceGroupWithResponse("my-resource-group", "my-webtest-01-mywebservice", Context.NONE); + .getByResourceGroupWithResponse( + "my-resource-group", "my-webtest-01-mywebservice", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListByComponentSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListByComponentSamples.java index 71a428618a75..cfba1763e9f3 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListByComponentSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListByComponentSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for WebTests ListByComponent. */ public final class WebTestsListByComponentSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestListByComponent.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestListByComponent.json */ /** * Sample code: webTestListByComponent. @@ -18,6 +16,6 @@ public final class WebTestsListByComponentSamples { */ public static void webTestListByComponent( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.webTests().listByComponent("my-component", "my-resource-group", Context.NONE); + manager.webTests().listByComponent("my-component", "my-resource-group", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListByResourceGroupSamples.java index d8e5d1e36150..4ead17286283 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListByResourceGroupSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for WebTests ListByResourceGroup. */ public final class WebTestsListByResourceGroupSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestListByResourceGroup.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestListByResourceGroup.json */ /** * Sample code: webTestListByResourceGroup. @@ -18,6 +16,6 @@ public final class WebTestsListByResourceGroupSamples { */ public static void webTestListByResourceGroup( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.webTests().listByResourceGroup("my-resource-group", Context.NONE); + manager.webTests().listByResourceGroup("my-resource-group", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListSamples.java index 16668f68094c..e5a5e26181cf 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for WebTests List. */ public final class WebTestsListSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestList.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestList.json */ /** * Sample code: webTestList. @@ -17,6 +15,6 @@ public final class WebTestsListSamples { * @param manager Entry point to ApplicationInsightsManager. */ public static void webTestList(com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.webTests().list(Context.NONE); + manager.webTests().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsUpdateTagsSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsUpdateTagsSamples.java index 1406204a3ef1..e4d63dfb12af 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsUpdateTagsSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WebTestsUpdateTagsSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.WebTest; import java.util.HashMap; import java.util.Map; @@ -12,7 +11,7 @@ /** Samples for WebTests UpdateTags. */ public final class WebTestsUpdateTagsSamples { /* - * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2015-05-01/examples/WebTestUpdateTagsOnly.json + * x-ms-original-file: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-06-15/examples/WebTestUpdateTagsOnly.json */ /** * Sample code: webTestUpdateTags. @@ -24,7 +23,8 @@ public static void webTestUpdateTags( WebTest resource = manager .webTests() - .getByResourceGroupWithResponse("my-resource-group", "my-webtest-my-component", Context.NONE) + .getByResourceGroupWithResponse( + "my-resource-group", "my-webtest-my-component", com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -37,8 +37,6 @@ public static void webTestUpdateTags( "SystemType", "A08", "hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Insights/components/my-component", - "Resource", - "hidden-link:/subscriptions/subid/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/mytestwebapp", "Resource")) .apply(); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsCreateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsCreateSamples.java index 17d873d81864..67615bbc71d7 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsCreateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsCreateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.WorkItemCreateConfiguration; import java.util.HashMap; import java.util.Map; @@ -32,7 +31,7 @@ public static void workItemConfigurationsCreate( "{\"VSOAccountBaseUrl\":\"https://testtodelete.visualstudio.com\",\"ProjectCollection\":\"DefaultCollection\",\"Project\":\"todeletefirst\",\"ResourceId\":\"d0662b05-439a-4a1b-840b-33a7f8b42ebf\",\"Custom\":\"{\\\"/fields/System.WorkItemType\\\":\\\"Bug\\\",\\\"/fields/System.AreaPath\\\":\\\"todeletefirst\\\",\\\"/fields/System.AssignedTo\\\":\\\"\\\"}\"}") .withValidateOnly(true) .withWorkItemProperties(mapOf()), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsDeleteSamples.java index 7bc97231743f..fbd1ca890586 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for WorkItemConfigurations Delete. */ public final class WorkItemConfigurationsDeleteSamples { /* @@ -20,6 +18,7 @@ public static void workItemConfigurationDelete( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .workItemConfigurations() - .deleteWithResponse("my-resource-group", "my-component", "Visual Studio Team Services", Context.NONE); + .deleteWithResponse( + "my-resource-group", "my-component", "Visual Studio Team Services", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetDefaultSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetDefaultSamples.java index 3dce1b1ff33e..11ffbab7d266 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetDefaultSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetDefaultSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for WorkItemConfigurations GetDefault. */ public final class WorkItemConfigurationsGetDefaultSamples { /* @@ -18,6 +16,8 @@ public final class WorkItemConfigurationsGetDefaultSamples { */ public static void workItemConfigurationsGetDefault( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.workItemConfigurations().getDefaultWithResponse("my-resource-group", "my-component", Context.NONE); + manager + .workItemConfigurations() + .getDefaultWithResponse("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetItemSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetItemSamples.java index 1fbd9ac1e125..43bbac73d0ad 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetItemSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsGetItemSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for WorkItemConfigurations GetItem. */ public final class WorkItemConfigurationsGetItemSamples { /* @@ -20,6 +18,7 @@ public static void workItemConfigurationsGetDefault( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .workItemConfigurations() - .getItemWithResponse("my-resource-group", "my-component", "Visual Studio Team Services", Context.NONE); + .getItemWithResponse( + "my-resource-group", "my-component", "Visual Studio Team Services", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsListSamples.java index 459db6a22875..c4f8e0158b24 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsListSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for WorkItemConfigurations List. */ public final class WorkItemConfigurationsListSamples { /* @@ -18,6 +16,6 @@ public final class WorkItemConfigurationsListSamples { */ public static void workItemConfigurationsList( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.workItemConfigurations().list("my-resource-group", "my-component", Context.NONE); + manager.workItemConfigurations().list("my-resource-group", "my-component", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsUpdateItemSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsUpdateItemSamples.java index c53443b25e02..019198e5cfe9 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsUpdateItemSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkItemConfigurationsUpdateItemSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.WorkItemCreateConfiguration; import java.util.HashMap; import java.util.Map; @@ -33,7 +32,7 @@ public static void workItemConfigurationsCreate( "{\"VSOAccountBaseUrl\":\"https://testtodelete.visualstudio.com\",\"ProjectCollection\":\"DefaultCollection\",\"Project\":\"todeletefirst\",\"ResourceId\":\"d0662b05-439a-4a1b-840b-33a7f8b42ebf\",\"Custom\":\"{\\\"/fields/System.WorkItemType\\\":\\\"Bug\\\",\\\"/fields/System.AreaPath\\\":\\\"todeletefirst\\\",\\\"/fields/System.AssignedTo\\\":\\\"\\\"}\"}") .withValidateOnly(true) .withWorkItemProperties(mapOf()), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesDeleteSamples.java index 587759d9f097..711c5bb2b066 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for WorkbookTemplates Delete. */ public final class WorkbookTemplatesDeleteSamples { /* @@ -18,6 +16,9 @@ public final class WorkbookTemplatesDeleteSamples { */ public static void workbookTemplateDelete( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.workbookTemplates().deleteWithResponse("my-resource-group", "my-template-resource", Context.NONE); + manager + .workbookTemplates() + .deleteByResourceGroupWithResponse( + "my-resource-group", "my-template-resource", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesGetByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesGetByResourceGroupSamples.java index 3eda6ea7c499..933eb134170d 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesGetByResourceGroupSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesGetByResourceGroupSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for WorkbookTemplates GetByResourceGroup. */ public final class WorkbookTemplatesGetByResourceGroupSamples { /* @@ -20,6 +18,6 @@ public static void workbookTemplateGet( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .workbookTemplates() - .getByResourceGroupWithResponse("my-resource-group", "my-resource-name", Context.NONE); + .getByResourceGroupWithResponse("my-resource-group", "my-resource-name", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesListByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesListByResourceGroupSamples.java index a05d12cbd793..24db1de269a6 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesListByResourceGroupSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesListByResourceGroupSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for WorkbookTemplates ListByResourceGroup. */ public final class WorkbookTemplatesListByResourceGroupSamples { /* @@ -18,6 +16,6 @@ public final class WorkbookTemplatesListByResourceGroupSamples { */ public static void workbookTemplatesList( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.workbookTemplates().listByResourceGroup("my-resource-group", Context.NONE); + manager.workbookTemplates().listByResourceGroup("my-resource-group", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesUpdateSamples.java index cb882a701b8e..4a3e7580c1cb 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesUpdateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbookTemplatesUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.WorkbookTemplate; /** Samples for WorkbookTemplates Update. */ @@ -22,7 +21,8 @@ public static void workbookTemplateUpdate( WorkbookTemplate resource = manager .workbookTemplates() - .getByResourceGroupWithResponse("my-resource-group", "my-template-resource", Context.NONE) + .getByResourceGroupWithResponse( + "my-resource-group", "my-template-resource", com.azure.core.util.Context.NONE) .getValue(); resource.update().apply(); } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksDeleteSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksDeleteSamples.java index 92bad304a1ad..fc0f24566a5e 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksDeleteSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for Workbooks Delete. */ public final class WorkbooksDeleteSamples { /* @@ -20,6 +18,7 @@ public static void workbookDelete( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { manager .workbooks() - .deleteWithResponse("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE); + .deleteByResourceGroupWithResponse( + "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksGetByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksGetByResourceGroupSamples.java index 8490f3181a4d..efacc417da19 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksGetByResourceGroupSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksGetByResourceGroupSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for Workbooks GetByResourceGroup. */ public final class WorkbooksGetByResourceGroupSamples { /* @@ -20,7 +18,7 @@ public static void workbookGet1(com.azure.resourcemanager.applicationinsights.Ap manager .workbooks() .getByResourceGroupWithResponse( - "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, Context.NONE); + "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, com.azure.core.util.Context.NONE); } /* @@ -36,7 +34,7 @@ public static void workbookManagedGet( manager .workbooks() .getByResourceGroupWithResponse( - "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, Context.NONE); + "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, com.azure.core.util.Context.NONE); } /* @@ -51,6 +49,6 @@ public static void workbookGet(com.azure.resourcemanager.applicationinsights.App manager .workbooks() .getByResourceGroupWithResponse( - "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, Context.NONE); + "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListByResourceGroupSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListByResourceGroupSamples.java index 95c3f07ea332..dc3506a96e5c 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListByResourceGroupSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListByResourceGroupSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.CategoryType; /** Samples for Workbooks ListByResourceGroup. */ @@ -27,7 +26,7 @@ public static void workbooksManagedList( null, "/subscriptions/6b643656-33eb-422f-aee8-3ac119r124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp", null, - Context.NONE); + com.azure.core.util.Context.NONE); } /* @@ -47,6 +46,6 @@ public static void workbooksList(com.azure.resourcemanager.applicationinsights.A null, "/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourceGroups/my-resource-group/providers/Microsoft.Web/sites/MyApp", null, - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListSamples.java index 59fce76f18c1..c2b1fafd3bea 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksListSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.CategoryType; /** Samples for Workbooks List. */ @@ -19,7 +18,7 @@ public final class WorkbooksListSamples { */ public static void workbooksListSub( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.workbooks().list(CategoryType.WORKBOOK, null, null, Context.NONE); + manager.workbooks().list(CategoryType.WORKBOOK, null, null, com.azure.core.util.Context.NONE); } /* @@ -32,6 +31,6 @@ public static void workbooksListSub( */ public static void workbooksList2( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.workbooks().list(CategoryType.WORKBOOK, null, null, Context.NONE); + manager.workbooks().list(CategoryType.WORKBOOK, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionGetSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionGetSamples.java index 33503d19b219..fc1f78f9917a 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionGetSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for Workbooks RevisionGet. */ public final class WorkbooksRevisionGetSamples { /* @@ -24,6 +22,6 @@ public static void workbookRevisionGet( "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", "1e2f8435b98248febee70c64ac22e1ab", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionsListSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionsListSamples.java index 71ea909c6441..3080dc565fde 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionsListSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksRevisionsListSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; - /** Samples for Workbooks RevisionsList. */ public final class WorkbooksRevisionsListSamples { /* @@ -18,6 +16,9 @@ public final class WorkbooksRevisionsListSamples { */ public static void workbookRevisionsList( com.azure.resourcemanager.applicationinsights.ApplicationInsightsManager manager) { - manager.workbooks().revisionsList("my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", Context.NONE); + manager + .workbooks() + .revisionsList( + "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", com.azure.core.util.Context.NONE); } } diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksUpdateSamples.java b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksUpdateSamples.java index 275f2fc5ab74..a9cb9ecfb9b5 100644 --- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksUpdateSamples.java +++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/samples/java/com/azure/resourcemanager/applicationinsights/generated/WorkbooksUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.applicationinsights.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.applicationinsights.models.Workbook; /** Samples for Workbooks Update. */ @@ -23,7 +22,7 @@ public static void workbookUpdate( manager .workbooks() .getByResourceGroupWithResponse( - "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, Context.NONE) + "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -46,7 +45,7 @@ public static void workbookManagedUpdate( manager .workbooks() .getByResourceGroupWithResponse( - "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, Context.NONE) + "my-resource-group", "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2", null, com.azure.core.util.Context.NONE) .getValue(); resource .update()